Created
March 17, 2017 15:13
-
-
Save aurielfournier/b3e55425c6d55ce6dc3986c105af5181 to your computer and use it in GitHub Desktop.
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
dat <- data.frame(A=c(1,2,3,4,5,6), B=c("Dog","Cat","Bird")) | |
dat2 <- dat[dat$B!="Bird",] | |
uni <- unique(dat2$B) | |
dat2$B <- factor(dat2$B, levels=uni) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment