Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace tabs with spaces

  • Loading branch information...
commit 1df1e826901a4631f36761536daabfc3068c4ddc 1 parent c718e2d
@wch wch authored
Showing with 23 additions and 23 deletions.
  1. +3 −3 R/autoplot.r
  2. +15 −15 R/ggplot2.r
  3. +5 −5 R/stat-sum.r
View
6 R/autoplot.r
@@ -10,12 +10,12 @@
#' @export
#' @seealso \code{\link{ggplot}} and \code{\link{fortify}}
autoplot <- function(object, ...) {
- UseMethod("autoplot")
+ UseMethod("autoplot")
}
#' @S3method autoplot default
autoplot.default <- function(object, ...) {
- error.msg <- paste("Objects of type",class(object),"not supported by autoplot. Please use qplot() or ggplot() instead.\n")
- stop(error.msg, call.=FALSE)
+ error.msg <- paste("Objects of type",class(object),"not supported by autoplot. Please use qplot() or ggplot() instead.\n")
+ stop(error.msg, call.=FALSE)
}
View
30 R/ggplot2.r
@@ -36,13 +36,13 @@ NULL
#' This dataset was produced from US economic time series data available from \url{http://research.stlouisfed.org/fred2}.
#'
#' \itemize{
-#' \item date. Month of data collection
+#' \item date. Month of data collection
#'
-#' \item psavert, personal savings rate, \url{http://research.stlouisfed.org/fred2/series/PSAVERT/}
-#' \item pce, personal consumption expenditures, in billions of dollars, \url{http://research.stlouisfed.org/fred2/series/PCE}
-#' \item unemploy, number of unemployed in thousands, \url{http://research.stlouisfed.org/fred2/series/UNEMPLOY}
-#' \item uempmed, median duration of unemployment, in week, \url{http://research.stlouisfed.org/fred2/series/UEMPMED}
-#' \item pop, total population, in thousands, \url{http://research.stlouisfed.org/fred2/series/POP}
+#' \item psavert, personal savings rate, \url{http://research.stlouisfed.org/fred2/series/PSAVERT/}
+#' \item pce, personal consumption expenditures, in billions of dollars, \url{http://research.stlouisfed.org/fred2/series/PCE}
+#' \item unemploy, number of unemployed in thousands, \url{http://research.stlouisfed.org/fred2/series/UNEMPLOY}
+#' \item uempmed, median duration of unemployment, in week, \url{http://research.stlouisfed.org/fred2/series/UEMPMED}
+#' \item pop, total population, in thousands, \url{http://research.stlouisfed.org/fred2/series/POP}
#'
#' }
#'
@@ -111,15 +111,15 @@ NULL
#' Movies were selected for inclusion if they had a known length and had been rated by at least one imdb user. The data set contains the following fields:
#'
#' \itemize{
-#' \item title. Title of the movie.
-#' \item year. Year of release.
-#' \item budget. Total budget (if known) in US dollars
-#' \item length. Length in minutes.
-#' \item rating. Average IMDB user rating.
-#' \item votes. Number of IMDB users who rated this movie.
-#' \item r1-10. Multiplying by ten gives percentile (to nearest 10\%) of users who rated this movie a 1.
-#' \item mpaa. MPAA rating.
-#' \item action, animation, comedy, drama, documentary, romance, short. Binary variables representing if movie was classified as belonging to that genre.
+#' \item title. Title of the movie.
+#' \item year. Year of release.
+#' \item budget. Total budget (if known) in US dollars
+#' \item length. Length in minutes.
+#' \item rating. Average IMDB user rating.
+#' \item votes. Number of IMDB users who rated this movie.
+#' \item r1-10. Multiplying by ten gives percentile (to nearest 10\%) of users who rated this movie a 1.
+#' \item mpaa. MPAA rating.
+#' \item action, animation, comedy, drama, documentary, romance, short. Binary variables representing if movie was classified as belonging to that genre.
#' }
#'
#' @docType data
View
10 R/stat-sum.r
@@ -15,12 +15,12 @@
#' # By default, all categorical variables in the plot form grouping
#' # variables, and the default behavior in stat_sum is to show the
#' # proportion. Specifying stat_sum with no group identifier leads to
-#' # a plot which is not meaningful:
+#' # a plot which is not meaningful:
#' d + stat_sum()
-#' # To correct this problem and achieve a more desirable plot, we need
-#' # to specify which group the proportion is to be calculated over.
-#' # There are several ways to do this:
-#'
+#' # To correct this problem and achieve a more desirable plot, we need
+#' # to specify which group the proportion is to be calculated over.
+#' # There are several ways to do this:
+#'
#' # by overall proportion
#' d + stat_sum(aes(group = 1))
#' d + stat_sum(aes(group = 1)) + scale_size(range = c(3, 10))
Please sign in to comment.
Something went wrong with that request. Please try again.