stringToFactor | R Documentation |
rezrDF
to factorsChange the strings in a rezrDF
to factors
stringToFactor(df, colsToChange = NULL, levels = list())
df |
The data.frame to be modified. |
colsToChange |
The columns to be modified. If left blank, all character columns will be factor-fied. |
levels |
Factor levels, as a list with each label being a column name. |
The column in factor format.
sbc007$treeEntryDF = sbc007$treeLinkDF %>% rez_mutate(Relation = stringToFactor(case_when(Relation == "Subj" ~ "Subj", T ~ "NonSubj")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.