>
> R> as.vector(sapply(my.cache.list, function(x)strsplit(x, "\\.")[[1]][2]))
> [1] "subject_test"  "subject_train" "y_test"        "y_train"
>
>
> R> gsub("df\\.(.*)\\.RData", "\\1", my.cache.list)
> [1] "subject_test"  "subject_train" "y_test"        "y_train"
>
>
> Note that "." will match any character, while "\\." matches a period.



Thank you for your various suggestions.

______________________________________________
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.

Reply via email to