search for: micesample

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

2010 Jul 15
2
How to delete a date frame from a data frame
e.g. I have a big data set called "combined", and then a small sample of "combined" called "miceSample". I wish to delete "miceSample" from "combined" to create a new smaller data set and store it into a new object. combined <- rbind(scaleMiceTrain, scaleMiceTest) miceSample <- sample(combined[,-c(1,2)],nvars, replace=FALSE) How do I do that? -- View this messag...
2010 Jul 16
3
Help with Sink Function
iterations <- 100 nvars <- 4 combined <- rbind(scaleMiceTrain, scaleMiceTest) reducedSample <- combined reducedSample <- subset(reducedSample, select = -pID50) reducedSample <- subset(reducedSample, select = -id) for (i in 1:iterations) { miceSample <- sample(combined[,-c(1,2)],nvars, replace=FALSE) miceSample$pID50 <- combined$pID50 miceTestSample <- miceSample[47:55,] miceTrainSample <- miceSample[1:46,] fit.kknn <- kknn(pID50~., miceTrainSample, miceTestSample) table(miceTestSample$pID50, fit.kknn$fit) (fit.train1 &l...