Skip to content

Add informative error when user passes a column name with a typo to cb_add_col_attributes #42

@mbcann01

Description

@mbcann01

Overview

I was working on the L2C data.

l2c_sample |> 
  
  cb_add_col_attributes(
    ml_gener, 
    description = "Master log gender",
    source = "Mater Log",
    col_type = "Categorical"
  )

And got the following error

Error in attr(df[[.x]], arg_names[i]) <- args[[i]] : 
  attempt to set an attribute on NULL

The problem was that I typed ml_gener as the column name instead of ml_gender. We should try to catch this and give an informative error.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions