search for: testby

Displaying 2 results from an estimated 2 matches for "testby".

Did you mean: testb
2009 Nov 19
1
Performance of 'by' and 'ddply' on a large data frame
...find the minimum date for each value of x1 and add that minimum date to my data.frame. > randomdf <- function(p) { data.frame(x1=sample(1:10^4, 10^p, replace=T), x2=sample(seq.Date(Sys.Date() - 356*3,Sys.Date(), by="day"), 10^p, replace=T), y1=sample(1:100, 10^p, replace=T)) } > testby <- function(p) { df <- randomdf(p) system.time(by(df, df$x1, function(dfi) { min(dfi$x2) })) } > lapply(c(1,2,3,4,5), testby) [[1]] ? user ?system elapsed ?0.006 ? 0.000 ? 0.006 [[2]] ? user ?system elapsed ?0.024 ? 0.000 ? 0.025 [[3]] ? user ?system elapsed ?0.233 ? 0.000 ? 0.234 [[4]]...
2009 Aug 19
2
[Hmisc] latex() with ctable=T inserting unwanted empty line in .tex file when used on summary.formula(method="reverse") object
Dear useRs, When I'm using Hmisc's latex() function with ctable=TRUE on a summary.formula with method="reverse" object and saving in a .tex file, the latter contains an unwanted empty line which makes compilation fail. Here is a brief example : library(Hmisc) test <- data.frame(a=sample(1:30,10),b=sample(c("good","bad","ugly"),10,replace=T))