Re: [Rd] Issue with getParserData in R3.0.0

2013-01-15 Thread Duncan Murdoch

On 13-01-14 7:49 PM, Brian Lee Yung Rowe wrote:

Thanks that seems to work. It looks like other packages explicitly change this 
to FALSE, so I have to set this to TRUE for each function call. Is there any 
particular policy for packages that update this option? Should I restore the 
original value upon function exit?


Options belong to the user, not to you.  You should definitely save the 
old value and restore it when you're done.


Duncan Murdoch


Warm Regards,
Brian


On Jan 14, 2013, at 9:34 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote:


On 13-01-13 8:43 PM, Brian Lee Yung Rowe wrote: Hello,


I am migrating my package lambda.r to R3.0.0 and am experiencing some issues 
with the getParserData function (which replaces the parser package). Basically 
the function works in the R shell but fails when either called from RUnit or 
from R CMD check.

I've narrowed it down to the function getSrcfile, which is returning different 
values depending on the code path. From the command line (works okay):

debug: srcfile - getSrcfile(x)
Browse[2]
debug: if (is.null(srcfile)) return(NULL) else data - srcfile$parseData
Browse[2] srcfile
text

When running from the Runit script I get this instead:
debug: srcfile - getSrcfile(x)
Browse[3]
debug: if (is.null(srcfile)) return(NULL) else data - srcfile$parseData
Browse[3] srcfile
NULL


Below is an example calling the getParserData from the command line:

text - abs_max(a, b) %::% numeric:numeric:numeric
parse(text=text)

expression(abs_max(a, b) %::% numeric:numeric:numeric)

getParseData(parse(text=text))

 line1 col1 line2 col2 id parenttoken terminaltext
27 11 1   42 27  0 exprFALSE
14 11 1   13 14 27 exprFALSE
1  11 17  1  3 SYMBOL_FUNCTION_CALL TRUE abs_max
3  11 17  3 14 exprFALSE
2  18 18  2 14  '(' TRUE   (
4  19 19  4  6   SYMBOL TRUE   a
...

The RUnit call from the command line is
runTestFile('/home/brian/workspace/lambda.r/inst/unitTests/runit.dispatching.4.R')

and fails because of the NULL value of srcfile. The first line of the runit 
test file is
abs_max(a, b) %::% numeric:numeric:numeric

Any insights are appreciated.


I think in the case that is failing you just don't have any source info in the parse.  
parse() only installs it if the keep.source option is TRUE, and the default 
for that is the result of interactive().  So when you are not interactive you don't get 
source info.

You can fix it by explicitly setting options(keep.source=TRUE).

Duncan Murdoch





__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Who does develop the R core and libs, and how / where is it hosted?

2013-01-15 Thread Ben Bolker
Oliver Bandel oliver at first.in-berlin.de writes:

 Am 15.01.2013 um 01:11 schrieb Brian Lee Yung Rowe rowe at muxspace.com:
  On Jan 14, 2013, at 6:32 PM, oliver oliver at first.in-berlin.de wrote:

  BTW: I looked up the string wish list
  in some of the mentioned docs (mentioned in this thread)
  but did not found it.
  Can you please point me to it directly?
  Googling for R wish list brings me links to a producer of toys.
  

  [snip] 
  Is this what you're looking for: http://developer.r-project.org/ 
 (see TODO lists)

  But do note that most of of them are VERY old ... 
 
 This is at least some kind of thing yi was looking for.
 But these are personell TODO lists.
 Are their any goals for R as whole project?

  All in all it seems like no special things need to be done.
  The FSF for example has a page where they ask for support in certain areas,
  so, this looks rather urgent.
  R seems not to have such urgent needs for support

 [snip]

  These stack overflow questions might provide some useful
perspective (URLs broken to make Gmane happy -- sorry)

stackoverflow.com/questions/4054585/
 how-can-i-contribute-to-base-r-in-small-ways/

http://stackoverflow.com/questions/8065835/
  proposing-feature-requests-to-the-r-core-team/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Who does develop the R core and libs, and how / where is it hosted?

2013-01-15 Thread Hervé Pagès

Hi,

On 01/14/2013 05:04 PM, Simon Urbanek wrote:
[...]


Maybe it's a sign of a relative maturity of R that we don't have a particular 
milestone-like agenda.


There are many ways one can interpret the lack of an official roadmap
for a software project. However maturity is certainly not one I would
have thought of. But maybe I'm biased by having followed to many other
Open Source projects that do have a roadmap, regardless of whether they
consider themselves mature or not.


Typically, most things can be supplied as packages - the only reason to touch 
the core of R itself is if it is something that cannot be done as a package,


Or because it could be (and actually was) done as a package but for
some reasons it feels like it belongs to the core? Examples:
parallel, bitops, getParseData, etc...


and given R's modularity that is fortunately not very often the case.


Modularity would be even better if more things *in core* were made
generics. For example why the stuff in parallel was not made generic?
(at least S3 generic)

Thanks,
H.



Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] rpvm arch check

