Created
May 14, 2019 10:58
-
-
Save akshat3096/bad0216a3cc10bd5496a9099658f1fd9 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 <- matrix(1:6,nrow=2,ncol=3) | |
x | |
#selecting an element | |
x[1,1] | |
#selecting just one row | |
x[2,] | |
# selecting one or more columns | |
x[,c(1,2)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment