[R] LIST HELP

Henrique Dallazuanna wwwhsd at gmail.com
Thu Oct 9 21:41:33 CEST 2008


Try this:

A1 <- list(abc = letters[1:3], dce = letters[4:6], kpo = letters[7:8])
v <- c("abc", "dce")
A1[setdiff(names(A1), v)]

On Thu, Oct 9, 2008 at 4:01 PM, Rajasekaramya <ramya.victory at gmail.com> wrote:
>
> Hi,
>
> I have a list(A1) of dataframe and a vector containing a 22 list names.
> list(A1)
> abc
>  l m n
>  p q r
>
> dce
>  e g h
>  l k m
>
> kpo
>  a d c
> also i have a vector of list names.
> abc,dce similarly i have 22 elements.
>
> I wanna delete or want a list without the list elements whoes name match up
> the vector.
>
> my result should be
> kpo
> a d c.
>
> i tried lapply it is in working in the way i want.
> Kindly help me
> Ramya
>
>
>
> --
> View this message in context: http://www.nabble.com/LIST-HELP-tp19905212p19905212.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list