split_across_n_m: split_across_n_m

Description Usage Arguments Examples

View source: R/DAY1.R

Description

This function takes a vector x of raw snow observations and split the vector across n or more m's into a list of vectors.

Usage

1
split_across_n_m(x, n = 2, m = 0)

Arguments

x

A sequential change of SWE values. This is a vector object.

n

This represents the zeros to split a vector. The default is 2, if there are two consecutive zeros, the vector will be split at that point.

m

This represents the value when encountered will serve as a a splitting point.

Examples

1
2
x <- c(1, 2, 0, 0, 0, 4, 5, 0, 3, 0, 0, 2, 1, 3)
rdailychange:::split_across_n_m(x)

Kinekenneth48/rdailychange documentation built on Dec. 18, 2021, 3:34 a.m.