Dear Xin,
You really provided great information! You can use the function,
names(). Here is an example:
# mimic your data
a <- c("ae21" = 1.863869)
a
names(a)
# the result should be
> names(a)
[1] "ae21"
Hope that helps, and thanks for making it easy to answer,
Josh
On Fri, Oct 8, 2010 at 11
names(a)
On Fri, Oct 8, 2010 at 3:07 PM, Xgong wrote:
>
> Hi,
>
> I have a question about vector access. sorry if it is too basic.
>
> > a
> ae21
>1.863869
>
> My question is how to retrieve "ae21" from vector "a". here is some other
> information you might need.
>
> > str(a)
> Named num 1.
Hi,
I have a question about vector access. sorry if it is too basic.
> a
ae21
1.863869
My question is how to retrieve "ae21" from vector "a". here is some other
information you might need.
> str(a)
Named num 1.86
- attr(*, "names")= chr"ae21"
> class(a)
[1] "numeric"
> is.vector(a)
[1
3 matches
Mail list logo