On Fri, Jun 1, 2012 at 1:01 PM, meatloafthefrog <meatloafthef...@gmail.com> wrote: > I want a prompt that asks the user for the file name of the table, > the response to which will be the name of the table in R. > > So I did something like: > > file_name = function() #This > function, when called up, prompts the user to enter the file name. > { > readline("Enter name of csv file: ") > } > filename = file_name()
For what you're trying to do, consider simplifying to: filename <- readline(file.choose()) HTH James ______________________________________________ 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.