r - Can ls() have a pattern > 1? -
say have 10 data.frame s contain dates in names 01-01-00 10-01-00 other letters , symbols added end in format ddmmyy e.g. 010100/sgh/d_3 and 020100/aff/d_1 if wanted create vector of above data.frame , there way select them without writing them out individually? i tried creating vector of sequence of dates , putting in pattern = came error (code below): dates <- seq(as.date("2000-01-01"),as.date("2000-01-02"),1) dates <- format(dates,"%d%m%y") ls(pattern=dates) in grep(pattern, all.names, value = true) : argument 'pattern' has length > 1 , first element used i'm assuming pattern can 1 value? create pattern matches of date strings want. 1 way join strings | characters: > dates <- seq(as.date("2000-01-01"),as.date("2000-01-10"),1) > dates [1] "2000-01-01" "2000-01-02" "2000-01-03" "2000-01-04" "2000-01-05" [6] "2000-01-0...