Skip to content
Prev 165458 / 398506 Next

Extract values based on indexes without looping?

On Tue, 23 Dec 2008, Sean Zhang wrote:

            
You need to read

 	An Introduction to R

particularly this section:

 	2.7 Index vectors; selecting and modifying subsets of a data set

...

 		2. A vector of positive integral quantities

Also, see

 	?Subscript

and run

 	example( Subscript )

HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901