|
|
(8 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| {{Template:DLeBauer}} | | {{Template:DLeBauer}} |
| ==R==
| |
| ===public R packages===
| |
| *[http://had.co.nz/ggplot2/ '''ggplot2'''] simplifies graphical data visualization and presentation
| |
| *'''coda''' tools for analysis of mcmc chains
| |
| *'''randtoolbox''' has function for generating pseudo-random samples; the [http://en.wikipedia.org/wiki/Halton_sequence halton()] function produces a pseudo-random over-dispersed matrix that I use to sampling from the distributions of ~20 parameters used in ensemble runs of the [http://128.174.125.122/wiki/index.php/ED2_Documentation ED2 ecosystem model].
| |
| * '''adimpro''' for image analysis
| |
| <pre>
| |
| ##example R code for extracting jpg to N x M x 3 matrix
| |
| ##much slower than Matlab imread()
| |
| a <- read.image('file.jpg')
| |
| b <- extract.image(a)
| |
| red <- b[,,1]
| |
| green <- b[,,2]
| |
| blue <- b[,,3]
| |
| </pre>
| |
|
| |
| ===Custom R packages===
| |
| See the [http://cran.r-project.org/doc/manuals/R-exts.html Writing R Extensions] guides for more information.
| |
|
| |
| ===Latex and Sweave===
| |
|
| |
| <pre>
| |
| sudo apt-get install lyx
| |
| cd ~./lyx
| |
| wget http://cran.fhcrc.org/contrib/extra/lyx/preferences
| |
| cd layouts
| |
| wget http://cran.fhcrc.org/contrib/extra/lyx/literate*
| |
| wget http://cran.fhcrc.org/contrib/extra/lyx/literate-article.layout
| |
| wget http://cran.fhcrc.org/contrib/extra/lyx/literate-book.layout
| |
| wget http://cran.fhcrc.org/contrib/extra/lyx/literate-report.layout
| |
| wget http://cran.fhcrc.org/contrib/extra/lyx/literate-scrap.inc
| |
| cd ~/texmf/tex
| |
| wget http://www.biostat.jhsph.edu/~rpeng/ENAR2009/Sweave.sty
| |
| </pre>
| |
|
| |
| *start Lyx
| |
| **Preferences -> Reconfigure
| |
| *restart Lyx
| |
| **File -> new
| |
| **Document -> Settings
| |
| ***Document Class -> article (Sweave noweb)
| |
|
| |
| ==JAGS==
| |
| =====Installing JAGS=====
| |
| 1. download the file
| |
| <pre>
| |
| wget http://www-ice.iarc.fr/~martyn/software/jags/JAGS-<version>.tar.gz
| |
| </pre>
| |
| 2. unpack the gzipped file
| |
| <pre> tar xvfz JAGS-<version>.tar.gz</pre>
| |
| 3. change directory to folder with unpacked JAGS files
| |
| <pre> cd JAGS-<version></pre>
| |
| 4. Run configuration file to check system and set system dependent variables
| |
|
| |
| *optional, for consistency with the ebi-forecast and ebi-cluster servers: include the --prefix=/usr/ to specify JAGS install location, /usr/ is default on Red Hat, which runs the ebi-forecast server but /usr/local/ is the default installation folder on Ubuntu, so --prefix=/usr/ is required when installing on Ubuntu to mirror Red Hat.
| |
| <pre> ./configure --prefix=/usr</pre>
| |
| 5. build program
| |
| <pre> make</pre>
| |
| 6. install (requires root access)
| |
| <pre> sudo make install</pre>
| |
| 7. remove files no longer needed after installation
| |
| <pre> make clean
| |
| cd ..
| |
| rm -rf JAGS-<version> </pre>
| |
|
| |
| =====Specific Code for JAGS version 2.1.0=====
| |
| <pre>
| |
| wget http://www-ice.iarc.fr/~martyn/software/jags/JAGS-2.1.0.tar.gz
| |
| tar xvfz JAGS-2.1.0.tar.gz
| |
| cd JAGS-2.1.0/
| |
| ./configure --prefix=/usr
| |
| make
| |
| sudo make install
| |
| make clean
| |
| cd ..
| |
| rm -rf JAGS-2.1.0
| |
| </pre>
| |
| =====Installing Jags packages (rjags and R2jags) in R=====
| |
| <pre>
| |
| wget http://cran.r-project.org/src/contrib/R2jags_0.01-26.tar.gz
| |
| sudo R CMD INSTALL R2jags_0.01-26.tar.gz
| |
| wget http://cran.r-project.org/src/contrib/rjags_1.0.3-11.tar.gz
| |
| sudo R CMD INSTALL rjags_1.0.3-11.tar.gz
| |
| </pre>
| |
|
| |
| ==Kepler==
| |
| [https://kepler-project.org Kelper project homepage]
| |
|
| |
| download Kepler
| |
| <pre>
| |
| wget https://code.kepler-project.org/code/kepler/releases/installers/2.0/Kepler-2.0-linux.jar
| |
| Kepler-2.0-linux.jar
| |
| </pre>
| |
| follow the instructions to install Kepler, if installation does not begin, double-click on the file
| |
|
| |
| after installation, to use mysql with Open Database Connection actor, ''may'' need to download jar file for jdbc java connection
| |
|
| |
| <pre>
| |
| wget http://www.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.13.tar.gz/from/ftp://mirror.anl.gov/pub/mysql/
| |
| tar -zxf mysql-connector-java-5.1.13.tar.gz
| |
| cp mysql-connector-java-5.1.13/mysql-connector-java-5.1.13-bin.jar Kepler-2.0/
| |
| </pre>
| |