Hello Starter

Before posting, please read relevant Help files!

?"$"

where it tells you:

"x$name is equivalent to x[["name", exact = FALSE]]. Also, the partial
matching behavior of [[ can be controlled using the exact argument."
..etc.

-- Bert



On Mon, Mar 25, 2013 at 12:21 PM, Andrew Lin <hlin0...@gmail.com> wrote:

> Hi folks,
>
> I am starter for R. While I tried list as following:
>
> > l <- list()
> > l$foo
> NULL
> > l$foobar <- 1
> > l$foo
> [1] 1
>
> Apparently, foo and foobar are different name for elements in list
> (actually
> foo does not exist). But why they are sharing same value?
>
> Thanks a lot!
>
> Max
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to