Dear Dirk,

Am Samstag, den 26.11.2011, 12:42 -0600 schrieb Dirk Eddelbuettel:
> On 26 November 2011 at 18:57, Paul Menzel wrote:
> | Package: littler
> | Version: 0.1.5-1
> | Severity: normal
> | 
> | Dear Debian folks,
> 
> There is a single maintainer for the littler package, and his name is Dirk.

I am sorry. I used that term because all Debian developers and users
should try to fix bugs. And sometimes the maintainers are not as devoted
as you are.

> | since the package rbenchmark is not packaged in Debian I installed it using 
> `install.packages()`. Then it was installed in my home directory I believe.
> 
> Your problem. Always check what .libPaths() says:
> 
> edd@max:~$ r -e 'print(.libPaths())'
> [1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"      
> [3] "/usr/lib/R/library"           
> edd@max:~$ 

It says the same on my system.

> So on my system an installation __done with littler__ goes to 
> /usr/local/lib/R/site-library

Well, since I have not changed anything by default using
`install.packages()` it goes into `~/R/i486-pc-linux-gnu-library/2.14/`.

> In fact littler comes with two short example scripts 'install.r' and
> 'update.r' I use all the time.  Eg (for a not-required re-installation:)
> 
> edd@max:~$ ~/bin/install.r rbenchmark
> trying URL 'http://cran.r-project.org/src/contrib/rbenchmark_0.3.tar.gz'
> Content type 'application/x-gzip' length 3504 bytes
> opened URL
> ==================================================
> downloaded 3504 bytes
> 
> * installing *source* package ‘rbenchmark’ ...
> ** R
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
> 
> * DONE (rbenchmark)
> 
> The downloaded packages are in
>         ‘/tmp/downloaded_packages’
> edd@max:~$ r -lrbenchmark -e 'res <- benchmark(function() {}); print(res)'
>           test replications elapsed relative user.self sys.self user.child
> 1 function() {          100   0.001        1         0        0          0
>   sys.child
> 1         0
> edd@max:~$ 

I did not know about these scripts and that they should be used for
installing packages. See #648981 [3].

> | Executing `R` and then `library(rbenchmark)` works.
> | 
> | Now I wanted to try `fibonacci.r` from the examples of the Rcpp package 
> (`r-cran-rcpp` [2]).
> | 
> |         $ cp /usr/lib/R/site-library/Rcpp/examples/Misc/fibonacci.r /tmp/
> |         $ r fibonacci.r # includes `library(rbenchmark)`
> | 
> | This aborts with an error that the package `rbenchmark` cannot be found.
> | 
> |         $ LANG=C r fibonacci.r 
> |         Loading required package: inline
> |         Loading required package: methods
> |         Loading required package: compiler
> |         Error in library(rbenchmark) : there is no package called 
> 'rbenchmark'
> |         Execution halted
> | 
> | Is littler supposed to work in such a setup?
> 
> Well, yes. I use littler for all the blog posts you refer to.
> 
> Read help(Startup) and figure out your paths.
> 
> Not a bug. Next time, just ask on r-sig-debian, please.

Is there a way to get that working by default? Should the path `~/R/`
which gets used by default for installing packages be added somewhere?
Or a new item to the FAQ in `README.gz`?


> Mit besten Gruessen,   Dirk

Groetjes, beste,

Paul


> | [1] http://dirk.eddelbuettel.com/blog/2011/09/08/
> | [2] http://packages.debian.org/search?keywords=r-cran-rcpp
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648981

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to