Try this:

setdiff(list, s)

On Thu, Aug 12, 2010 at 5:32 PM, André de Boer <rnieuws@gmail.com> wrote:

> Hi,
>
> I want to eliminate an element of a list:
>
> list <- seq(1,5,1)
> s <- sample(list,1)
>
> lets say s=3
> Now I want to remove 3 from the list: list2 = {1,2,4,5}
>
> Can someone give me a tip?
>
> Thanks,
> André
>
>        [[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.
>
>


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

	[[alternative HTML version deleted]]

