|
1 | 1 | #' Translating between qplot and lattice |
2 | 2 | #' |
3 | | -#' The major difference between lattice and ggplot2 is that lattice uses a formula based |
4 | | -#' interface. ggplot2 does not because the formula does not generalise well |
5 | | -#' to more complicated situations. |
| 3 | +#' The major difference between lattice and ggplot2 is that lattice uses a |
| 4 | +#' formula based interface. ggplot2 does not because the formula does not |
| 5 | +#' generalise well to more complicated situations. |
6 | 6 | #' |
7 | 7 | #' @name translate_qplot_lattice |
8 | 8 | #' @examples |
9 | | -#' \dontrun{ |
| 9 | +#' \donttest{ |
10 | 10 | #' library(lattice) |
11 | 11 | #' |
12 | 12 | #' if (require("ggplot2movies")) { |
|
29 | 29 | #' qplot(rating, data = movies, geom = "histogram") |
30 | 30 | #' |
31 | 31 | #' bwplot(Comedy ~ rating ,data = movies) |
32 | | -#' qplot(factor(Comedy), rating, data = movies, type = "boxplot") |
| 32 | +#' qplot(factor(Comedy), rating, data = movies, geom = "boxplot") |
33 | 33 | #' |
34 | 34 | #' xyplot(wt ~ mpg, mtcars, type = c("p","smooth")) |
35 | 35 | #' qplot(mpg, wt, data = mtcars, geom = c("point","smooth")) |
36 | | -#' |
37 | | -#' xyplot(wt ~ mpg, mtcars, type = c("p","r")) |
38 | | -#' qplot(mpg, wt, data = mtcars, geom = c("point","smooth"), method = "lm") |
39 | 36 | #' } |
40 | 37 | #' |
41 | 38 | #' # The capabilities for scale manipulations are similar in both ggplot2 and |
|
0 commit comments