[Rd] S4 objects in data frames?

2007-09-19 Thread Byron Ellis
Is there any way to get S4 objects into a data frame and have the resulting data frame actually be printable? After a good deal of work I managed to convert an S4 objects that holds several other objects into a data.frame object using a custom as.data.frame method, but I have been unable to discov

Re: [Rd] packages MANOR, qvalue, and tkWidgets fail install on Fedora 7 with latest R-beta build

2007-09-19 Thread Martin Morgan
Hi Mark -- sessionInfo and the warning messages are not enough here. Try to install one of the failing packages and provide the complete transcript of the process. Consider sending this to the Bioconductor mailing lists (bioc-devel, in particular, since these packages are in the development branc

[Rd] packages MANOR, qvalue, and tkWidgets fail install on Fedora 7 with latest R-beta build

2007-09-19 Thread Mark W Kimpel
Had some packages fail install so I updated to today's R-beta release. On updating packages the following packages still fail. sessionInfo follows. Mark Warning messages: 1: In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, : installation of package 'MANOR' ha

Re: [Rd] Sweave vignettes and bitmap on windows

2007-09-19 Thread tshort
While I don't agree with it, this "feature" of bitmap is deliberate according to Prof. Ripley: http://tolstoy.newcastle.edu.au/R/devel/04/09/0682.html - Tom Tom Short EPRI Martin Morgan wrote: > > During vignette generation on Windows, Sweave seems to clean up before > all graphics files are

[Rd] Sweave vignettes and bitmap on windows

2007-09-19 Thread Martin Morgan
During vignette generation on Windows, Sweave seems to clean up before all graphics files are completely processed. For instance, if tmp.Rnw is: \documentclass[12pt]{article} \begin{document} <<>>= bitmap("afile.png") plot(1:100) dev.off() @ \end{document} Then: C:\R\tmp>R CMD Sweave tmp.Rnw Wr

[Rd] copying promise

2007-09-19 Thread Gabor Grothendieck
1. Is there some way to copy a promise so that the copy has the same expression in its promise as the original. In the following we y is a promise that we want to copy to z. We want z to be a promise based on the expression x since y is a promise based on the expression x. Thus the answer to the

Re: [Rd] delayedAssign

2007-09-19 Thread Gabor Grothendieck
Also note that earlier in the same example we have: > msg <- "old" > delayedAssign("x", msg) > msg <- "new!" > x #- new! [1] "new!" > substitute(x) #- msg x > R.version.string # Vista [1] "R version 2.6.0 alpha (2007-09-06 r42791)" That is substitute(x) gives x, not msg. On 9/19/07, Gabor Grothe

Re: [Rd] delayedAssign

2007-09-19 Thread Peter Dalgaard
Gabor Grothendieck wrote: > The last two lines of example(delayedAssign) give this: > > >> e <- (function(x, y = 1, z) environment())(1+2, "y", {cat(" HO! "); pi+2}) >> (le <- as.list(e)) # evaluates the promises >> > $x > > $y > > $z > > > which contrary to the comment appears unevaluat

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Hin-Tak Leung
On linux boxes, version$os and R.version$os is 'linux-gnu'. I assume that it would be 'darwin-apple' on Mac's? Henrik Bengtsson wrote: > isApple <- function(...) { > isApple <- FALSE; > tryCatch({ > ans <- readline("Do you see an Apple key on the keyboard you are > typing on? yes/no");

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Henrik Bengtsson
isApple <- function(...) { isApple <- FALSE; tryCatch({ ans <- readline("Do you see an Apple key on the keyboard you are typing on? yes/no"); isApple <- (ans == "yes"); }, mouseClick = function(ex) { isApple <<- TRUE; }) } /H On 9/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wro

Re: [Rd] R-2.6.0 for Windows, semi-transparent colours and layout()

2007-09-19 Thread Henric Nilsson (Private)
Prof Ripley, Quoting Prof Brian Ripley <[EMAIL PROTECTED]>: > On Sat, 15 Sep 2007, Henric Nilsson (Public) wrote: > >> Hi, >> >> The added support for semi-transparent colours in `windows' under >> R-2.6.0 for Windows is much appreciated. >> >> However, I've discovered that issuing a `layout' (or

Re: [Rd] Best practices - R CMD check and vignettes

2007-09-19 Thread James W. MacDonald
Thanks, Max. Right after sending that email I was frantically searching for the 'Retract' button on my mailer, but evidently there isn't one ;-D. Anyway, I'm not sure the entire package is installed during either R CMD build or R CMD check, so I am not sure that will work. My ill-advised idea o

Re: [Rd] building a package - shared library loading problem

2007-09-19 Thread Simon Urbanek
Konrad, for a package you should not be using R CMD SHLIB at all. It is used internally and for non-package compilation. If you have a proper source package, you just install it using R CMD INSTALL. To be precise, assuming you have your package and source code in the "foo" directory you ca

[Rd] delayedAssign

2007-09-19 Thread Gabor Grothendieck
The last two lines of example(delayedAssign) give this: > e <- (function(x, y = 1, z) environment())(1+2, "y", {cat(" HO! "); pi+2}) > (le <- as.list(e)) # evaluates the promises $x $y $z which contrary to the comment appears unevaluated. Is the comment wrong or is it supposed to return an ev

Re: [Rd] Best practices - R CMD check and vignettes

2007-09-19 Thread Kuhn, Max
Jim, But I'm not sure if this works if the package has not been installed (or it might find a version already installed in your library path), but give it a try: load(system.file("examples", "somedata.Rdata", package = "PkgName")) Max -Original Message- From: [EMAIL PROTECTED] [mail

[Rd] Best practices - R CMD check and vignettes

2007-09-19 Thread James MacDonald
Hi, I have a package that contains two vignettes that both use saved objects in the examples directory of the package. With previous versions of R I could have a code chunk in the vignette like this: <>= load("../examples/somedata.Rdata") @ followed by a code chunk like <>= foo <- bar("data")

[Rd] building a package - shared library loading problem

2007-09-19 Thread Konrad Smolinski
Dear All, I am trying to write my first R package and I bump into loading shared library problem( working on Mac OS X 10.4.10 as well as Linux Ubuntu). I want to makes use of (incorporate) a shared library matchinglib.so in the package. Library was created via R CMD -SHLIB. Following 'Writing R

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Duncan Murdoch
On 9/19/2007 9:41 AM, Gorjanc Gregor wrote: > Hi! > > Is there any way to test if R is running on a Mac? I usually use > value of .Platform$OS.type for windows or unix, but Mac falls in the > latter group. Remember to also look at .Platform$GUI: the GUI version behaves quite differently from co

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Vladimir Eremeev
Vladimir Eremeev wrote: > > > Gregor Gorjanc-2 wrote: >> >> Hi! >> >> Is there any way to test if R is running on a Mac? I usually use >> value of .Platform$OS.type for windows or unix, but Mac falls in the >> latter group. >> >> Thanks, Gregor >> > > What is in .Platform$path.sep? > Wind

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Vladimir Eremeev
Gregor Gorjanc-2 wrote: > > Hi! > > Is there any way to test if R is running on a Mac? I usually use > value of .Platform$OS.type for windows or unix, but Mac falls in the > latter group. > > Thanks, Gregor > What is in .Platform$path.sep? Windows has ";", unix has ":". Mac? -- View this me

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Oleg Sklyar
I had the same problem. The following line using either 'apple' or 'darwin' does the job for me (tested on many different Macs): length(grep("apple", tolower(Sys.getenv("R_PLATFORM" != 0 On Wed, 2007-09-19 at 15:41 +0200, Gorjanc Gregor wrote: > Hi! > > Is there any way to test if R is run

[Rd] How to test if R is running on a Mac

2007-09-19 Thread Gorjanc Gregor
Hi! Is there any way to test if R is running on a Mac? I usually use value of .Platform$OS.type for windows or unix, but Mac falls in the latter group. Thanks, Gregor __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] chartr better

2007-09-19 Thread Prof Brian Ripley
Thank you for this. Unfortunately qsort and bsearch are C99 functions, and I don't think we can safely assume that they are present. So I am going to put this into R-devel but not 2.6.0. When we have a bit more experience we can consider backporting it to 2.6.1 (I don't want to change the aut