[R] type conversion

2012-03-04 Thread Matyas Sustik
Hi All, I am confused by a type conversion happening against my intent. In an R script I allocate a matrix X, and I pass it to a C function by using tmp -< .C(..., as.double(X),...). I use as.double() because I read that it makes sure that the parameter passing is correct. I return the matrix

[R] How can the citation to be included in the manual for a package?

2012-02-27 Thread Matyas Sustik
Hi All, I have a CITATION file in inst for my package, however I would like to have our relevant paper to show up in the package documentation file as well. I tried to put the paper in the Description field but that does not seem to allow formatting (like a new line before the reference) it is a s

[R] R package documentation

2012-02-24 Thread Matyas Sustik
Hi All, I am asking for some clarification on R package documentation. The Writing R extension manual did not make this clear for me the following: 1. How to document a dataset? I know the file format from the doc, but I cannot figure out what file to put that info in. I keep getting "Undocument

[R] Use of .C and .Call

2012-02-23 Thread Matyas Sustik
Hi All, The Writing R-extensions document says this on whether I should prefer .C or .Call: "Before you decide to use .Call or .External, you should look at other alternatives. First, consider working in interpreted R code; if this is fast enough, this is normally the best option. You should a

Re: [R] Author@R

2012-02-05 Thread Matyas Sustik
Thanks for the quick response! That is exactly what I was looking for. On Sun, Feb 5, 2012 at 4:34 PM, Achim Zeileis > There is an introduction in the following report: > http://epub.wu.ac.at/3269/ [...] > Authors@R: c(person(given = "John", family = "Doe", role = "aut"), >  person(given = "Jane"

[R] revision tags in package files

2012-02-05 Thread Matyas Sustik
Hi All, I am building my first package. I have the files under revision control. Normally, I have a $Id$ tag in my files which expand by my editor and so the current revision etc. I tried to add it to the DESCRIPTION file by having the first line to be: # $Id$ R CMD build complained. I hoped

Re: [R] Makefile to compile .so in src (was: Re: automated libR location)

2012-02-05 Thread Matyas Sustik
Hi Uwe, > 1. I don't believe you really need all the flags from above. If so, within a > package, use a Makevars file. > > 2. R CMD SHLIB QUIC.cpp shoudl do the trick already, perhaps some linker > flags are required for blas that can be specified in the same line, see R > CMD SHLIB --help Thanks

[R] Author@R

2012-02-05 Thread Matyas Sustik
Hi All, Could someone point me to an example on how to use Author@R in a package DESCRIPTION file? Say with 2 authors: John Doe and Jane Doe, the latter is a maintainer which could replace: Author: John Doe, Jane Doe Maintainer: Jane Doe "Both ‘Author’ and ‘Maintainer’ can be omitted (as from R

[R] Makefile to compile .so in src (was: Re: automated libR location)

2012-01-31 Thread Matyas Sustik
Prof Brian Ripley wrote: > 'library' in R has a different meaning: I've altered the subject to be > more accurate 'libR'. > > This is what R CMD SHLIB is for: it does all this for you in a portable way. > > But if you want to DIY, you can use R CMD config to find out the > appropriate linker incant

[R] automated library location

2012-01-27 Thread Matyas Sustik
Hi All, Is there a way to find out the R library location that I could use in a script or Makefile? For example for octave the mkoctfile compiler has the following feature: Well? > mkoctfile -p LFLAGS -L/usr/lib/octave-3.2.4 This is quite useful to be used in Makefiles. I am compiling a dynami