Check whether argument 'seg.var' was adequately provided. If provided, also check for its length (1 or 2) and for the existence of corresponding column names in x If unprovided, use default value (segmentation only) and tests if column names exists.

argcheck_seg.var(x, seg.var, is_segclust)

Arguments

x

data used for segmentation. Supported: data.frame, Move object, ltraj object

seg.var

for behavioral segmentation: names of the variables used for segmentation (either one or two names).

is_segclust

TRUE if function is called from segclust ; FALSE otherwise, if function is called from segmentation.

Value

a list with a data.frame and a vector with two character strings