[Rd] make check fails in r49613
Hi, I am reporting what seems to be a trivial error in one of the test files (this has been failing for a few days for me): Collecting examples for package 'tools' Running examples in package 'tools' Error: testing 'tools' failed Execution halted gmake[3]: *** [test-Examples-Base] Error 1 gmake[3]: Leaving directory `/usr/local/share/R-devel/tests/Examples' gmake[2]: *** [test-Examples] Error 2 gmake[2]: Leaving directory `/usr/local/share/R-devel/tests' gmake[1]: *** [test-all-basics] Error 1 gmake[1]: Leaving directory `/usr/local/share/R-devel/tests' gmake: *** [check] Error 2 erdos# tail /usr/local/share/R-devel/tests/Examples/tools-Ex.Rout.fail > ### ** Examples > > ## Build the Rd db for the (installed) base package. > db <- Rd_db("base") > ## Run Rd_parse on all entries in the Rd db. > db <- lapply(db, function(txt) Rd_parse(text = txt)) Error: 'Rd_parse' is defunct. Use 'parse_Rd' instead. See help("Defunct") Execution halted > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) x86_64-unknown-freebsd9.0 locale: [1] C attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base h. -- +--- | Hiroyuki Kawakatsu | Business School, Dublin City University | Dublin 9, Ireland. Tel +353 (0)1 700 7496 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Running two R instances at the same time
On Mon, Sep 7, 2009 at 4:47 PM, Andrew Piskorski wrote: > On Sat, Sep 05, 2009 at 08:31:18PM +0200, Peter Juhasz wrote: > >> I don't understand how is this possible. Maybe there is an issue of >> thread-safety with the R backend, meaning that the two R *interpreter* >> instances are talking to the same backend that's capable of processing >> only one thing at a time? > > No. Particularly since there is no R "backend" involved at all, not > if you're starting up the standard R from Ubuntu 9.04 (rather than > Rserve or something else unusual). People run multiple R processes > concurrently on the same (multi-core) machine all the time, works > fine. > >> Please see http://www.perlmonks.org/?node_id=792460 for an extended >> discussion of the problem, and especially >> http://www.perlmonks.org/?node_id=793506 for excerpts of output and >> actual code. > > The most likely explanation seems to be that you have a bug in your > Perl code. Have you tried using your Perl framework to fork something > OTHER than R? Have you tried manually starting up two R processes and > running your R code that way? And, what is the actual R code you're > running? You don't seem to have shown it anywhere. > > -- > Andrew Piskorski > http://www.piskorski.com/ > Actually, I have ran some tests that clarified the issue somewhat. - It is always possible that my Perl code is buggy but that doesn't seem to play a role in this case. - I tried to use my Perl system to start two non-R processes - it worked as expected, they ran concurrently without ill effects. But please see http://www.perlmonks.org/index.pl?node_id=793907 , where I posted my R code in its simplest form along with an example run which exhibits the symptoms I originally wrote about. >From that test I conclude that it is not my Perl code nor R itself that is wrong here, but the specific package I use. That package - NADA, from which I use the 'cenros' command - seems to be the culprit. Please forgive my complete lack of experience when it comes to R, this made me assume things that didn't make sense. Péter Juhász __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] [R] Usage of OCaml/R binding.
Hello. Since nobody answered this on R-help@, I thought I'd push it through to r-de...@. By the way, here's the webpage (in french) for the Debian package of Maxence Guesdon's OCaml/R bindings: http://yziquel.homelinux.org/topos/debian-ocamlr.html http://yziquel.homelinux.org/debian/pool/main/o/ocaml-r/ Guillaume Yziquel a écrit : Hello. I've been pulling together a Debian package out of Maxence Guesdon's OCaml bindings for R. Will be available from my website as soon as I get my router to obey me. Here's Maxence's bindings: http://pauillac.inria.fr/~guesdon/ocaml-r.en.html The purpose of this software is to access R from OCaml programs. However, my issue is that after having pulled things to a Debian package, I am completely unfamiliar with the API, and I'm having trouble initialising this module. You'll find below a list of the functions accessible from Maxence Guesdon's R module (there's also a Rmath module for the math library which I'm not yet concerned about). I'd specifically appreciate information on how to get started using these R API functions. If you're scared about OCaml, simply look at the two declarations below in the following way: external init_r : string array -> int = "init_r" 'external' means that this value is to be fetched by linking C code identified by the '= "init_r"' ending statement. Typically, 'external' values wrap the API functions. So this value is called init_r, and takes an array of strings as first argument, and yields back an integer. val init : ?argv:string array -> unit -> int 'val' means that it is a standard OCaml value. It's called init. And its type is 'I take an array of strings as first argument, then a unit ( think of it a C void value containing nothing), and I get back an integer. The '?argv:' stuff is concerned with optional arguments, so no real big deal. Documentation and examples of how the API works to embed R in an application would be highly appreciated. Please forward this email to R-dev if you feel it belongs there. All the best, Guillaume Yziquel. yziq...@seldon:~/sandbox/repo/debian/debian-ocaml/ocaml-r$ ocaml-batteries Objective Caml version 3.11.1 _ | | | | [| + | | Batteries Included - | |___|_|___| _ | | | | | -Type '#help;;' | | + |] |___|_|___| # #rectypes;; # #require "R";; # module X = R;; module X : sig external init_r : string array -> int = "init_r" val init : ?argv:string array -> unit -> int external terminate : unit -> unit = "end_r" type sexp = R.sexp type symbol = string type arg = [ `Anon of sexp | `Named of sexp * symbol ] external sexp : string -> sexp = "r_sexp_of_string" external sexp_of_symbol : symbol -> sexp = "r_sexp_of_symbol" external set_var : symbol -> sexp -> unit = "r_set_var" external r_print_value : sexp -> unit = "r_print_value" external exec : string -> arg array -> unit = "r_exec" external current_test : unit -> unit = "r_current_test" external to_bool : sexp -> bool = "bool_of_sexp" external to_int : sexp -> int = "int_of_sexp" external to_float : sexp -> float = "float_of_sexp" external to_string : sexp -> string = "string_of_sexp" external of_bool : bool -> sexp = "sexp_of_bool" external of_int : int -> sexp = "sexp_of_int" external of_float : float -> sexp = "sexp_of_float" external of_string : string -> sexp = "sexp_of_string" external to_bool_array : sexp -> bool array = "bool_array_of_sexp" external to_int_array : sexp -> int array = "int_array_of_sexp" external to_float_array : sexp -> float array = "float_array_of_sexp" external to_string_array : sexp -> string array = "string_array_of_sexp" external of_bool_array : bool array -> sexp = "sexp_of_bool_array" external of_int_array : int array -> sexp = "sexp_of_int_array" external of_float_array : float array -> sexp = "sexp_of_float_array" external of_string_array : string array -> sexp = "sexp_of_string_array" external get_attrib : sexp -> string -> sexp = "r_get_attrib" val dim : sexp -> int array val dimnames : sexp -> string array end # -- Guillaume Yziquel http://yziquel.homelinux.org/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] make check fails in r49613
I have successfully build r49614 this morning. Have you tried to do a clean build from a fresh source directory? Do you have some library with old packages in your search path? Uwe Ligges Hiroyuki Kawakatsu wrote: Hi, I am reporting what seems to be a trivial error in one of the test files (this has been failing for a few days for me): Collecting examples for package 'tools' Running examples in package 'tools' Error: testing 'tools' failed Execution halted gmake[3]: *** [test-Examples-Base] Error 1 gmake[3]: Leaving directory `/usr/local/share/R-devel/tests/Examples' gmake[2]: *** [test-Examples] Error 2 gmake[2]: Leaving directory `/usr/local/share/R-devel/tests' gmake[1]: *** [test-all-basics] Error 1 gmake[1]: Leaving directory `/usr/local/share/R-devel/tests' gmake: *** [check] Error 2 erdos# tail /usr/local/share/R-devel/tests/Examples/tools-Ex.Rout.fail ### ** Examples ## Build the Rd db for the (installed) base package. db <- Rd_db("base") ## Run Rd_parse on all entries in the Rd db. db <- lapply(db, function(txt) Rd_parse(text = txt)) Error: 'Rd_parse' is defunct. Use 'parse_Rd' instead. See help("Defunct") Execution halted sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) x86_64-unknown-freebsd9.0 locale: [1] C attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base h. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] OS X PDF bug (PR#13943)
On Sep 7, 2009, at 4:37 AM, Prof Brian Ripley wrote: > My guess is quartz() and that this is nothing to do with R but with > copying in Mac OS X from a quartz() window. Saving to a file from the quartz window also produces a PDF that is viewable but not printable by Preview, and Acrobat too. I suppose it could be the printer driver, though that means that R is guilty of putting out some pretty exotic Postscript. I'm hoping someone else sees this or doesn't so I can pin it down. Paul >> par(mfrow=c(2,2)) >> y<-1:20 >> plot(y, pch="+") >> plot(y, pch="+") >> plot(y, pch="+") >> plot(y, pch="+") >> >> produces a pdf that is viewable in Preview (copied from the >> clipboard) but fails to print. >> >> pch default or ="." or =3 prints. >> >> Unfortunately pch=3 doesn't fix the mfrow=c(5,6) graph that I'm >> actually trying to print, >> so the bug lies somewhere deeper. > > Why not use pdf()? That works for me (but then I don't have your > printer drivers). > >> OS X 10.4.11 >> R 2.9.2 GUI 1.29 Tiger build 32-bit (5464) >> Laserjet 5MP >> >> Paul McGuire > > -- > Brian D. Ripley, rip...@stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] make check fails in r49613
On 08/09/2009 6:32 AM, Hiroyuki Kawakatsu wrote: 2009/9/8 Uwe Ligges wrote: I have successfully build r49614 this morning. Have you tried to do a clean build from a fresh source directory? Do you have some library with old packages in your search path? Ah, thanks for this. After removing library/ and rebuilding, I now pass -(g)make check-. I now see the message 'Extracting from parsed Rd's' which i didn't see before. And I now vaguely recall seeing something about the new Rd conversion mechanism. R-admin recommends not to build in the top-level source directory (which I do) when working with svn. Does this mean that after I check out from svn, I now need to remove library/ every time before I do -make- and -make check-? Or is this a one-time thing? Somewhere between. It's usually okay to build there, but not always. When things get weird, it's worth doing a clean build just to check if you're in one of the cases where it's not okay. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] make check fails in r49613
Hiroyuki Kawakatsu wrote: 2009/9/8 Uwe Ligges wrote: I have successfully build r49614 this morning. Have you tried to do a clean build from a fresh source directory? Do you have some library with old packages in your search path? Ah, thanks for this. After removing library/ and rebuilding, I now pass -(g)make check-. I now see the message 'Extracting from parsed Rd's' which i didn't see before. And I now vaguely recall seeing something about the new Rd conversion mechanism. R-admin recommends not to build in the top-level source directory (which I do) when working with svn. Does this mean that after I check out from svn, I now need to remove library/ every time before I do -make- and -make check-? Or is this a one-time thing? Not a one-time thing, it depends on the changes in the soucres, and most of the days it works, but sometimes after more serious changes not. make clean might help, but I prefer to copy from my svn checkout to another directory and build there. Uwe Ligges h. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] make check fails in r49613
2009/9/8 Uwe Ligges wrote: > I have successfully build r49614 this morning. Have you tried to do a clean > build from a fresh source directory? Do you have some library with old > packages in your search path? Ah, thanks for this. After removing library/ and rebuilding, I now pass -(g)make check-. I now see the message 'Extracting from parsed Rd's' which i didn't see before. And I now vaguely recall seeing something about the new Rd conversion mechanism. R-admin recommends not to build in the top-level source directory (which I do) when working with svn. Does this mean that after I check out from svn, I now need to remove library/ every time before I do -make- and -make check-? Or is this a one-time thing? h. -- +--- | Hiroyuki Kawakatsu | Business School, Dublin City University | Dublin 9, Ireland. Tel +353 (0)1 700 7496 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Reissue: Base "Object" class to use in S4 slot specification
On Sep 8, 2009, at 12:39 , Simon Urbanek wrote: On Sep 8, 2009, at 12:14 , Patrick Aboyoun wrote: This is a reissue of a question I had asked a few weeks ago to see if anyone had any thoughts on the matter. I am looking to have slot in an S4 class definition that can take any (S3 or S4) object. The ANY class seemed to be a good candidate, but the is() function definition performs an S3Case test before checking if methods:::.identC(class2, "ANY"). The result is the is() function does not consider various S3 objects to be of class ANY. Yes, but how is that relevant to your question? A slot defined as "ANY" will accept any type in R: > setClass("foo",representation(a="ANY")) [1] "foo" > new("foo",a=factor()) An object of class "foo" Slot "a": factor(0) Levels: "ANY" is not an S4 class (and neither are various other types in R), so is() correctly returns FALSE. Ok, sorry, the last sentence is false - "ANY" is a virtual S4 class, so it will return TRUE for S4 classes and FALSE for any other object. Cheers, Simon > is(factor(), "ANY") [1] FALSE > is(lm(I(1:10) ~ rnorm(10)), "ANY") [1] FALSE > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base What is the recommended base "Object" class I should define my slot to be so it can accept any object? Patrick __ 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
[Rd] Reissue: Base "Object" class to use in S4 slot specification
This is a reissue of a question I had asked a few weeks ago to see if anyone had any thoughts on the matter. I am looking to have slot in an S4 class definition that can take any (S3 or S4) object. The ANY class seemed to be a good candidate, but the is() function definition performs an S3Case test before checking if methods:::.identC(class2, "ANY"). The result is the is() function does not consider various S3 objects to be of class ANY. > is(factor(), "ANY") [1] FALSE > is(lm(I(1:10) ~ rnorm(10)), "ANY") [1] FALSE > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base What is the recommended base "Object" class I should define my slot to be so it can accept any object? Patrick __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] question about ... passed to two different functions
> -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Charles Geyer > Sent: Monday, September 07, 2009 1:39 PM > To: r-devel@r-project.org > Subject: Re: [Rd] question about ... passed to two different functions > > Many thanks to those (Martin Morgan, Duncan Murdoch) who > tried to straighten > me out on ... arguments. It didn't work until I accidentally > made two examples > I thought were the same but one worked and the other didn't. > Finally I > achieved enlightenment. The following section has been added to the > help page for the metrop function and will appear on CRAN > when I get finished > with the simulated tempering function. > > \section{Warning}{ > If \code{outfun} is missing or not a function, then the log > unnormalized > density can be defined without a \ldots argument and that works fine. > One can define it starting \code{ludfun <- function(state)} > and that works > or \code{ludfun <- function(state, foo, bar)}, where > \code{foo} and \code{bar} > are supplied as additional arguments to \code{metrop}. > > If \code{outfun} is a function, then both it and the log unnormalized > density function can be defined without \ldots arguments \emph{if they > have exactly the same arguments list} and that works fine. > Otherwise it > doesn't work. Start the definitions \code{ludfun <- > function(state, foo)} > and \code{outfun <- function(state, bar)} and you get an error about > unused arguments. Instead start the definitions > \code{ludfun <- function(state, foo, \ldots)} > and \code{outfun <- function(state, bar, \ldots)}, supply > \code{foo} and \code{bar} as additional arguments to \code{metrop}, > and that works fine. > > In short, the log unnormalized density function and \code{outfun} need > to have \ldots in their arguments list to be safe. Sometimes it works > when \ldots is left out and sometimes it doesn't. > > Of course, one can avoid this whole issue by always defining the log > unnormalized density function and \code{outfun} to have only > one argument > \code{state} and use global variables (objects in the R > global environment) to > specify any other information these functions need to use. That too > follows the R way. But some people consider that bad > programming practice. > } Instead of putting the extra inputs in the global environment you might recommend putting them into a more private environment. E.g., something like metrop(..., outfun=local({degree=2;function(beta)beta^degree})) Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com > > I hope that sums it up. Apologies for submitting a rather > stupid question > to the list. > -- > Charles Geyer > Professor, School of Statistics > University of Minnesota > char...@stat.umn.edu > > __ > 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] Reissue: Base "Object" class to use in S4 slot specification
On Sep 8, 2009, at 12:14 , Patrick Aboyoun wrote: This is a reissue of a question I had asked a few weeks ago to see if anyone had any thoughts on the matter. I am looking to have slot in an S4 class definition that can take any (S3 or S4) object. The ANY class seemed to be a good candidate, but the is() function definition performs an S3Case test before checking if methods:::.identC(class2, "ANY"). The result is the is() function does not consider various S3 objects to be of class ANY. Yes, but how is that relevant to your question? A slot defined as "ANY" will accept any type in R: > setClass("foo",representation(a="ANY")) [1] "foo" > new("foo",a=factor()) An object of class "foo" Slot "a": factor(0) Levels: "ANY" is not an S4 class (and neither are various other types in R), so is() correctly returns FALSE. Cheers, Simon > is(factor(), "ANY") [1] FALSE > is(lm(I(1:10) ~ rnorm(10)), "ANY") [1] FALSE > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base What is the recommended base "Object" class I should define my slot to be so it can accept any object? Patrick __ 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] Reissue: Base "Object" class to use in S4 slot specification
Simon, I don't want to get too deep into specific implementations here so we don't get stuck in the weeds. (The original issue started with a typed list class infrastructure in BioC's IRanges package that checked to see if the elements conformed to the expected class.) To make this issue as narrow as possible for now, I'll rephrase my issue to be inconsistent behavior between is and extends for class ANY. All classes (even non-existent ones) extend ANY according to methods::extends, but only S4 objects are of class ANY according to methods::is. This could be reconciled if is() checked if methods:::.identC(class2, "ANY") before it performed an S3Case test. > is(factor(), "ANY") [1] FALSE > extends("factor", "ANY") [1] TRUE > is(lm(I(1:10) ~ rnorm(10)), "ANY") [1] FALSE > extends("lm", "ANY") [1] TRUE > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base Patrick Simon Urbanek wrote: On Sep 8, 2009, at 12:39 , Simon Urbanek wrote: On Sep 8, 2009, at 12:14 , Patrick Aboyoun wrote: This is a reissue of a question I had asked a few weeks ago to see if anyone had any thoughts on the matter. I am looking to have slot in an S4 class definition that can take any (S3 or S4) object. The ANY class seemed to be a good candidate, but the is() function definition performs an S3Case test before checking if methods:::.identC(class2, "ANY"). The result is the is() function does not consider various S3 objects to be of class ANY. Yes, but how is that relevant to your question? A slot defined as "ANY" will accept any type in R: > setClass("foo",representation(a="ANY")) [1] "foo" > new("foo",a=factor()) An object of class "foo" Slot "a": factor(0) Levels: "ANY" is not an S4 class (and neither are various other types in R), so is() correctly returns FALSE. Ok, sorry, the last sentence is false - "ANY" is a virtual S4 class, so it will return TRUE for S4 classes and FALSE for any other object. Cheers, Simon > is(factor(), "ANY") [1] FALSE > is(lm(I(1:10) ~ rnorm(10)), "ANY") [1] FALSE > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base What is the recommended base "Object" class I should define my slot to be so it can accept any object? Patrick __ 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
[Rd] Difference between is(<>, "ANY") and extends(<>, "ANY")
Forgive the multiple posts, but I am resending a issue under a new subject so it doesn't get lost. There is inconsistent behavior between is and extends for class ANY. All classes (even non-existent ones) extend ANY according to methods::extends, but only S4 objects are of class ANY according to methods::is. This could be reconciled if is() checked if methods:::.identC(class2, "ANY") before it performed an S3Case test. > is(factor(), "ANY") [1] FALSE > extends("factor", "ANY") [1] TRUE > is(lm(I(1:10) ~ rnorm(10)), "ANY") [1] FALSE > extends("lm", "ANY") [1] TRUE > sessionInfo() R version 2.10.0 Under development (unstable) (2009-09-07 r49613) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base Patrick __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Simple ./config option to disable networking
Is there a simple ./configure option to turn off the networking code (e.g. I want to override HAVE_SOCKETS). Clearly it could be done editing configure.ac or setting CFLAGS but I was looking for something more elegant. Thanks, Bob [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel