You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found an easy way to remove the base factor name when plotting only the coefficients of a factor:
since this is ggplot2, I can just add a function to label the y axis that removes the factor name that appears in the beginning of the coefficient. It uses the str_replace function from stringr.
Found an easy way to remove the base factor name when plotting only the coefficients of a factor:
since this is ggplot2, I can just add a function to label the y axis that removes the factor name that appears in the beginning of the coefficient. It uses the str_replace function from stringr.
coefplot(model,
sort = "magnitude",
predictors = iPredictor,
decreasing = FALSE) +
scale_y_discrete(label=function(x) { str_replace(x, iPredictor, "") } )
Perhaps this can be added into the codebase to do this automatically?
The text was updated successfully, but these errors were encountered: