LeBauer:Software/Statistics

From OpenWetWare

(Difference between revisions)
Jump to: navigation, search
(JAGS)
(Latex and Sweave)
Line 18: Line 18:
===Custom R packages===
===Custom R packages===
See the [http://cran.r-project.org/doc/manuals/R-exts.html Writing R Extensions] guides for more information.
See the [http://cran.r-project.org/doc/manuals/R-exts.html Writing R Extensions] guides for more information.
-
 
-
==Latex and Sweave==
 
-
LaTeX plus Sweave facilitate documentation and reproduction of statistical analyses. I generally use Sweave and Latex in emacs, but I also find Lyx useful in some cases, and the learning curve is easier using the Lyx interface to Latex.
 
-
 
-
===Lyx and Sweave===
 
-
useful links:
 
-
[http://cran.fhcrc.org/contrib/extra/lyx/ lyx sweave repository]
 
-
[http://www.r-project.org/doc/Rnews/Rnews_2008-1.pdf R news article about Lyx 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)
 

Revision as of 12:46, 10 November 2010


Contents

R

public R packages

  • ggplot2 simplifies graphical data visualization and presentation
  • coda tools for analysis of mcmc chains
  • randtoolbox has function for generating pseudo-random samples; the 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 ED2 ecosystem model.
  • adimpro for image analysis
##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]

Custom R packages

See the Writing R Extensions guides for more information.


Kepler

Kelper project homepage

download Kepler

wget https://code.kepler-project.org/code/kepler/releases/installers/2.0/Kepler-2.0-linux.jar
Kepler-2.0-linux.jar

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

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/
Personal tools