search for: toydf

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

Did you mean: topdf
2006 Feb 21
2
indexing within panels in xyplot
...nd different symbols within each panel for the levels of the second factor. My problem is selecting the subset of each combination through which the line should be fit for subsequent plotting. This hopefully shows the idea: ---<---------------cut here---------------start-------------->--- toydf <- expand.grid(1:100, c("A", "B"), c("pop1", "pop2", "pop3", "pop4", "pop5")) toydf <- data.frame(facA = toydf[[3]], facB = toydf[[2]], x = toydf[[1]], y = rnorm(1000)) xyplot(y ~ x...
2006 Feb 18
1
reshaping result of by()
...or further analyses, I need to have the result arranged in a new data frame, with the upper limit of the histogram's breaks, the per bin count, and the factors identifying each record. My problem is including the latter: ---<---------------cut here---------------start-------------->--- toydf <- expand.grid(sample(0:50, 50, TRUE), c("A", "B"), c("pop1", "pop2", "pop3", "pop4", "pop5")) "getFreq" <- function(x, bks) { fhist <- hist(x, breaks = bks, plot = FALSE,...