d3_method: Calculate D3 Method for Snow Loads

Description Usage Arguments Value Examples

View source: R/day3.R

Description

Given a dataframe, a column of which includes snow observations, this function will calculate the D3 Method.

Usage

1
d3_method(df, col_name = "SWE")

Arguments

df

The dataframe containing snow observations.

col_name

Character string of the column name containing the snow observations.

Value

A list of numeric vectors containing the observations for the D3 Method (list split across 2 or more raw observations of 0).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ID <- rep("USW00023062", 13)
NAME <- rep("DENVER-STAPLETON", 13)
STATE <- rep("CO", 13)
LATITUDE <- rep(39.7633, 13)
LONGITUDE <- rep(-104.8694, 13)
DATE <- c(1950-11-08, 1950-11-09, 1950-11-10, 1950-11-11, 1950-11-12,
          1950-11-13, 1950-12-05, 1950-12-06, 1950-12-07, 1950-12-08,
          1951-01-06, 1951-01-07, 1951-01-08)
SWE <- c(22.553862, 29.897561, 15.685390, 11.953282, 8.247274, 4.224420,
         13.676186, 13.737334, 9.453138, 4.829772, 20.319270, 10.564117,
      10.595503)
sample_data <- data.frame(ID, NAME, STATE, LATITUDE, LONGITUDE, DATE, SWE)
rdailychange:::d3_method(sample_data)

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