MyRecentPlot: Visualise recent data measured by an AgFace Campbell...

View source: R/MyRecentPlot.R

MyRecentPlotR Documentation

Visualise recent data measured by an AgFace Campbell Scientific logger over the last hours.

Description

Visualise a selected parameter from a Campbell logger file for a given time window starting from the latest timestamp in the data frame. All sensors that measure this parameter on each logger system will be shown. Sensors are identified by their SensorID and logger system ID.

Usage

MyRecentPlot(para, hours, data, logger = NA, yscale_min = NA,
  yscale_max = NA, cartesian = TRUE, sensor.colour = FALSE,
  ephemeral.time = TRUE, ephemeral.object = ephemeral.times)

Arguments

para

Name of the parameter to be visualised. See GetSensorID for a list of sensor.names. Works with non-missing data only.

hours

Number of recent hours over which to visualise data. Starts from last timestamp in the data frame.

data

name of the data frame.

logger

Only visualise data from the specified logger system. Defaults to NA to use data from all logger systems.

yscale_min

Numeric. Lower limit of the y-axis. Defaults to NA to visualise the full range of values. When used, yscale_max has to be specified as well.

yscale_max

Numeric. Upper limit of the y-axis. Defaults to NA to visualise the full range of values. yscale_min can not be NA.

cartesian

Logical. Discard data outside of the specified y-axis range. Defaults to TRUE.

sensor.colour

Logical. Identify each SensorID per logger system with a unique colour. Defaults to TRUE.

ephemeral.time

Logical. If FALSE, shading for night time will not be added to the plot. Defaults to TRUE

ephemeral.object

Name of the object with sunrise and seunset informationation. If an object name is provided, it has to have the same structure as the output of link{CampbellSunriseSunset}, i.e. provide a Date, sunrise, and sunset column for each date in the data range. Defaults to ephemeral.times. Only evaluated when ephemeral.time is TRUE.

Value

Returns a ggplot object.


MarkusLoew/CampbellLogger documentation built on March 22, 2022, 3:29 a.m.