Skip to content

Instantly share code, notes, and snippets.

@tengpeng
Created February 26, 2015 23:02
Show Gist options
  • Save tengpeng/43d37a089d538ab5b1c0 to your computer and use it in GitHub Desktop.
Save tengpeng/43d37a089d538ab5b1c0 to your computer and use it in GitHub Desktop.
Convert multiple columns into factors
p143[1:2] = lapply(p143[1:2], as.factor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment