Created
May 14, 2019 11:01
-
-
Save akshat3096/22ad49e690c7d99e110fb78e2ad1446e to your computer and use it in GitHub Desktop.
This file contains 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
# assign column names | |
colnames(x) <- c("A", "B", "C") | |
x | |
#subset using the names | |
x[,c('A')] | |
#using the subset function | |
subset(x,select=c('A')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment