[R] assignment in lists
Philippe Grosjean
phgrosjean at sciviews.org
Thu Jun 26 17:24:49 CEST 2003
Hello,
I do not understand the following behaviour. Could someone explain me what
happens?
> a <- NULL
> a$item <- 1:3
> a$item
[1] 1 2 3
> rm(a)
> a <- NULL
> a[["item"]] <- 1:3
Error: more elements supplied than there are to replace
Why do I get an error message using list[["item"]], and not using list$item?
Best,
Philippe Grosjean
...........]<(({°<...............<°}))><...............................
) ) ) ) )
( ( ( ( ( Dr. Philippe Grosjean
) ) ) ) )
( ( ( ( ( LOV, UMR 7093
) ) ) ) ) Station Zoologique
( ( ( ( ( Observatoire Océanologique
) ) ) ) ) BP 28
( ( ( ( ( 06234 Villefranche sur mer cedex
) ) ) ) ) France
( ( ( ( (
) ) ) ) ) tel: +33.4.93.76.38.18, fax: +33.4.93.76.38.34
( ( ( ( (
) ) ) ) ) e-mail: phgrosjean at sciviews.org
( ( ( ( ( SciViews project coordinator (http://www.sciviews.org)
) ) ) ) )
.......................................................................
More information about the R-help
mailing list