Learn R Programming

bioRad (version 0.5.1)

as.data.frame.vp: Convert a vertical profile (vp) to a Data Frame

Description

Converts a vertical profile to a Data Frame, and optionally adds information on sunrise/sunset, day/night and derived quantities like migration traffic rates.

Usage

# S3 method for vp
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  quantities = names(x$data),
  suntime = TRUE,
  geo = TRUE,
  elev = -0.268,
  lat = NULL,
  lon = NULL,
  ...
)

Arguments

x

An object of class vp.

row.names

NULL or a character vector giving the row names for the data frame. Missing values are not allowed.

optional

If FALSE then the names of the variables in the data frame are checked to ensure that they are syntactically valid variable names and are not duplicated.

quantities

An optional character vector with the names of the quantities to include as columns in the data frame.

suntime

Logical, when TRUE, adds sunrise/sunset and day/night information to each row.

geo

Logical, when TRUE, adds latitude, longitude and antenna height of the radar to each row.

elev

Sun elevation in degrees, see sunrise/sunset.

lat

Radar latitude in decimal degrees. When set, overrides the latitude stored in x in sunrise/sunset calculations

lon

Radar longitude in decimal degrees. When set, overrides the longitude stored in x in sunrise/sunset calculations.

...

Additional arguments to be passed to or from methods.

Value

An object of class data.frame.

Details

Note that only the "dens" quantity is thresholded for radial velocity standard deviation by sd_vvp_threshold. Note that this is different from the default plot.vp, plot.vpts and get_quantity.vp functions, where quantities "eta", "dbz", "ff", "u", "v", "w", "dd" are all thresholded by sd_vvp_threshold

Examples

Run this code
# NOT RUN {
# load an example vertical profile time series object
data(example_vp)

# print some summary information
example_vp

# convert the object to a data.frame
df <- as.data.frame(example_vp)

# print the data.frame to console
df

# do not compute sunrise/sunset information
df <- as.data.frame(example_vp, suntime = FALSE)

# override the latitude/longitude information stored in the object
# when calculating sunrise / sunset
df <- as.data.frame(example_vp, suntime = TRUE, lat = 50, lon = 4)
# }

Run the code above in your browser using DataLab