Hi, you can use this:

TEST[[3]]<-NULL
> TEST
[[1]]
[1] "A1" "A2"

[[2]]
[1] "B1" "B2"

 Saludos
 Jaime Arturo Coral
student PUCP - PERU


 On 10/18/05, Dennis Fisher <[EMAIL PROTECTED]> wrote:
>
> Colleagues,
>
> I have created a list in the following manner:
> TEST <- list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2"))
>
> I now want to delete one element from the list, e.g., the third. The
> command
> TEST[[3]]
> yields (as expected):
> [1] "C1" "C2"
>
> The command
> TEST[[-3]]
> yields:
> Error: attempt to select more than one element
>
> How can I accomplish delete one or more elements from this list?
>
> I am running R2.2.0 on a Linux platform.
>
> Dennis
>
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-415-564-2220
> www.PLessThan.com <http://www.PLessThan.com>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



--
Saludos cordiales
J Arturo Coral

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to