## Monday, October 12, 2009

### Multiple graphics windows in R

I have been thinking for the longest time that R could only handle one graphics windows, I should have looked a little deeper. It turns out that it is very easy to do.

To create a new window, simply type: windows() or X11(). This will open a new graphics device and give it the next available number.
To make window k the active window, the command is windows(k).
To close window k, dev.off(k) is the way to go.

For more commands and information, see help(dev.cur) in Rgui.

### TiddlyWiki

If you would find useful to have the ability to create web pages on the fly, using your web browser as editor, but with WYSIWYG capabilities, you've got to try TiddlyWiki (http://www.tiddlywiki.com/). From the creators:

"TiddlyWiki is a single html file which has all the characteristics of a wiki - including all of the content, the functionality (including editing, saving, tagging and searching) and the style sheet. Because it's a single file, it's very portable - you can email it, put it on a web server or share it via a USB stick."

This is open source, free, fast, portable across platforms, and easy to use. I found a very nice place for hosting my personal wiki, www.tiddlyspot.com. If you are fond of html, this does not get better.

## Friday, October 9, 2009

### Puthesis for AGEC thesis

The puthesis template does 99% of your thesis formatting. The 1% left, however, is a pain in the neck. For example, using puthesis out of the shelve gave me the following problems (Ask Lou Ann for the format requirements, do it early):

1. The margins were not as required
4. The table captions did not met the requirements.
6. The original template I got did not indent the first line after Chapter headings.

To fix 1-3 and 5 I modified the puthesis.cls file and renamed it as

Notice that puthesis_mod.cls is genetically engineered to include the bibliographical AAEA style, which was mentioned in an earlier post.

I also noticed that other people working with puthesis had not the same problems I had, and I ignore why that is the case.

Two more things:

1. Margins work --- but you have to be sure that Page Scaling is set to none when you use Adobe Acrobat Reader to print.
2. Figures and tables that are aligned at the top of the page tend to break the 1 inch top margin. My solution was to use \begin{}[hb]. Itworked (h for here, b for bottom). As a very last resource, for tables that occupy an entire (or more) page, a \vspace{-.1in} statement did the trick. Put it after the \begin{} and before the \caption.

## Tuesday, October 6, 2009

### Merging PDFs (and other useful tasks)

If you need to merge two pdfs, as for example, when attaching forms 9 and 20 to the thesis manuscript, pdftk can be useful. Free, portable across platforms, and without the need of administrative privileges, it does a lot of useful things. From the creators: "If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses." Can be downloaded from http://www.accesspdf.com/pdftk/.

## Friday, September 25, 2009

### LaTeX to Word (Quick and Dirty)

Although Nelson's method is probably more thorough, I have had some luck recently with GrindEQ for converting LaTeX documents to Word. It does a great job with equations and text. Not the best with figures and citations, but I think it does a fairly good job overall. At least better than converting from pdf to doc or docx.

You can check it out here.

## Thursday, September 17, 2009

### page counter in beamer presentations

