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

Auto-select numeric columns in multi_cutpointr #16

Closed
xrobin opened this issue Mar 17, 2019 · 3 comments
Closed

Auto-select numeric columns in multi_cutpointr #16

xrobin opened this issue Mar 17, 2019 · 3 comments

Comments

@xrobin
Copy link
Contributor

xrobin commented Mar 17, 2019

If I run multi_cutpointr on the suicide dataset without specifying x, I get the following error on a non-numeric column:

multi_cutpointr(suicide, class = "suicide")
age:
Assuming the positive class is no
Assuming the positive class has higher x values
gender:
Error in median.default(x[class == uc[1]]) : need numeric data

It is common to have non-numeric columns with different groupings etc. that may not be used right now. Just like the gender column. It would be a nice addition to auto-detect numeric columns only.

@Thie1e
Copy link
Owner

Thie1e commented Mar 26, 2019

Hi, thanks for the suggestion, I think that's a good idea and I've added that feature to the current version on Github, so multi_cutpointr(suicide, class = "suicide") should now run without any problems.

If the new default of x = NULL is kept, an internal function is called that fetches the names of all numeric columns.

@xrobin
Copy link
Contributor Author

xrobin commented Mar 28, 2019

Works great!

@Thie1e
Copy link
Owner

Thie1e commented Mar 29, 2019

Glad to hear that!

@Thie1e Thie1e closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants