Still learning basic syntax in R. Basic example code is provided below.
I know how to call consecutive rows but what if, for example, I wanted the 1st and 3rd row? Or better yet, since that is easily called by w[-2,] in this example, what if the data set was larger and I had the need to investigate the 3rd, 5th and 8th row?
> w<-data.frame(names=c("betty","freddy","sammy"),high.fiving.ability=c(50,50,100)) > w[2:3,] names high.fiving.ability 2 freddy 50 3 sammy 100
BTW I looked at other posts including this one: Filtering a dataframe but what I am looking for is even more basic than that.