Hi,
I have a process in R that produces a lot of output. My plan was to
build up a matrix or data.frame "row by row", so that I'll have a nice
object with all the resulting data.
I started with:
results <- matrix(ncol=3)
names(results) <- c("one", "two", "three")
Then, when looping through the data:
results <- rbind(results, c(a,b,c))
This seems to work fine. BUT, my problem arises when I want to filter,
sort, etc.
I tried (thinking like a data.frame):
results[results$c < 100,]
But that fails.
I tried making it a data.frame with
foo <- data.frame(results)
But that converted all the numeric values to factors!!! Which causes a
whole mess of problems.
Any ideas??
-N
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.