Skip to content
Prev 221671 / 398500 Next

select elements in a list

Hi,

This should work:
select <- l[which(l==x):which(l==y)]

The problem is that you tried to select the values, but gave x and y as 
indexes. That's why you didn't get the expected result.

See ?which for more info.

HTH,
Ivan

Le 5/21/2010 11:07, arnaud Gaboury a ?crit :