leave_NAtime_plot: Function to plot data with x-axis split into facets between...

View source: R/ggplot_leave_NA_time.R

leave_NAtime_plotR Documentation

Function to plot data with x-axis split into facets between longer periods without data

Description

Function to plot data with x-axis split into facets between longer periods without data

Usage

leave_NAtime_plot(
  y = "CO2",
  col = "tiefe",
  group = "Pumpstufe",
  data,
  timestep = 10,
  ylab = "CO2 [ppm]",
  plot = T,
  adj_grob_size = T,
  ...,
  geom = "line"
)

Arguments

y

name of the column that should be ploted on y-axis as character

col

name of the column that should be used for the colour as character

group

name of the column that should be used for finding NA times as character the plot will automatically be split into different facets if the group column is NA for a defined timestep

data

data that should be plotted

timestep

timestep in minutes that is used to split plot into facets without longer gaps on the time axis

ylab

label for y-axis

plot

logical indicating whether output is a ggplot object (T) or a data.frame with the extra column "period" which can be used in facet_wrap to split time-axis

adj_grob_size

logical whether grob size should be adjusted

...

other parameters that should be parsed to scale_x_datetime(date_breaks = breaks, ...)

Examples

leave_NAtime_plot(data=data,group="CO2",plot=T)

laurin-f/pkg.WWM documentation built on July 19, 2023, 12:04 a.m.