Re: [R] find index in a list of list

2017-03-11 Thread ce
nour I didn't want to use "for loop". ce -Original Message- From: "Jeff Newmiller" [jdnew...@dcn.davis.ca.us] Date: 03/11/2017 11:23 AM To: r-help@r-project.org, "ce" , "Rui Barradas" Subject: Re: [R] find index in a list of list Since the of

Re: [R] find index in a list of list

2017-03-11 Thread Jeff Newmiller
ndex of where a = 11 and b = "y" and I have >no c value , > >-Original Message----- >From: "ce" [zadi...@excite.com] >Date: 03/11/2017 10:13 AM >To: r-help@r-project.org, "Rui Barradas" >Subject: Re: [R] find index in a list of list > > >

Re: [R] find index in a list of list

2017-03-11 Thread ce
-Original Message- From: "ce" [zadi...@excite.com] Date: 03/11/2017 10:13 AM To: r-help@r-project.org, "Rui Barradas" Subject: Re: [R] find index in a list of list Exactly. Thanks a lot, I was trying sapply with to result. -Original Message- From: "Rui Barradas&q

Re: [R] find index in a list of list

2017-03-11 Thread ce
Exactly. Thanks a lot, I was trying sapply with to result. -Original Message- From: "Rui Barradas" [ruipbarra...@sapo.pt] Date: 03/11/2017 10:06 AM To: "ce" , r-help@r-project.org Subject: Re: [R] find index in a list of list Hello, Something like this? find <-

Re: [R] find index in a list of list

2017-03-11 Thread Rui Barradas
Hello, Something like this? find <- list(a=11,b="y") which(sapply(mylist, identical, find)) Hope this helps, Rui Barradas Em 11-03-2017 14:59, ce escreveu: Hi all, I have a list of lists like this : mylist <- list(list(a=10,b="x"),list(a=11,b="y"),list(a=12,b="z")) I want to find the ind

[R] find index in a list of list

2017-03-11 Thread ce
Hi all, I have a list of lists like this : mylist <- list(list(a=10,b="x"),list(a=11,b="y"),list(a=12,b="z")) I want to find the index of list in mylist where a = 11 and b = "y" , so I want to get 2 as a result Thanks in advance __ R-help@r-projec