2013-01-15 Thread Michael Li
I've trying to fix the check error in rpvm package. Right now on my Mac, I
use darwinport to install PVM and I can get rpvm to pass the check using 'R
-arch x86_64 CMD check'. However the default 'R CMD check' uses i386 which
fails since PVM is built for x86_64 only.

So is there a way to ensure proper architecture is used that matches that
of the external library like PVM? What does CRAN use when it checks
packages?

Best, Michael

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-forge, package dependencies

2013-01-15 Thread Uwe Ligges



On 15.01.2013 20:47, Thomas Lumley wrote:

I have a project on R-forge (sqlsurvey.r-forge.r-project.org) with two
packages, RMonetDB and sqlsurvey.

At the moment, sqlsurvey is listed as failing to build.  The error is on
the Linux package check, which says that RMonetDB is not available:


* checking package dependencies ... ERROR
Package required but not available: ‘RMonetDB’

RMonetDB has built successfully: r-forge lists its status as 'current',
with Linux, Windows, and Mac packages available for download.  The package
check for sqlsurvey on Windows and Mac finds RMonetDB without any problems,
it's just on Linux that it appears to be unavailable.

Any suggestions for how to fix this? I've tried uploading a new version of
RMonetDB, but the situation didn't change: it built successfully, but the
Linux check of sqlsurvey still couldn't find it.



I think you have to ask Stefan to check the details.

Best,
Uwe



 -thomas




__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-forge, package dependencies

2013-01-15 Thread Nick Sabbe
I have exactly the same issue with a pair of my packages on R-Forge.
I've already notified Stefan, but I mentioned it wasn't urgent for  me :)

It must have something to do with the R check using a different environment
than the build...

So good hunting, Stefan!


Nick Sabbe
--
ping: nick.sa...@ugent.be
link: http://biomath.ugent.be
wink: A1.056, Coupure Links 653, 9000 Gent
ring: 09/264.59.36

-- Do Not Disapprove




-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
On Behalf Of Uwe Ligges
Sent: dinsdag 15 januari 2013 21:09
To: Thomas Lumley
Cc: Stefan Theussl; R-devel
Subject: Re: [Rd] R-forge, package dependencies



On 15.01.2013 20:47, Thomas Lumley wrote:
 I have a project on R-forge (sqlsurvey.r-forge.r-project.org) with two 
 packages, RMonetDB and sqlsurvey.

 At the moment, sqlsurvey is listed as failing to build.  The error is 
 on the Linux package check, which says that RMonetDB is not available:


 * checking package dependencies ... ERROR Package required but not 
 available: 'RMonetDB'

 RMonetDB has built successfully: r-forge lists its status as 
 'current', with Linux, Windows, and Mac packages available for 
 download.  The package check for sqlsurvey on Windows and Mac finds 
 RMonetDB without any problems, it's just on Linux that it appears to be
unavailable.

 Any suggestions for how to fix this? I've tried uploading a new 
 version of RMonetDB, but the situation didn't change: it built 
 successfully, but the Linux check of sqlsurvey still couldn't find it.


I think you have to ask Stefan to check the details.

Best,
Uwe


  -thomas




 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R-forge, package dependencies

2013-01-15 Thread Paul Gilbert
I'm surprised this works on Windows and Mac, since RMonetDB does not 
seem to be on CRAN. I thought it was still a requirement that 
dependencies need to be on CRAN (which makes development difficult for 
related packages like this).


A related long standing request is that R-forge checking look for 
required newer versions on R-forge rather than just on CRAN. Does anyone 
know if that works on Windows and/or Mac?


Paul

On 13-01-15 03:09 PM, Uwe Ligges wrote:



On 15.01.2013 20:47, Thomas Lumley wrote:

I have a project on R-forge (sqlsurvey.r-forge.r-project.org) with two
packages, RMonetDB and sqlsurvey.

At the moment, sqlsurvey is listed as failing to build.  The error is on
the Linux package check, which says that RMonetDB is not available:


* checking package dependencies ... ERROR
Package required but not available: ‘RMonetDB’

RMonetDB has built successfully: r-forge lists its status as 'current',
with Linux, Windows, and Mac packages available for download.  The
package
check for sqlsurvey on Windows and Mac finds RMonetDB without any
problems,
it's just on Linux that it appears to be unavailable.

Any suggestions for how to fix this? I've tried uploading a new
version of
RMonetDB, but the situation didn't change: it built successfully, but the
Linux check of sqlsurvey still couldn't find it.



I think you have to ask Stefan to check the details.

Best,
Uwe



 -thomas




__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Who does develop the R core and libs, and how / where is it hosted?

