Created
May 14, 2019 09:29
-
-
Save akshat3096/1ce63459469a675a4ee38f93d8f32ae8 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
x <-c(10,12,23,45,84,25,15,56,09) | |
#selecting one element | |
x[1] | |
#selecting multiple elements | |
x[c(3,9)] | |
#dropping certain elements | |
x[-c(1,2)] | |
#checking for values gretaer than 20 | |
x[x>20] | |
#blank brackets, returns the original vector | |
x[] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment