Skip to content

Commit

Permalink
Merge a0953be into 78974d8
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby Dylan Hocking committed Nov 2, 2016
2 parents 78974d8 + a0953be commit 00fbdc2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
11 changes: 10 additions & 1 deletion R/animint.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
##' Create a new animint, which is a list of ggplots and options that
##' has class "animint"
##' @title animint
##' @param ... passed to list
##' @return a list of class "animint"
##' @author Toby Dylan Hocking
animint <- function(...){
structure(list(...), class="animint")
}

#' Convert a ggplot to a list.
#' @param meta environment with previously calculated plot data, and a new plot to parse, already stored in plot and plot.name.
#' @return nothing, info is stored in meta.
Expand Down Expand Up @@ -1332,7 +1342,6 @@ gg2animint <- function(...){
#' \item shape. Open and closed circles can be represented by manipulating fill and colour scales and using default (circle) points, but d3 does not support many R shape types, so mapping between the two is difficult.
#' }
#'
#' @aliases animint
#' @param plot.list a named list of ggplots and option lists.
#' @param out.dir directory to store html/js/csv files.
#' @param json.file character string that names the JSON file with metadata associated with the plot.
Expand Down
2 changes: 1 addition & 1 deletion inst/examples/WorldBank-facets.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data(WorldBank)
not.na <- subset(WorldBank, !(is.na(life.expectancy) | is.na(fertility.rate)))
subset(not.na, is.na(not.na$population))
subset(not.na, country == "Kuwait" & 1991 <= year & year <= 1995)
not.na[not.na$country=="Kuwait", "population"] <- 1700000
not.na[is.na(not.na$population), "population"] <- 1700000
BOTH <- function(df, top, side){
data.frame(df,
top=factor(top, c("Fertility rate", "Years")),
Expand Down
22 changes: 22 additions & 0 deletions man/animint.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/animint.R
\name{animint}
\alias{animint}
\title{animint}
\usage{
animint(...)
}
\arguments{
\item{...}{passed to list}
}
\value{
a list of class "animint"
}
\description{
Create a new animint, which is a list of ggplots and options that
has class "animint"
}
\author{
Toby Dylan Hocking
}

1 change: 0 additions & 1 deletion man/animint2dir.Rd
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/animint.R
\name{animint2dir}
\alias{animint}
\alias{animint2dir}
\title{Compile and render an animint in a local directory}
\usage{
Expand Down

0 comments on commit 00fbdc2

Please sign in to comment.