2013-01-15 Thread elijah wright
On Tue, Jan 15, 2013 at 12:46 PM, Hervé Pagès hpa...@fhcrc.org wrote:


  and given R's modularity that is fortunately not very often the case.


 Modularity would be even better if more things *in core* were made
 generics. For example why the stuff in parallel was not made generic?
 (at least S3 generic)


The better to give interesting people GSoC projects with, of course!  ;-)

... nearly everyone appreciates patches that improve their projects to
noticeable benefit.  If you like parallel better a different way... collude
and make it rock.

best,

--e

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Prevent serialization of an environment?

2013-01-15 Thread Peter Meilstrup
Within I'm using an environment as a hashtable to cache the results of some
repeated computations in a package. The thing is that the contents of the
cache will not be valid across R sessions, so I would like to make sure
that the cache is cleared if the user saves or restores the workspace (or
when a package is prepared for lazy loading, etc.). Is there a way to mark
an environment so that its contents do not serialize?

Peter

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Prevent serialization of an environment?

2013-01-15 Thread Duncan Murdoch

On 13-01-15 7:39 PM, Peter Meilstrup wrote:

Within I'm using an environment as a hashtable to cache the results of some
repeated computations in a package. The thing is that the contents of the
cache will not be valid across R sessions, so I would like to make sure
that the cache is cleared if the user saves or restores the workspace (or
when a package is prepared for lazy loading, etc.). Is there a way to mark
an environment so that its contents do not serialize?



Seems like the refhook argument to serialize() could do that.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Prevent serialization of an environment?

2013-01-15 Thread Peter Meilstrup
On Tue, Jan 15, 2013 at 4:55 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote:

 On 13-01-15 7:39 PM, Peter Meilstrup wrote:

 Within I'm using an environment as a hashtable to cache the results of
 some
 repeated computations in a package. The thing is that the contents of the
 cache will not be valid across R sessions, so I would like to make sure
 that the cache is cleared if the user saves or restores the workspace (or
 when a package is prepared for lazy loading, etc.). Is there a way to mark
 an environment so that its contents do not serialize?


 Seems like the refhook argument to serialize() could do that.

 Duncan Murdoch


But I don't see where e.g. save() allows specifying which refhook to use
(or more generally how to ensure that the user always supplies an
appropriate refhook.) Or how to tell R CMD BUILD to use a refhook. Unless I
misunderstand when refhook comes into play.

One example of the kind of thing I'm looking for is in Matlab, where you
can have loadobj() or saveobj() methods; if a class has these methods they
will be used to mangle objects of that class as they are de/serialized.

Peter

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] rpvm arch check

2013-01-15 Thread Simon Urbanek
On Jan 15, 2013, at 2:24 PM, Michael Li wrote:

 I've trying to fix the check error in rpvm package. Right now on my Mac, I 
 use darwinport to install PVM and I can get rpvm to pass the check using 'R 
 -arch x86_64 CMD check'. However the default 'R CMD check' uses i386 which 
 fails since PVM is built for x86_64 only.
 
 So is there a way to ensure proper architecture is used that matches that of 
 the external library like PVM? What does CRAN use when it checks packages?
 

We use static builds which have all necessary architectures (so users don't 
need to install them and can use any architecture).

Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Who does develop the R core and libs, and how / where is it hosted?

2013-01-15 Thread Hervé Pagès

On 01/15/2013 03:25 PM, elijah wright wrote:




On Tue, Jan 15, 2013 at 12:46 PM, Hervé Pagès hpa...@fhcrc.org
mailto:hpa...@fhcrc.org wrote:

and given R's modularity that is fortunately not very often the
case.


Modularity would be even better if more things *in core* were made
generics. For example why the stuff in parallel was not made generic?
(at least S3 generic)


The better to give interesting people GSoC projects with, of course!  ;-)

... nearly everyone appreciates patches that improve their projects to
noticeable benefit.  If you like parallel better a different way...
collude and make it rock.


Sure. And in that particular case the patch wouldn't be hard to produce.

My comment was more in the context of the roadmap discussion. So to
make my point clear I believe that having an official public roadmap
can't hurt, even for a project that has reached some level of maturity.
One obvious benefit is that it provides more opportunity for
discussion/suggestions/input between the community and R core
*before* things happen.
In the case of the parallel package, maybe there are good reasons
for not making the stuff in parallel generic, I don't know. I could
go ahead and start working on a patch now, living in my own world,
following my own dream, but I'd rather try to discuss this a little
bit before. Don't you think?

To make my point even clearer, I think having a public roadmap is by
itself a sign of maturity. Rather than not having one.

Cheers,
H.



best,

--e


--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Prevent serialization of an environment?

2013-01-15 Thread Peter Meilstrup
OK. Based on comments in serialize.c, this sort of thing isn't
available(yet). However, I also came to the conclusion that for my purposes
(caching functions-of existing R objects) I might implement the cache not
with an environment but with the weak-reference facility exposed in the C
interfaces.

Thanks to those who replied!

Peter

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel