search for: jjap

Displaying 3 results from an estimated 3 matches for "jjap".

Did you mean: jaap
2011 Mar 29
4
Simple but elusive - expand back from counts
Dear R-users, This should be simple but still eludes me: Given the following tmp<-as.data.frame(matrix(c(44, 10, "abc", 1, 44, 10, "def", 1, 44, 12, "abc", 2), 3, 4, byrow=T)) I want to expand the data to the following form: V1 V2 V3 V4 1 44 10 abc 1 2 44 10 def 1 3 44 12 abc 1 4 44 12 abc 1 The last row of the original df was duplicated the row by the
2011 Aug 23
3
ddply - how to transform df column "in place"
Dear R-users, I am trying to get the plyr syntax right, without much success. Given: d<- data.frame(cbind(x=1,y=seq(20100801,20100830,1))) names(d)<-c("first", "daterep") d2<-d # I can convert the daterep column in place the classic way: d$daterep<-as.Date(strptime(d$daterep, format="%Y%m%d")) # How to do it the plyr way? ddply(d2,
2011 Aug 12
1
lattice panel.abline use
Dear R-users, I am unsuccessful in trying to add an horizontal line to all graphs in the example below: library(lattice) val<-runif(15) x<-rep(seq(1:5),3) type<-c(rep("a",5), rep("b",5), rep("c",5)) xyplot(val ~ x | type, panel.abline(h=.6)) Any hints are appreciated. Best regards, ---Jean -- View this message in context: