Category Archives: R

R Statistical Software, http://www.r-project.org

Time Series tips for R users

Two people were in here last week asking me about time series modeling in R. I said I’d look something up. I thought this was fabulously helpful for translating between R and time series books: http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm The leading authority on … Continue reading

Posted in R | Tagged | Leave a comment

RPM updates for RHEL6/Centos etc

Hello, Everybody This is an update notice/reminder. I’ve uploaded new Emacs and ESS for RedHat or Centos 6. And I also ask for bug reports, because of a question I will explain at the end. My goal: have reasonably up-to-date … Continue reading

Posted in R | Tagged , , | Comments Off on RPM updates for RHEL6/Centos etc

Build R RPMS on an older Fedora

I posted this in R-sig-fedora, or at least I thought I did. But the message did not appear. A user wanted an R-3.0.1 RPM for Fedora 17, which reached end of life. That wasn’t being provided by Fedora or Epel … Continue reading

Posted in R | Tagged , , | Comments Off on Build R RPMS on an older Fedora

R Bioconductor Install (or, where’s my “graph” package?)

Users reported that an R package I use, gRbase, “doesn’t work”. I had to watch them try it and read the error messages. When you try > install.packages(“gRbase”, dep = TRUE) The packages “gRbase” depends on other packages, like “graph”, … Continue reading

Posted in R | Tagged , | Comments Off on R Bioconductor Install (or, where’s my “graph” package?)

Big LyX Sweave output breakthrough

I’ve tried to set up LyX converters and copiers many times to achieve a particular result. Today I’ve succeeded for the very first time. From a single export, I want pdf output for a lecture article format output for the … Continue reading

Posted in LaTeX/Lyx, R | Comments Off on Big LyX Sweave output breakthrough

R package profiling with Google

I want to speed up R packages written with the Rcpp and RcppArmadillo packages. gprof is not an option because R is not compiled with -pg, and just re-compiling the shared libraries of the packages is insufficient. valgrind can generate … Continue reading

Posted in R | Tagged , | Comments Off on R package profiling with Google

fighting with sprof

$ export LD_PROFILE_OUTPUT=/tmp/oout $ export LD_PROFILE=`pwd`/Amelia.so $ mkdir -p /tmp/oout//home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs/ $ env | grep LD OLDPWD=/home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia LD_LIBRARY_PATH=/home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs LD_PROFILE=/home/pauljohn/R/x86_64-pc-linux-gnu-library/2.15/Amelia/libs/Amelia.so LD_PROFILE_OUTPUT=/tmp/oout After that $ R -f testfile.R If there is trouble, it looks like this: > library(Amelia) Loading required package: foreign Loading … Continue reading

Posted in R | Tagged , | Comments Off on fighting with sprof

Coercion of items in vector: peril and promise

### Filename: plotMathProblem.R ### Paul Johnson July 7, 2010 ### email me ### This is a tail of “coercion” of items in vectors. ### Run this code through and see if you can explain the ### puzzle at the end. … Continue reading

Posted in R | Comments Off on Coercion of items in vector: peril and promise

R: recover commands & track methods

http://tolstoy.newcastle.edu.au/R/help/05/09/12506.html From: Prof Brian Ripley Date: Thu 22 Sep 2005 – 19:10:08 EST The original reply was deliberately (I guess) vague. (I’ve removed the history, as attributions had already been removed, in violation of copyright law. If you cite someone, … Continue reading

Posted in R | Comments Off on R: recover commands & track methods