search for: testdf1

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

Did you mean: testdf
2007 Nov 08
2
mapply, coxph, and model formula
...n to make test data makeTestDF <- function(n) { times <- sample(1:200, n, replace = TRUE) event <- rbinom(n, 1, prob = .1) trt <- rep(c("A","B"), each = n/2) testdf <- data.frame(times,event,trt) } #Create two sets of test data of different sizes testdf1 <- makeTestDF(100) testdf2 <- makeTestDF(200) #Define a formula and call coxph form <- Surv(times, event) ~ trt coxph(form, testdf1) #Works coxph(form, testdf2) #Works #Create a list of the two data.frames df.list <- list(testdf1, testdf2) #Try to use mapply mapply(coxph, form, df.li...
2010 Jul 28
2
Axes=F and plotting dual y axes
...axes=F is not "working". Whenever I plot (either a dataframe or xts/zoo series) and I set axes=F along with xlab/ylab="" I still get the default axes printed in my chart. Consider this: #Create some sample data, both 50 units of blah series2 = c(1:50) series1 = rep(25:74) testdf1 = as.data.frame(series1) testdf1$series2 = series2 As a note, I converted my original xts/zoo dataset into a dataframe thinking it could be weirdness on the part of that. I just did this here to have something reproducible since it's not feasible to put my entire original dataset in the ema...