This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example ordering of elements in a factor for use in a graph: | |
mock <- data.frame( | |
element = as.factor(c(rep("foo", 10), rep("bar", 10), rep("hello", 10))), | |
value = rnorm(30)) | |
levels(mock$element) | |
# [1] "bar" "foo" "hello" | |
# defining custom order for the elements: | |
my_order <- as.character(c("hello", "foo", "bar")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("hello") |