Skip to contents

Add one tag sensor or metadata variable to a NetCDF archive file. If the archive file does not exist, it is created. The file is assumed to be in the current working directory unless a pathname is added to the beginning of fname.

Usage

add_nc(file, D, vname)

Arguments

file

The name of the netCDF file to which to save. If the name does not include a .nc suffix, this will be added automatically.

D

The sensor data or metadata list to be saved.

vname

The name of the sensor data stream to be saved. Defaults to the entry "name" from the sensor or metadata list provided by the user (but an option to specify a name is provided to facilitate calling this function from save_nc).

Value

no return; adds a structure to an animaltag object

See also

Examples

# \dontshow{
.old_wd <- setwd(tempdir())
# }
BW <- beaked_whale
add_nc("beaked_whale", njerk(BW$A), "Jerk")

# \dontshow{
setwd(.old_wd)
# }