[R] different file types

janet rosenbaum jerosenb at hcs.harvard.edu
Tue Mar 11 21:39:36 CET 2003


Hi.  I am writing a program to read in different types of files from a
GUI.  While it's easy to read different types of text files, I am
stymied how to make R execute the input.  

Ideally I could get the command from input and dereference it like
	`command`(filename)
where command would be read.dta or read.table or read.xport or any of 
the similar commands.

Also, is there a way to make associative arrays?  
It would be nice to be able to get the format from input and then have
	command<-array[format]

Otherwise, I guess I'll just do cascading if's.

Thanks,

Janet Rosenbaum					  jerosenb at fas.harvard.edu
Center for Basic Research in the Social Sciences, Harvard University



More information about the R-help mailing list