check_pname: Check that newly created variable names don't overlap

View source: R/utils-misc.R

check_pnameR Documentation

Check that newly created variable names don't overlap

Description

check_pname is to be used in a slather method to ensure that newly created variable names don't overlap with existing names. Throws an warning if check fails, and creates a random string.

Usage

check_pname(res, preds, object, newname = NULL)

Arguments

res

A data frame or tibble of the newly created variables.

preds

An epi_df or tibble containing predictions.

object

A layer object passed to slather().

newname

A string of variable names if the object doesn't contain a $name element


cmu-delphi/epipredict documentation built on March 5, 2025, 12:17 p.m.