[R] How to select rows, not in sequence

Neha gupta neh@@bo|ogn@90 @end|ng |rom gm@||@com
Sat Jul 24 13:38:28 CEST 2021


Hi

If I have to select specific rows and all columns of a dataframe, I use:

rows= df[1:12 , ]

However, how to select rows if our required rows are not in sequence i.e.
if we need to select row numbers 1,2,5,7, and 12..

Warm regards

	[[alternative HTML version deleted]]



More information about the R-help mailing list