example("dittoExampleData", echo = FALSE)
colLevels("conditions", example_df)
# Note: Set 'used.only' (default = TRUE) to FALSE to show unused levels
# of data that are already factors. By default, only the used options
# of the data will be given.
colLevels("conditions", example_df,
rows.use = example_df$conditions!="condition1"
)
colLevels("conditions", example_df,
rows.use = example_df$conditions!="condition1",
used.only = FALSE)
Run the code above in your browser using DataLab