Re: [R] unable to use functions require DLL from package

2014-08-17 Thread Lotte de Vries
David Winsemius dwinsemius at comcast.net writes: Well I do have the MASS package from which that function was loaded. I get no error with the example in the help page: boxcox(Days+1 ~ Eth*Sex*Age*Lrn, data = quine, lambda = seq(-0.05, 0.45, len = 20), plotit=TRUE) ... and you

[R] BNF description for R

2014-08-17 Thread kevin2059
HOW can I get a completely BNF description for R? I try to write a parser for R now. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] no visible binding for global variable and with() vs. within()

2014-08-17 Thread Daniel Braithwaite
R CMD check does not object to this code when checking a package: foo1 - function (bar) { with(bar, { x }) } but produces a warning: foo2: no visible binding for global variable 'x' in response to this: foo2 - function (bar) { within(bar, { x }) } Is this an R bug, or

Re: [R] data.table/ifelse conditional new variable question

2014-08-17 Thread Jorge I Velez
Dear Kate, Try this: res - do.call(rbind, lapply(xs, function(l){ l$PID - l$MID - 0 father - with(l, Relationship == 'father') mother - with(l, Relationship == 'mother') if(sum(father) == 0) l$PID[l$Relationship == 'sibling'] - 0 else l$PID[l$Relationship == 'sibling'] - l$Sample.ID[father]

Re: [R] data.table/ifelse conditional new variable question

2014-08-17 Thread Jorge I Velez
Perhaps I am missing something but I do not get the same result: x - read.table(textConnection(Family.ID Sample.ID Relationship 2702 349 mother 2702 3456 sibling 2702 9980 sibling 3064 3 father 3064 4 mother 3064 5sibling 3064 86 sibling 3064 87 sibling), header = TRUE)

Re: [R] no visible binding for global variable and with() vs. within()

2014-08-17 Thread Duncan Murdoch
On 16/08/2014, 9:36 PM, Daniel Braithwaite wrote: R CMD check does not object to this code when checking a package: foo1 - function (bar) { with(bar, { x }) } but produces a warning: foo2: no visible binding for global variable 'x' in response to this: foo2 -

Re: [R] BNF description for R

2014-08-17 Thread Duncan Murdoch
On 16/08/2014, 7:32 PM, kevin2059 wrote: HOW can I get a completely BNF description for R? I try to write a parser for R now. The R grammar is defined in the src/main/gram.y file (in Bison format). You can get that file from https://svn.r-project.org/R/trunk/src/main/gram.y. Duncan Murdoch

[R] ggplot2/heat map/duplicated level problem

2014-08-17 Thread Kate Ignatius
Hi, I hope I can explain my problem clearly I have a plink output file that I want to graph a heat map of the PI_HAT estimates. I have the following code that I has worked in the past but this time I'm getting the error: In `levels-`(`*tmp*`, value = if (nl == nL) as.character(labels) else

Re: [R] data.table/ifelse conditional new variable question

2014-08-17 Thread Ted Harding
On 17-Aug-2014 03:50:33 John McKown wrote: On Sat, Aug 16, 2014 at 9:02 PM, Kate Ignatius kate.ignat...@gmail.com wrote: Actually - your code is not wrong... because this is a large file I went through the file to see if there was anything wrong with it - looks like there are two fathers or

[R] Making my own graphics device

2014-08-17 Thread Thomas Levine
I want to make my own graphics device am thus looking for documentation about graphics devices. The only thing I've found so far is these directions for making graphics devices with the RGraphicsDevice package. http://www.omegahat.org/RGraphicsDevice/ Could someone point me to any other

Re: [R] Making my own graphics device

2014-08-17 Thread Roger Koenker
In ancient times, ie circa 1981, the S language certainly supported HP pen plotters so there should be code somewhere that could be resuscitated, he said naively. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox:

Re: [R] no visible binding for global variable and with() vs. within()

2014-08-17 Thread Rolf Turner
On 17/08/14 23:05, Duncan Murdoch wrote: On 16/08/2014, 9:36 PM, Daniel Braithwaite wrote: R CMD check does not object to this code when checking a package: foo1 - function (bar) { with(bar, { x }) } but produces a warning: foo2: no visible binding for global variable 'x' in

Re: [R] Making my own graphics device

2014-08-17 Thread David Winsemius
On Aug 17, 2014, at 12:58 PM, Thomas Levine wrote: I want to make my own graphics device am thus looking for documentation about graphics devices. The only thing I've found so far is these directions for making graphics devices with the RGraphicsDevice package.

Re: [R] Making my own graphics device

2014-08-17 Thread Thomas Levine
Thanks for this! I had a feeling that was the case; the R graphics functions are so clearly designed for use with pen plotters that I was puzzled by the absense of an HPGL device. And now I've found a list of some other interesting devices on page 71 of Modern Applied Statistics with S. This

Re: [R] Making my own graphics device

2014-08-17 Thread Paul Murrell
Hi On 08/18/14 07:58, Thomas Levine wrote: I want to make my own graphics device am thus looking for documentation about graphics devices. The only thing I've found so far is these directions for making graphics devices with the RGraphicsDevice package. http://www.omegahat.org/RGraphicsDevice/

Re: [R] Making my own graphics device

2014-08-17 Thread Duncan Murdoch
On Aug 17, 2014, at 2:58 PM, Thomas Levine _...@thomaslevine.com wrote: I want to make my own graphics device am thus looking for documentation about graphics devices. The only thing I've found so far is these directions for making graphics devices with the RGraphicsDevice package.

Re: [R] Making my own graphics device

2014-08-17 Thread David Winsemius
On Aug 17, 2014, at 2:35 PM, Paul Murrell wrote: Hi On 08/18/14 07:58, Thomas Levine wrote: I want to make my own graphics device am thus looking for documentation about graphics devices. The only thing I've found so far is these directions for making graphics devices with the

[R] (no subject)

2014-08-17 Thread Kaiyin Zhong (Victor Chung)
Hi all. I am having problems with inheritance in reference class, here is a small example: Myclass = setRefClass(Myclass, fields = list( fa = numeric, fb = numeric, filename = character,

Re: [R] Turn Rank Ordering Into Numerical Scores By Transposing A Data Frame

2014-08-17 Thread David L Carlson
There is probably an easier way to do this, but set.seed(42) mydf - data.frame(t(replicate(100, sample(c(red, blue, + green, yellow, NA), 4 colnames(mydf) - c(rank1, rank2, rank3, rank4) head(mydf) rank1 rank2 rank3 rank4 1 NA yellowred blue 2 yellow green NA red 3

[R] Fwd: error in installing rpud package

2014-08-17 Thread madhvi.gupta
Original Message Subject:error in installing rpud package Date: Mon, 18 Aug 2014 10:08:21 +0530 From: madhvi.gupta madhvi.gu...@orkash.com To: r-help-requ...@r-project.org Hello, I am trying to install rpud package on R eith version 3.1.1 and i am getting

Re: [R-es] error en código de wavelets

2014-08-17 Thread Oscar Perpiñan
Hola, Para los que no tengáis el libro, el código a que hace referencia está aquí: http://books.google.es/books?id=5gLAQLTl4iQC. En el bucle usa dos funciones, adjust y pred, que no están incluidas en el paquete, sino en una página web externa según indica el libro