Category Archives: Computation

Tuesday: pandoc citations notes, various

Mark­down over latex? knitr may have solved the fun­da­men­tal chal­lenge of all Sweave/latex users with Mark­down. Too many of us must be able to work with col­lab­o­ra­tors who don’t know LaTeX and jour­nals that won’t accept LaTeX. It’s a sad state of the affairs, and has improved slowly for jour­nals (at least many will take pdfs

Citations in markdown using knitr

I am find­ing myself more and more drawn to mark­down rather then tex/Rnw as my stan­dard for­mat (not least of which is the ease of dis­play­ing the files on github, par­tic­u­larly now that we have auto­matic image upload­ing). One thing I miss from latex is the cita­tion com­mands. (I under­stand these can be pro­vided to

Elegant & fast data manipulation with data.table

Just learned about the R data.table pack­age (ht @recology_) makes R data frames into ultra-fast, SQL-like objects. One thing we get is some very nice and pow­er­ful syn­tax. Con­sider some sim­ple data of repli­cate time series: To apply a func­tion to each set of repli­cates, instead of We can use: Note that we could have passed

Monday — Sweave workflow

Mendeley’s repeated entries in the bib­file is par­tic­u­larly annoy­ing with my sweave work­flow, as it throws an error from bib­tex com­mand that Make doesn’t want to ignore.

Also, in writ­ing the doc­u­men­ta­tion I’d like to point the .Rnw file to my global library’s bib­tex doc­u­ment, but then this means hav­ing the .Rnw/tex file gen­er­ated to by the pack­age point­ing to a file that’s out­side the package.

To get around both of these issues, I’ve started using bibtool. …

Better dynamic documents (Sweave) with syntax highlighting, caching, etc

The high­light pack­age is a sim­ple solu­tion for very nice syn­tax high­lighted code boxes in latex doc­u­ments.  Requires switch­ing the dri­ver, which is best done from within R and requires cre­at­ing a make­file though.  Needs the “high­light” pack­age installed.  Here’s a sim­ple make­file. A wealth/mess of Sweave related pack­ages on the CRAN taskview for Repro­ducible

Friday: wrightscape, ggplot, wp memory

more sub-model com­par­isons wrightscape sub-models: a1 inde­pen­dent alphas, global theta, sig­mas bm “brownie” (alpha = 0, indep sig­mas) a2 inde­pen­dent alpha, theta, global sigma s1 indep sigma, global alpha, theta s2 indep sigma, theta, global alpha Basic Nelder Mead Sim­u­lated anneal­ing asso­ci­ated para­me­ter esti­mates   This approach is really not find­ing a very robust solu­tion.

some configuration notes: RStudio setup, syntax highlighting in sweave

Installing R-Studio on my dreamhost VPS server. Dreamhost runs debian lenny, which is a bit dated, mak­ing it nec­es­sary to install from source. (Would be easy on a mod­ern ubuntu server). Here we go. First, we prob­a­bly want to install R from source to begin with (Lenny comes with cutting-edge R 2.7.1…). This needs to be

Parallel computing on clusters in R, MPI

Some notes for ref­er­ence on par­al­lel com­put­ing strate­gies on R with ded­i­cated high per­for­mance clus­ters. par­al­leliza­tion in R For clus­ter com­put­ing in R, I’ve found the “snow” pack­age with MPI to be the most flex­i­ble and robust solu­tion. snow­fall is a use­ful pack­age to use mul­ti­ple cores on a sin­gle proces­sor, but request­ing all 16 threads

Sunday

Com­put­ing notes A few con­fig­u­ra­tion related things from migrat­ing to the new lap­top. Clip­board and Vim vim clip­board — install vim-gnome ”+y and “+p inter­act between vim and global clip­board, and y, shift+insert work within ter­mi­nal. make a repos­i­tory bare so it can be pushed to (as opposed to mov­ing to it’s work­ing direc­tory and run­ning a

Sparkleshare configuration

Con­fig­ured sparkle­share across my linux server & lap­tops, and android phone.  Pro­vides a dropbox-style sync­ing and ver­sion his­tory for all files using git.  I can sync as much space as I have hardisk capac­ity, with as many users and machines as I like, at no cost.  Won­der­ful. Basic setup Get sparkle­share work­ing on a server