Learn R Programming

SPOT (version 2.4.2)

preprocessCdeTestData: preprocessCdeTestData

Description

Rename variables and factorize location information.

Usage

preprocessCdeTestData(testData)

Arguments

testData

data frame with location information:

ForecastId

int Identifier 1 2 3 ...

Province_State

chr Province/State

Country_Region

chr Country/Region, e.g., "Afghanistan" ...

Date

Date, format: "2020-04-02" ...

Value

A data frame that can be processed by generateMCPrediction to predict results on test data using the tuned {link{modelMarkovChain} model. Data.frame with $n$ obs. of 3 variables:

ForecastId

int Identifier 1 2 3 ...

Region

Factor w/ m levels, e.g., "Afghanistan/",..: 1 1 1 1 1 1 1 1 1 1 ...

Date

Date, format: "2020-04-02" ...

Details

The variable location is renamed to Region and converted to a factor variable.

Examples

Run this code
# NOT RUN {
# testData <- preprocessCdeTestData(cde20200813)

# }

Run the code above in your browser using DataLab