P_W_X: probability of rain given previous day's wet/dry status

Description Usage Arguments Value Examples

View source: R/WGEN_ppt.R

Description

probability of rain given previous day's wet/dry status

Usage

1
P_W_X(x, year, return = "both")

Arguments

x

numeric vector of daily precip

year

numeric vector. Passing function the year as well, so don't 'look' at previous day that is actually in previous year.

return

use "both" (return both probabilities), "P_W_W" (probability is wet given previous day was wet), or "P_W_D" (prob wet given previous day was dry)

Value

vector of length 1 or 2

Examples

1
2
3
4
x <- wx_data$PPT_cm[wx_data$month == 1]
year <- wx_data$year[wx_data$month == 1]
return <- "both"
P_W_X(x, year, return)

MartinHoldrege/precipr documentation built on Nov. 4, 2021, 11:10 a.m.