-
Notifications
You must be signed in to change notification settings - Fork 12
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
love.plot()
option to remove missing indicators of categorical variables
#89
Comments
To remove them, you should first create a
Fortunately it's not too hard (one or two extra lines of code) so I don't plan on adding this as an option. But at least you don't need to modify the |
Thanks, that's a nice workaround! Unfortunately, when I try to add the labels in the love plot with
This gives me an error in the assingment |
Ah, that's annoying. I'll work on making a fix for this. In the meantime, you can just change the row names of matches <- na.omit(match(v$old, rownames(b$Balance))
rownames(b$Balance)[matches] <- v$new[matches] before supplying it to |
Yes, that would be a workaround for this reproducible example. It wouldn't work for my particular case when dealing with categorical variables, because in
But don't worry, I'll tweak the code to print the correct labels. It would be great if a solution for this scenario is added to the package in the near future. Thank you very much! |
Dear @ngreifer,
I have a data set where some variables have some missing values. When I use the
love.plot()
function, it adds a variableVAR: <NA>
for each categorical variable that has missing values. Is there a way to exclude these missing indicators from the plot? If there's no way to do this, I think it would be a nice feature to add to the function. It's really hard to exclude them afterwards in ggplot.Thank you very much!
The text was updated successfully, but these errors were encountered: