Description Usage Details Value
View source: R/calories_burned_boxpt.R
The function, calories_burned_boxpt, takes an x-variable that is categorical and numeric y-variable of a dataset to create a boxplot in ggplot.
1 | calories_burned_boxpt(data, x, y)
|
data <- The desired data set being used x <- The workout day that is being examined. y <- The amount of calories burned
The ggplot() command maps the x-variable and y-varialbe from the data set desired to use for the plot. The geom_boxplot command maps the color of each level in the x-variable to be specified through scale_color_manual and for the inside of each box-whisker to be be colored to be gray70 throught scale_fill_manual command.
A x-axis, y-axis, and title for the graph are added generically where whatever x-variable and y-variable is desired will be printed out on the graph.
calories_burned_boxpt will return an aesthetic colored boxplot of the distribution of the calories burned in each workout day.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.