Re: [R] [FORGED] Extracting specified pages from a lattice ("trellis") object.

2018-04-23 Thread Rolf Turner
On 24/04/18 15:17, Paul Murrell wrote: Hi I think the subsetting works by giving you the panels for the corresponding levels of the conditioning variable(s).  Note that, if there is more than one conditioning variable, you will need more than one subsetting index. For example, taking this

Re: [R] [FORGED] Extracting specified pages from a lattice ("trellis") object.

2018-04-23 Thread Paul Murrell
Hi I think the subsetting works by giving you the panels for the corresponding levels of the conditioning variable(s). Note that, if there is more than one conditioning variable, you will need more than one subsetting index. For example, taking this plot with two conditioning variables and

Re: [R] Gantt Chart Using Plotrix

2018-04-23 Thread bbb_aaa
Hi Sarah Sorry for the delay in responding. Based on your earlier message I realized that the way I was reading in the data was causing this problem. I also realized that my attempt at fixing the problem (by selecting each of the columns using the $ operator and then changing it to the appropr

Re: [R] How to dynamically add variables to a dataframe

2018-04-23 Thread peter dalgaard
Like this? > V <- c("fee","fie","foe") > aq <- head(airquality) # Just to get a shorter example > aq[V] <- 0 > aq Ozone Solar.R Wind Temp Month Day fee fie foe 141 190 7.4 67 5 1 0 0 0 236 118 8.0 72 5 2 0 0 0 312 149 12.6 74 5 3 0

Re: [R] How to dynamically add variables to a dataframe

2018-04-23 Thread Ista Zahn
Another option is d0[paste0("V", 1:nrow(d1))] <- 0 --Ista On Sun, Apr 22, 2018 at 4:23 AM, Eric Berger wrote: > Hi Luca, > How about this? > > # create some dummy data since I don't have your d0 or d1 >> n <- 3 >> d0 <- data.frame(a=runif(5),b=runif(5)) > > # here's the suggested code >> d1 <-

Re: [R] Gantt Chart Using Plotrix

2018-04-23 Thread Sarah Goslee
Hi, Your attempt didn't work because you didn't do what I suggested, which was make sure that your data frame matched the example given in the help for gantt.chart. Here's what you have: > str(cdfg) 'data.frame': 3 obs. of 3 variables: $ c1d1: Factor w/ 3 levels "task 1","task 3",..: 1 3 2 $ c

Re: [R] Removing columns from big.matrix which have only one value

2018-04-23 Thread PIKAL Petr
Hi With > which(colSums(m4)==0) you get column numbers with only zeroes. You could also remove zero column by. m4[,colSums(m4)!=0] And with that you could find colums with ones. which(colSums(m4)==nrow(m4)) [1] 10001 Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun.

[R] R 3.5.0 is released

2018-04-23 Thread Peter Dalgaard via R-help
The build system rolled up R-3.5.0.tar.gz (codename "Joy in Playing") this morning. The list below details the changes in this release. You can get the source code from http://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries f