Re: [R] How to select rows, not in sequence

2021-07-24 Thread Neha gupta
Thanks a lot Sir, indeed it resolved my issue. Warm regards On Sat, Jul 24, 2021 at 1:51 PM Rui Barradas wrote: > Hello, > > Simply by also passing a vector to the extraction function: > > > rows= df[c(1,2,5,7,12) , ] > > > Hope this helps, > > Rui Barradas > > Às 12:38 de 24/07/21, Neha gupta

Re: [R] How to select rows, not in sequence

2021-07-24 Thread Rui Barradas
Hello, Simply by also passing a vector to the extraction function: rows= df[c(1,2,5,7,12) , ] Hope this helps, Rui Barradas Às 12:38 de 24/07/21, Neha gupta escreveu: Hi If I have to select specific rows and all columns of a dataframe, I use: rows= df[1:12 , ] However, how to select

[R] How to select rows, not in sequence

2021-07-24 Thread Neha gupta
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]]