Learn R Programming

SPOT (version 2.4.2)

preprocessTestData: preprocessTestData

Description

Combine Province/State and Country/Region information.

Usage

preprocessTestData(testData)

Arguments

testData

data frame with $n$ obs. of 4 variables:

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

Locality information is merged with the paste command as follows: paste(testData$Country_Region, testData$Province_State, sep="/"). 4-dim data is reduced to 3-dim data.

Examples

Run this code
# NOT RUN {
# testData <- preprocessTestData(regionTest)
# }

Run the code above in your browser using DataLab