Re: [R] Select rows of a data frame according to values of vector in a list

2014-01-03 Thread Mohammad Tanvir Ahamed
Thanks !!   Best regards ...  Tanvir Ahamed Göteborg, Sweden From: Rui Barradas -h...@r-project.org> Sent: Friday, 3 January 2014, 10:58 Subject: Re: [R] Select rows of a data frame according to values of vector in a list He

Re: [R] Select rows of a data frame according to values of vector in a list

2014-01-03 Thread Rui Barradas
Hello, Try the following. lapply(lis, function(i) df[i, ]) Hope this helps, Rui Barradas Em 03-01-2014 09:04, Mohammad Tanvir Ahamed escreveu: Hi there !! I have a list like as follows : lis $lis1 [1] 1 3 5 $lis2 [1] 2 4 6 8 9 I have another data frame like as follows df 1 10 110 2 1