get_milepost: Get Milepost

Description Usage Arguments Value Examples

View source: R/get_milepost.R

Description

Get 4 milepost moments T.1, T.2, Z.1 and Z.2

Usage

1
get_milepost(pre_data, Beginning_Time)

Arguments

pre_data

dataframe with 4 predicted indicators:

  • date: the exact day in the formate "%y-%m-%d" as a character

  • infection_rate.pre: prediction result of infection rate

  • removed_rate.pre: prediction result of removed_rate

  • active_cases.pre: prediction result of active_cases

  • confirmed.pre: prediction result of confirmed cases All of these data is calculated from the Beginning_Time. And it is always generated by function prediction().

Beginning_Time

the selection of beginning time, which must be in the formate "%y-%m-%d" as a character.

Value

dataframe contains 4 milepost T.1, T.2, Z.1, Z.2, which must be in the formate "%y-%m-%d" as a character.

Examples

1
2
3
4
5
6
Beginning_Time <- "2020-01-29"
M <- 5
indicators <- get_indicators(DemoPreTurningPointsCOVID19::COVID19_CN)
velocity <- calc_velocity(indicators, M, Beginning_Time)
pre_data <- get_future_indicators(indicators, velocity, Beginning_Time)
mileposts <- get_milepost(pre_data, Beginning_Time)

YuanchenZhu2020/DemoPreTurningPointsCOVID19 documentation built on Aug. 17, 2020, 12:24 a.m.