From ligges at statistik.uni-dortmund.de  Mon Sep 19 15:58:17 2005
From: ligges at statistik.uni-dortmund.de (ligges@statistik.uni-dortmund.de)
Date: Mon, 19 Sep 2005 15:58:17 +0200 (CEST)
Subject: [Rd] Lists and data frames (PR#8143)
Message-ID: <20050919135817.A9EF41C6B7@slim.kubism.ku.dk>

fwagner at fh-lausitz.de wrote:

> Full_Name: Frank Wagner
> Version: R 2.1.1
> OS: Windows
> Submission from: (NULL) (193.174.73.34)
> 
> 
> Hi,
> The pdf file R-intro descripe on page 27 that lists can be extended by adding
> numbers.
> Unfortunately, it's not working 
> ## example :
> 
> # if i did not declare the variable an error occurs : object not found
> mylist <- list() 
> mylist[1] <- list(value1=3, value2=5)
> ## Error

NO!

1. No, this is not a bug!
2. No, this was not an error but a *warning* which tells you that the 
length does not match.
Each Element of *vector* mylist must be a list of length one, hence you 
cannot assign one of length two. Instead you can say:

mylist[1:2] <- list(value1=3, value2=5)

This is a question that might go to R-help, if you do not understand 
what is described in the docs. The manual is correct, hence this is not 
a bug.
Please read the docs on how to post bugs and how a bug is defined ...

Uwe Ligges



> 
> Can you please help me
> Thank you
> 
> Regards
> Frank Wagner
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Lists and data frames (PR#8143)
ligges@statistik.uni-dortmund.de