Learn R Programming

echoice2 (version 0.2.3)

prep_newprediction: Match factor levels between two datasets

Description

Makes sure the factor levels in data_new are aligned with data_old This is helpful for demand simulations.

Usage

prep_newprediction(data_new, data_old)

Value

long-format choice data

Arguments

data_new

New long-format choice data

data_old

Old long-format choice data

Examples

Run this code
data(icecream)
prep_newprediction(icecream, icecream)

Run the code above in your browser using DataLab