[R] assigning a file name, or part of, to an object

Jim Bouldin jrbouldin at ucdavis.edu
Fri Jan 22 17:33:57 CET 2010


Is there a way to capure all, or part, of a filename and assign it to an
object.  Say I wanted to read in a file tiled "example.txt" and then assign
the character string "example" (or "exa" or any other substring of
"example" for that matter), to object a.  Is there a simple way to do so? 
Thanks in advance for any help.



Jim Bouldin
Research Ecologist
Department of Plant Sciences, UC Davis
Davis CA, 95616
530-554-1740



More information about the R-help mailing list