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
With good renaming along the way. Like so (which needs a little tidying for readability):
dat <- dat %>%
bind_cols(model.matrix(~ 0 + .$gleasoncat) %>% as_tibble() %>% select(-1)) %>%
rename_at(vars(starts_with(".$")), ~ str_replace(., ".\\$gleasoncat", "Gleason "))
Note also the dropping of the intercept column from model.matrix and the redundant baseline column (which would cause identifiability problems in models) via select(-1)
The text was updated successfully, but these errors were encountered:
With good renaming along the way. Like so (which needs a little tidying for readability):
Note also the dropping of the intercept column from
model.matrix
and the redundant baseline column (which would cause identifiability problems in models) viaselect(-1)
The text was updated successfully, but these errors were encountered: