Skip to contents

This function parses a obs_filter argument passed through a predict_... function into a string ready to be evaluated in merge_prediction(). The output string will be parsed within a case_when. The obs_filter passed sets a threshold for fitting models and generating predictions for data based on number of observed data points. So, '>=5' would be that we only want to fit a model, generate predictions and use them them to replace observations if there are 5 or more observations. Thus, in case_when(), we pass the first logical argument to be anywhere there is NOT '>=5' observations.

Usage

parse_obs_filter(obs_filter, response)

Arguments

obs_filter

Obs filter string to assert

response

Name of response column

Value

String for eval and parsing