plot_box: Boxplot ggplot

plot_boxR Documentation

Boxplot ggplot

Description

Convenient and aesthetic visualization of data in a boxplot.

Usage

plot_box(x, var = "Precipitation", unit = "mm")

## S4 method for signature 'Raster'
plot_box(x, var = "Precipitation", unit = "mm")

## S4 method for signature 'data.table'
plot_box(x, var = "Precipitation", unit = "mm")

## S4 method for signature 'character'
plot_box(x, var = "Precipitation", unit = "mm")

Arguments

x

Raster* object; data.table (see details); filename (character, see details)

var

character (see details)

unit

character (see details)

Details

If 'x' is a data.table, its columns should be named: "lon", "lat", "date", and "value"

If 'x' is a filename, it should point to a *.nc file.

'var' is a character string describing the variable to be used for the plot title

'unit' is a character string describing the unit of measurement to be used for the plot title

Value

ggplot object

Examples

## Not run: 
download_data("gldas-vic", tempdir(), timestep = "yearly")
r <- raster::brick(paste0(tempdir(),
"/gldas-vic_tp_mm_land_194801_201412_025_yearly.nc"))
s <- plot_box(r)

## End(Not run)

pRecipe documentation built on Nov. 23, 2023, 1:08 a.m.