Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mbcann01 opened this issue Aug 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mbcann01
Copy link
Member

mbcann01 commented Aug 2, 2023

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.

@mbcann01 mbcann01 self-assigned this Aug 2, 2023
@mbcann01 mbcann01 added the bug Something isn't working label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant