[R] vector access
jwiley.psych at gmail.com
Fri Oct 8 22:26:04 CEST 2010
You really provided great information! You can use the function,
names(). Here is an example:
# mimic your data
a <- c("ae21" = 1.863869)
# the result should be
Hope that helps, and thanks for making it easy to answer,
On Fri, Oct 8, 2010 at 11:07 AM, Xgong <xingong98 at gmail.com> wrote:
> I have a question about vector access. sorry if it is too basic.
> My question is how to retrieve "ae21" from vector "a". here is some other
> information you might need.
> Named num 1.86
> - attr(*, "names")= chr"ae21"
>  "numeric"
>  TRUE
>  1.863869
> Thank you in advance for your help!
> View this message in context: http://r.789695.n4.nabble.com/vector-access-tp2968825p2968825.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Ph.D. Student, Health Psychology
University of California, Los Angeles
More information about the R-help