Re: [Rd] Question on parsing R code from C

2011-11-08 Thread Simon Urbanek
On Nov 8, 2011, at 6:53 PM, KR wrote: > Simon Urbanek r-project.org> writes: >> Except that you don't know what are macros, inlined functions and actual > functions. If you are careful you >> can possibly fall back to external functions but, obviously, your code will >> be > less efficient. I

Re: [Rd] Accessing ENVSXP and CLOSXP while processing parsed R code

2011-11-08 Thread Rob Anderson
Thanks! that was useful Rob On Mon, Nov 7, 2011 at 6:49 AM, Duncan Murdoch wrote: > On 11-11-07 5:24 AM, Rob Anderson wrote: > >> Hello Guys, >> >> Following up my earlier mail where I am trying to write an alternative >> front-end for R, I had a question about accessing the closures and >> env

Re: [Rd] Question on parsing R code from C

2011-11-08 Thread Rob Anderson
Hi, With respect to initializing R state and parsing, you might want to look at the "Linking GUI's and other front-ends to R" section in Writing R Extensions . Once the initialization is done, you can use mkString() function to get an input SEXP f

Re: [Rd] Question on parsing R code from C

2011-11-08 Thread KR
Simon Urbanek r-project.org> writes: > Except that you don't know what are macros, inlined functions and actual functions. If you are careful you > can possibly fall back to external functions but, obviously, your code will > be less efficient. I would > still prefer including Rinternals.h - yo

Re: [Rd] Question on parsing R code from C

2011-11-08 Thread Simon Urbanek
On Nov 8, 2011, at 4:57 PM, KR wrote: > Simon Urbanek r-project.org> writes: >> I'm not sure I understand this really - it doesn't define SEXP. I would >> expect > something like >> >> typedef void *SEXP; >> >> Which may work for declarations. Note, however, that for the actual code > you'l

Re: [Rd] Question on parsing R code from C

2011-11-08 Thread KR
Simon Urbanek r-project.org> writes: > I'm not sure I understand this really - it doesn't define SEXP. I would > expect something like > > typedef void *SEXP; > > Which may work for declarations. Note, however, that for the actual code you'll need to include the headers anyway. Thanks for th

Re: [Rd] Question on parsing R code from C

2011-11-08 Thread Simon Urbanek
On Nov 8, 2011, at 2:42 PM, KR wrote: > Hi all, > > I am facing the necessity to parse R code from C-side. As a first > approximation > the goal would be a re-implementation of the R shell (not Rgui). > > I read the document at http://cran.r-project.org/doc/manuals/R-exts.html > section > 5

[Rd] Question on parsing R code from C

2011-11-08 Thread KR
Hi all, I am facing the necessity to parse R code from C-side. As a first approximation the goal would be a re-implementation of the R shell (not Rgui). I read the document at http://cran.r-project.org/doc/manuals/R-exts.html section 5.12, and the related source code example. I have some que

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Uwe Ligges
On 08.11.2011 19:08, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: On 08.11.2011 17:56, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: On 08.11.2011 17:04, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: On 08.11.2011 16:31, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: I

Re: [Rd] NAMESPACES for data only packages

2011-11-08 Thread Prof Brian Ripley
Can we clarify: As the NEWS says, to install a data-only package under 2.14.0 you need a namespace. And if you do not give one installation will create one. However, you can use an already-installed data-only package without a namespace under 2.14.x, but not under R-devel. This is to allow

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 17:56, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> >>> On 08.11.2011 17:04, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: > > > On 08.11.2011 16:31, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>>

Re: [Rd] NAMESPACES for data only packages

2011-11-08 Thread Joshua Wiley
Hi Michael, You are correct that data does not *have* to be exported. For example, here is the contents of NAMESPACE for the datasets package from a recent devel version: # This package exports nothing (it uses lazydata) # exportPattern(".") Cheers, Josh On Tue, Nov 8, 2011 at 9:11 AM, Michae

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Uwe Ligges
On 08.11.2011 17:56, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: On 08.11.2011 17:04, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: On 08.11.2011 16:31, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: I think many people like to help, but we cannot: You say you are under R-2.

[Rd] NAMESPACES for data only packages

2011-11-08 Thread Michael Friendly
the NEWS file for R-devel says * Even data-only packages without *R* code need a namespace and so may need to be installed under *R* 2.14.0 or later. but what should this contain? Can it simply be an empty NAMESPACE file? I assume that data does not have to be exported. -Michael

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 17:04, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> >>> On 08.11.2011 16:31, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: > > I think many people like to help, but we cannot: > > You say you are under R-2.14.0

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Uwe Ligges
On 08.11.2011 17:04, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: On 08.11.2011 16:31, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: I think many people like to help, but we cannot: You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that version of R, it does n

Re: [Rd] CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?

2011-11-08 Thread Claudia Beleites
Hi, here's what I do: I have two vignettes that are actually proper .Rnw files but the size of the data used is not acceptable for CRAN nor polite to any unsuspecting user. So - (I provide the original .Rnw and the data for download at r-forge) - produce a .pdf from there in a directory exte

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > > > On 08.11.2011 16:31, Gabor Grothendieck wrote: >> >> 2011/11/8 Uwe Ligges: >>> >>> I think many people like to help, but we cannot: >>> >>> You say you are under R-2.14.0 and whn you R CMD INSTALL a package with >>> that >>> version of R, it does not have a NAMESPACE in

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Uwe Ligges
On 08.11.2011 16:31, Gabor Grothendieck wrote: 2011/11/8 Uwe Ligges: I think many people like to help, but we cannot: You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that version of R, it does not have a NAMESPACE in the end? Then - your R installation is broken or

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
On Tue, Nov 8, 2011 at 10:31 AM, Gabor Grothendieck wrote: > 2011/11/8 Uwe Ligges : >> I think many people like to help, but we cannot: >> >> You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that >> version of R, it does not have a NAMESPACE in the end? >> Then >> >>  - your

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Gabor Grothendieck
2011/11/8 Uwe Ligges : > I think many people like to help, but we cannot: > > You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that > version of R, it does not have a NAMESPACE in the end? > Then > >  - your R installation is broken or >  - you are looking into a library wher

Re: [Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Uwe Ligges
I think many people like to help, but we cannot: You say you are under R-2.14.0 and whn you R CMD INSTALL a package with that version of R, it does not have a NAMESPACE in the end? Then - your R installation is broken or - you are looking into a library where you have old versios of the pac

[Rd] NAMESPACE file generation issue R 2.14.0 on Debian Squeeze

2011-11-08 Thread Art Eschenlauer
When I did install.packages("sqldf") on Windows and Mac OSX, it installed fine. However, when I did it on my Debian Squeeze box under R 2.14.0, it failed. I discovered that three of the dependent packages, chron, proto, and gsubfn, do not include a NAMESPACE file in their distribution tar.gz files.