[R] number of location attribute with its name
David Winsemius
dwinsemius at comcast.net
Sun May 16 13:30:56 CEST 2010
On May 16, 2010, at 2:24 AM, Agustín Muñoz M. (AMFOR) wrote:
> hi everybody, a question, as I can know the location (number) of an
> attribute with its name.
>
> Ej.
>
> X1 X2 X3 X4 X5 X6
> 1 3 5 2 1 7
> 6 7 4 5 2 9
>
> as I can know that the attribute "X4" is in position 4
It is probably not an attribute in R terms, but rather a column name.
Your English is a bit unclear as to what you want but perhaps you want:
names(dataframe_name)[4]
--
More information about the R-help
mailing list