Hello
How can I select several not continuous rows ?
If I wanted to select rows 1 to 7 I'll write mydata[,1:7]
But what if I need to select rows 1 to 5 and 10 to 15?
Hello
How can I select several not continuous rows ?
If I wanted to select rows 1 to 7 I'll write mydata[,1:7]
But what if I need to select rows 1 to 5 and 10 to 15?
Briefly:
mydata[1:7,]
mydata[ c(1:5, 10:15), ]
You may want to acquaint yourself with the An Introduction to R manual that came with your R installation to learn more about indexing.