[R] Wild cards for dataframes

Steven Yen @tyen @end|ng |rom ntu@edu@tw
Fri Oct 22 11:20:30 CEST 2021


I like to be able to use a command with something similar to a "wild 
card". Below, lines 4 works to delete all three dataframes, but line 5 
does not work. Any elegant way to accomplish this? My list of dataframes 
can be long and so this would be convenient.

data.1<-data.frame(x=1:3,y=4:6,z=7:9)
data.2<-data.1
data.3<-data.1
rm(data.1,data.2,data.3)
rm(data.*)



More information about the R-help mailing list