boB Rudis
7 years ago
21 changed files with 129 additions and 1794 deletions
@ -1,12 +0,0 @@ |
|||||
\documentclass[a4paper]{book} |
|
||||
\usepackage[times,inconsolata,hyper]{Rd} |
|
||||
\usepackage{makeidx} |
|
||||
\usepackage[latin1]{inputenc} % @SET ENCODING@ |
|
||||
% \usepackage{graphicx} % @USE GRAPHICX@ |
|
||||
\makeindex{} |
|
||||
\begin{document} |
|
||||
\chapter*{} |
|
||||
\begin{center} |
|
||||
{\textbf{\huge \R{} documentation}} \par\bigskip{{\Large of \file{ggalt}}} |
|
||||
\par\bigskip{\large \today} |
|
||||
\end{center} |
|
File diff suppressed because it is too large
@ -1,62 +0,0 @@ |
|||||
#' Pokemon color scales |
|
||||
#' |
|
||||
#' Color scales using the colors in the Pokemon characters |
|
||||
#' |
|
||||
#' @references \href{http://www.pokegraphs.com/}{Original JSON color list}. |
|
||||
#' @note Pokémon & Pokémon character names are trademarks of Nintendo. |
|
||||
#' @inheritParams ggplot2::scale_colour_hue |
|
||||
#' @inheritParams pokemon_pal |
|
||||
#' @family pokemon aeshetics |
|
||||
#' @rdname scale_pokemon |
|
||||
#' @export |
|
||||
scale_colour_pokemon <- function(avatar="bulbasaur", ...) { |
|
||||
discrete_scale("colour", "pokemon", pokemon_pal(avatar=avatar), ...) |
|
||||
} |
|
||||
|
|
||||
#' @rdname scale_pokemon |
|
||||
#' @export |
|
||||
scale_color_pokemon <- scale_colour_pokemon |
|
||||
|
|
||||
#' @rdname scale_pokemon |
|
||||
#' @export |
|
||||
scale_fill_pokemon <- function(avatar=FALSE, ...) { |
|
||||
discrete_scale("fill", "pokemon", pokemon_pal(avatar=avatar), ...) |
|
||||
} |
|
||||
|
|
||||
#' Pick a Pokemon palette |
|
||||
#' |
|
||||
#' @references \href{http://www.pokegraphs.com/}{Original JSON color list}. |
|
||||
#' @note Pokémon & Pokémon character names are trademarks of Nintendo. |
|
||||
#' @param avatar avatar name. Use \code{list_avatars()} to see them all! |
|
||||
#' @family pokemon aeshetics |
|
||||
#' @export |
|
||||
pokemon_pal <- function(avatar="bulbasaur") { |
|
||||
|
|
||||
avatar <- tolower(avatar) |
|
||||
|
|
||||
if (!(avatar %in% names(pokemon))) { |
|
||||
message("avatar not found, using 'bulbasaur'") |
|
||||
avatar <- "bulbasaur" |
|
||||
} |
|
||||
|
|
||||
best_colors <- function(avatar, n=1) { |
|
||||
unname(pokemon[[avatar]]) |
|
||||
} |
|
||||
|
|
||||
function(n) { |
|
||||
best_colors(avatar, n) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#' List Pokemon avatar names |
|
||||
#' |
|
||||
#' @references \href{http://www.pokegraphs.com/}{Original JSON color list}. |
|
||||
#' @note Warning: huge! list\cr |
|
||||
#' \cr |
|
||||
#' Pokémon & Pokémon character names are trademarks of Nintendo. |
|
||||
#' @family pokemon aeshetics |
|
||||
#' @export |
|
||||
list_avatars <- function() { |
|
||||
sort(names(pokemon)) |
|
||||
} |
|
Before Width: | Height: | Size: 73 KiB |
@ -0,0 +1,55 @@ |
|||||
|
% Generated by roxygen2: do not edit by hand |
||||
|
% Please edit documentation in R/geom_twoway_bar.r |
||||
|
\name{geom_twoway_bar} |
||||
|
\alias{geom_twoway_bar} |
||||
|
\title{Two-way bar chart} |
||||
|
\usage{ |
||||
|
geom_twoway_bar(mapping = NULL, data = NULL, stat = "identity", |
||||
|
width = NULL, ..., na.rm = FALSE, show.legend = NA, |
||||
|
inherit.aes = TRUE) |
||||
|
} |
||||
|
\arguments{ |
||||
|
\item{mapping}{Set of aesthetic mappings created by \code{\link{aes}} or |
||||
|
\code{\link{aes_}}. If specified and \code{inherit.aes = TRUE} (the |
||||
|
default), it is combined with the default mapping at the top level of the |
||||
|
plot. You must supply \code{mapping} if there is no plot mapping.} |
||||
|
|
||||
|
\item{data}{The data to be displayed in this layer. There are three |
||||
|
options: |
||||
|
|
||||
|
If \code{NULL}, the default, the data is inherited from the plot |
||||
|
data as specified in the call to \code{\link{ggplot}}. |
||||
|
|
||||
|
A \code{data.frame}, or other object, will override the plot |
||||
|
data. All objects will be fortified to produce a data frame. See |
||||
|
\code{\link{fortify}} for which variables will be created. |
||||
|
|
||||
|
A \code{function} will be called with a single argument, |
||||
|
the plot data. The return value must be a \code{data.frame.}, and |
||||
|
will be used as the layer data.} |
||||
|
|
||||
|
\item{stat}{Override the default connection between \code{geom_bar} and |
||||
|
\code{stat_count}.} |
||||
|
|
||||
|
\item{width}{Bar width. By default, set to 90\% of the resolution of the data.} |
||||
|
|
||||
|
\item{...}{other arguments passed on to \code{\link{layer}}. These are |
||||
|
often aesthetics, used to set an aesthetic to a fixed value, like |
||||
|
\code{color = "red"} or \code{size = 3}. They may also be parameters |
||||
|
to the paired geom/stat.} |
||||
|
|
||||
|
\item{na.rm}{If \code{FALSE}, the default, missing values are removed with |
||||
|
a warning. If \code{TRUE}, missing values are silently removed.} |
||||
|
|
||||
|
\item{show.legend}{logical. Should this layer be included in the legends? |
||||
|
\code{NA}, the default, includes if any aesthetics are mapped. |
||||
|
\code{FALSE} never includes, and \code{TRUE} always includes.} |
||||
|
|
||||
|
\item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, |
||||
|
rather than combining with them. This is most useful for helper functions |
||||
|
that define both data and aesthetics and shouldn't inherit behaviour from |
||||
|
the default plot specification, e.g. \code{\link{borders}}.} |
||||
|
} |
||||
|
\description{ |
||||
|
Two-way bar chart |
||||
|
} |
@ -1,23 +0,0 @@ |
|||||
% Generated by roxygen2: do not edit by hand |
|
||||
% Please edit documentation in R/pokemon.r |
|
||||
\name{list_avatars} |
|
||||
\alias{list_avatars} |
|
||||
\title{List Pokemon avatar names} |
|
||||
\usage{ |
|
||||
list_avatars() |
|
||||
} |
|
||||
\description{ |
|
||||
List Pokemon avatar names |
|
||||
} |
|
||||
\note{ |
|
||||
Warning: huge! list\cr |
|
||||
\cr |
|
||||
Pokémon & Pokémon character names are trademarks of Nintendo. |
|
||||
} |
|
||||
\references{ |
|
||||
\href{http://www.pokegraphs.com/}{Original JSON color list}. |
|
||||
} |
|
||||
\seealso{ |
|
||||
Other pokemon aeshetics: \code{\link{pokemon_pal}}, |
|
||||
\code{\link{scale_colour_pokemon}} |
|
||||
} |
|
@ -0,0 +1,22 @@ |
|||||
|
% Generated by roxygen2: do not edit by hand |
||||
|
% Please edit documentation in R/geom2plotly.r |
||||
|
\name{plotly_helpers} |
||||
|
\alias{plotly_helpers} |
||||
|
\alias{to_basic.GeomXspline} |
||||
|
\alias{to_basic.GeomBkde2d} |
||||
|
\alias{to_basic.GeomStateface} |
||||
|
\title{Plotly helpers} |
||||
|
\usage{ |
||||
|
to_basic.GeomXspline(data, prestats_data, layout, params, p, ...) |
||||
|
|
||||
|
to_basic.GeomBkde2d(data, prestats_data, layout, params, p, ...) |
||||
|
|
||||
|
to_basic.GeomStateface(data, prestats_data, layout, params, p, ...) |
||||
|
} |
||||
|
\arguments{ |
||||
|
\item{data, prestats_data, layout, params, p, ...}{plotly interface parameters} |
||||
|
} |
||||
|
\description{ |
||||
|
Helper functions to make it easier to automatically create plotly charts |
||||
|
} |
||||
|
\keyword{internal} |
@ -1,24 +0,0 @@ |
|||||
% Generated by roxygen2: do not edit by hand |
|
||||
% Please edit documentation in R/pokemon.r |
|
||||
\name{pokemon_pal} |
|
||||
\alias{pokemon_pal} |
|
||||
\title{Pick a Pokemon palette} |
|
||||
\usage{ |
|
||||
pokemon_pal(avatar = "bulbasaur") |
|
||||
} |
|
||||
\arguments{ |
|
||||
\item{avatar}{avatar name. Use \code{list_avatars()} to see them all!} |
|
||||
} |
|
||||
\description{ |
|
||||
Pick a Pokemon palette |
|
||||
} |
|
||||
\note{ |
|
||||
Pokémon & Pokémon character names are trademarks of Nintendo. |
|
||||
} |
|
||||
\references{ |
|
||||
\href{http://www.pokegraphs.com/}{Original JSON color list}. |
|
||||
} |
|
||||
\seealso{ |
|
||||
Other pokemon aeshetics: \code{\link{list_avatars}}, |
|
||||
\code{\link{scale_colour_pokemon}} |
|
||||
} |
|
@ -1,33 +0,0 @@ |
|||||
% Generated by roxygen2: do not edit by hand |
|
||||
% Please edit documentation in R/pokemon.r |
|
||||
\name{scale_colour_pokemon} |
|
||||
\alias{scale_colour_pokemon} |
|
||||
\alias{scale_color_pokemon} |
|
||||
\alias{scale_fill_pokemon} |
|
||||
\title{Pokemon color scales} |
|
||||
\usage{ |
|
||||
scale_colour_pokemon(avatar = "bulbasaur", ...) |
|
||||
|
|
||||
scale_color_pokemon(avatar = "bulbasaur", ...) |
|
||||
|
|
||||
scale_fill_pokemon(avatar = FALSE, ...) |
|
||||
} |
|
||||
\arguments{ |
|
||||
\item{avatar}{avatar name. Use \code{list_avatars()} to see them all!} |
|
||||
|
|
||||
\item{...}{Other arguments passed on to \code{\link{discrete_scale}} |
|
||||
to control name, limits, breaks, labels and so forth.} |
|
||||
} |
|
||||
\description{ |
|
||||
Color scales using the colors in the Pokemon characters |
|
||||
} |
|
||||
\note{ |
|
||||
Pokémon & Pokémon character names are trademarks of Nintendo. |
|
||||
} |
|
||||
\references{ |
|
||||
\href{http://www.pokegraphs.com/}{Original JSON color list}. |
|
||||
} |
|
||||
\seealso{ |
|
||||
Other pokemon aeshetics: \code{\link{list_avatars}}, |
|
||||
\code{\link{pokemon_pal}} |
|
||||
} |
|
Loading…
Reference in new issue