Skip to content

Issues with - in Variable Names #113

@allicamm

Description

@allicamm

Hi Brandon,

I'm having an issue using pdp for a dataset with dashes in variable names.
When I run this line of code:
partial(model, train = training_final, pred.var = 'marital_status_Married-civ-spouse', plot = TRUE)

It looks like some code in PDP is losing the quotes for this and hence the variable name is getting cut off at the dash:

Error in eval(expr, envir, enclos) :
object 'marital_status_Married' not found

Obviously this could be fixed on my end with changing variable names before creating my model, but figured this might be an issue others run into as well.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions