[R] Removing variables

Spencer Graves spencer.graves at pdf.com
Wed Aug 13 19:57:20 CEST 2003



 > x1 <- 1
 > y1 <- 1
 > objects(pattern="*1")
[1] "x1" "y1"
 > remove(list=objects(pattern="*1"))
 > objects(pattern="*1")
character(0)

Hope this helps.  spencer graves

Aurora Torrente wrote:
> Hi all,
> 
> Is there any way to remove at the same time several variables that share 
> a suffix, for example (similar to * or ?  in DOS) ?
> Thanks in advance,
> 
>       Aurora
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list