[R] Extracting index in character array.
Christian Raschke
crasch2 at tigers.lsu.edu
Wed Oct 13 19:11:54 CEST 2010
> which(list=="C")
[1] 3
See ?which
On 10/13/2010 11:56 AM, lord12 wrote:
> If I have a character array:
>
> list = c("A", "B", "C")
>
> how do I access the third element without doing list[3]. Can't I find the
> index of "C" using a particular function?
>
--
Christian Raschke
Department of Economics
and
ISDS Research Lab (HSRG)
Louisiana State University
Patrick Taylor Hall, Rm 2128
Baton Rouge, LA 70803
crasch2 at lsu.edu
More information about the R-help
mailing list