val_psyo {psyosphere}R Documentation

Validate psyo format

Description

Checks if the provided data frame is conforming to the format that is used by psyosphere and returns a warning or stop if necessary.

Usage

val_psyo(tracks, id = 1, p_id = 1, time = 1, lon = 2, lat = 2)

Arguments

tracks

psyo. The data frame that is to be check if it confirms to the psyo format.

id

numeric. An error with force_id will be reported as stop when 2, warning when 1 or nothing when 0.

p_id

numeric. An error with force_p_id will be reported as stop when 2, warning when 1 or nothing when 0.

time

numeric. An error with force_time will be reported as stop when 2, warning when 1 or nothing when 0.

lon

numeric. An error with force_lon will be reported as stop when 2, warning when 1 or nothing when 0.

lat

numeric. An error with force_lat will be reported as stop when 2, warning when 1 or nothing when 0.

Author(s)

Benjamin Ziepert. Please send feedback to: feedback-psyosphere@analyse-gps.com.

See Also

val_cname,val_psyo, val_var

Examples

# Produce a warning ------------------------------------------------------------
data(psyo)
psyo$time <- NULL # remove time column
# e <- val_psyo(psyo); if (e != "") {stop(e)} # remove first "#" to make example work

# Produce a stop ---------------------------------------------------------------
data(psyo)
psyo$time <- NULL # remove time column
# e <- val_psyo(psyo, time = 2); if (e != "") {stop(e)} # remove first "#" to make example work

# Produce a stop without setting "force" ---------------------------------------
data(psyo)
psyo$lon <- NULL # remove time column
# e <- val_psyo(psyo); if (e != "") {stop(e)} # remove first "#" to make example work

[Package psyosphere version 0.1 Index]