Predict

predict_date(
  province,
  ncov = c(ncov, ncovChina),
  ifplot = TRUE,
  addtitle = NA,
  ifchinese = FALSE,
  fontfamily = NA,
  predDate = Sys.Date()
)

Arguments

province

province short name

ncov

ncov data

ifplot

logic.

Value

a figure.

Examples

Sys.setlocale("LC_CTYPE", "Chinese")
#> [1] "Chinese (Simplified)_China.936"
ncov <- get_ncov() #Get the data
#> Warning: InternetOpenUrl failed: 'The server name or address could not be resolved'
#> Error in readRDS(gzcon(url("https://github.com/pzhaonet/ncov/raw/master/static/data-download/ncov.RDS"))) : #> cannot open the connection
#> Error: lexical error: invalid char in json text. #> <html> <head><title>503 Servic #> (right here) ------^
ncovChina <- get_ncov("china")
#> Error in open.connection(con, "rb"): Could not resolve host: raw.githubusercontent.com
predict_date(province = "jiangsuinchinese", ncov = ncov)
#> Parsed with column specification: #> cols( #> no = col_double(), #> en = col_character(), #> zh = col_character() #> )
#> Error in predict_date(province = "jiangsuinchinese", ncov = ncov): object 'ncov' not found
predict_date(province = "meiguoinchinese", ncov = ncov)
#> Parsed with column specification: #> cols( #> no = col_double(), #> en = col_character(), #> zh = col_character() #> )
#> Error in predict_date(province = "meiguoinchinese", ncov = ncov): object 'ncov' not found
predict_date(province = "zhongguoinchinese", ncov = ncovChina)
#> Parsed with column specification: #> cols( #> no = col_double(), #> en = col_character(), #> zh = col_character() #> )
#> Error in predict_date(province = "zhongguoinchinese", ncov = ncovChina): object 'ncovChina' not found