prepSeries: Prepare a Data Frame to Be Converted to a Series for Use in...

View source: R/prepSeries.R

prepSeriesR Documentation

Prepare a Data Frame to Be Converted to a Series for Use in Highcharter

Description

This function converts a data frame to a summary data frame that can be converted to a series for use in highcharter

Usage

prepSeries(df, x1, x2, y)

Arguments

df

This is the data source to be converted

x1

This is the first column to be grouped by

x2

This is the second column to be grouped by

y

This is the column to summarise by taking the mean

Examples

library(dplyr)
dat2 <- prepSeries(mtcars,"cyl","am","mpg") %>% mutate(am = ifelse(am == 1,"Automatic","Manual"))
datSeries <- changeToSeries(dat2,"am")
createColumn(datSeries,unique(dat2$cyl),"Fuel Efficiency","Miles per Gallon by Transmission and Cylinders")

jsdeherrera/shinyBoots documentation built on March 9, 2024, 3:03 a.m.