suppose you want to put a page counter in your beamer presentation. Add to the preamble the following:

 \usefoottemplate{\hfill \insertframenumber{} / \inserttotalframenumber} The nice thing about this way of using this method is that it counts each slide once, even if the slide have a transition. 
 Posted by Nelson Villoria at 11:29 AM No comments: Links to this post Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: beamer, latex 
 
 
 Newer Posts Home Subscribe to: Posts (Atom) window.___gcfg = { 'lang': 'en' }; 
 
 R bloggers Loading... Labels beamer (1) Excel (1) GeoDa (1) graphics (1) html (2) hyperref (1) jabref (1) latex (13) package (2) pdf (1) puthesis (2) R (11) tables (1) word (1) zotero (1) There was an error in this gadget Related Links CRAN Task View: Computational Econometrics Followers window.followersIframe = null; function followersIframeOpen(url) { gapi.load("gapi.iframes", function() { if (gapi.iframes && gapi.iframes.getContext) { window.followersIframe = gapi.iframes.getContext().openChild({ url: url, where: document.getElementById("followers-iframe-container"), messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { '_ready': function(obj) { window.followersIframe.getIframeEl().height = obj.height; }, 'reset': function() { window.followersIframe.close(); followersIframeOpen("https://www.blogger.com/followers.g?blogID\x3d3130219534309883662\x26colors\x3dCgt0cmFuc3BhcmVudBILdHJhbnNwYXJlbnQaByM2NjY2NjYiByM1NTg4YWEqByNmZmZmZmYyByNjYzY2MDA6ByM2NjY2NjZCByM1NTg4YWFKByM5OTk5OTlSByM1NTg4YWFaC3RyYW5zcGFyZW50\x26pageSize\x3d21\x26origin\x3dhttp://openboilers.blogspot.com/"); }, 'open': function(url) { window.followersIframe.close(); followersIframeOpen(url); }, 'blogger-ping': function() { } } }); } }); } followersIframeOpen("https://www.blogger.com/followers.g?blogID\x3d3130219534309883662\x26colors\x3dCgt0cmFuc3BhcmVudBILdHJhbnNwYXJlbnQaByM2NjY2NjYiByM1NTg4YWEqByNmZmZmZmYyByNjYzY2MDA6ByM2NjY2NjZCByM1NTg4YWFKByM5OTk5OTlSByM1NTg4YWFaC3RyYW5zcGFyZW50\x26pageSize\x3d21\x26origin\x3dhttp://openboilers.blogspot.com/"); Blog Archive ►  2010 (3) ►  November (1) ►  September (1) ►  July (1) ▼  2009 (33) ▼  October (4) Multiple graphics windows in R TiddlyWiki Puthesis for AGEC thesis Merging PDFs (and other useful tasks) ►  September (2) LaTeX to Word (Quick and Dirty) page counter in beamer presentations ►  August (16) AJAE standard references in Latex and Puthesis Selectively removing objects in R Transposing a Dataset Other Software GeoDa Want to convert your Excel table to LaTeX? Review notes in the margin Sophisticated axis labels in R Cover Letters from Purdue in LaTex Clickable links [hyperref] A couple of nice sources Large letter beginning paragraph Aligning Equations in Latex HTML Scroll Down Box for Code Maps in R From Latex to MS Word ►  July (11) Creating Dummy Matrices in R Tracking changes in Latex files Thesis in LaTeX Currently Using Viewing Latex changes as PDFs in real time Installing all Econometrics packages Bridging the Gap Between R and SAS Using formulas in your own code For substituting zeroes for NAs in a dataframe Welcome everyone! A little idea to make things ea... The idea here is to share tips about R, Latex, and... Contributors Benoit David Ubilava Gustav Julia Beckhusen Metin Nelson Villoria Nes Patrick Samantha Sharonka Todd Unknown mesbah Visits var sc_project=5589560; var sc_invisible=0; var sc_partition=66; var sc_click_stat=1; var sc_security="56e3ff04";   
 
 window['__wavt'] = 'AOuZoY77KzIZnJQgfpVees0vEIPtedpdOg:1521413882364';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d3130219534309883662','//openboilers.blogspot.com/2009/','3130219534309883662'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '3130219534309883662', 'title': 'open source: tips \x26amp; tools', 'url': 'http://openboilers.blogspot.com/2009/', 'canonicalUrl': 'http://openboilers.blogspot.com/2009/', 'homepageUrl': 'http://openboilers.blogspot.com/', 'searchUrl': 'http://openboilers.blogspot.com/search', 'canonicalHomepageUrl': 'http://openboilers.blogspot.com/', 'blogspotFaviconUrl': 'http://openboilers.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22open source: tips \x26amp; tools - Atom\x22 href\x3d\x22http://openboilers.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22open source: tips \x26amp; tools - RSS\x22 href\x3d\x22http://openboilers.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22open source: tips \x26amp; tools - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/3130219534309883662/posts/default\x22 /\x3e\n', 'meTag': '', 'openIdOpTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/1eda9627641898c5', 'plusOneApiSrc': 'https://apis.google.com/js/plusone.js', 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'Twitter', 'key': 'twitter', 'shareMessage': 'Share to Twitter', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Google+', 'key': 'googlePlus', 'shareMessage': 'Share to Google+', 'target': 'googleplus'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'googlePlusShareButtonWidth': 300, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'archive', 'pageName': '2009', 'pageTitle': 'open source: tips \x26amp; tools: 2009'}}, {'name': 'features', 'data': {'lazy_images': 'false', 'sharing_get_link_dialog': 'true', 'sharing_native': 'false'}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'isResponsive': false, 'isAlternateRendering': false, 'isCustom': false}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'open source: tips \x26 tools', 'description': '', 'url': 'http://openboilers.blogspot.com/2009/', 'type': 'feed', 'isSingleItem': false, 'isMultipleItems': true, 'isError': false, 'isPage': false, 'isPost': false, 'isHomepage': false, 'isArchive': true, 'isLabelSearch': false, 'archive': {'year': 2009, 'rangeMessage': 'Showing posts from 2009'}}}]); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar', null, document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', null, document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', null, document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'useNgc': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/1477909662-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/368954415-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_FeedView', new _WidgetInfo('Feed1', 'sidebar', null, document.getElementById('Feed1'), {'title': 'R bloggers', 'showItemDate': true, 'showItemAuthor': true, 'feedUrl': 'http://feeds.feedburner.com/RBloggers', 'numItemsShow': 5, 'loadingMsg': 'Loading...', 'openLinksInNewWindow': true, 'useFeedWidgetServ': 'true'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label1', 'sidebar', null, document.getElementById('Label1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_GadgetView', new _WidgetInfo('Gadget1', 'sidebar', null, document.getElementById('Gadget1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList1', 'sidebar', null, document.getElementById('LinkList1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_FollowersView', new _WidgetInfo('Followers1', 'sidebar', null, document.getElementById('Followers1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar', null, document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar', null, document.getElementById('Profile1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'sidebar', null, document.getElementById('HTML1'), {}, 'displayModeFull'));