Newbie Script Question (Sorry this is probably so simple)

R programming language resources Forums Data manipulation Newbie Script Question (Sorry this is probably so simple)

This topic contains 0 replies, has 1 voice, and was last updated by  djs05101985 4 years, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1102

    I’ve been experimenting with R for a few days – loving the program. I just started trying to write scripts. I’m trying to write a script that reads in data from a file. I’d like a dialog box to select the file. I pasted my script below but when I execute this script no dialog box appears. I’m running the program in terminal on a Mac. Any ideas?

    `#store the current directory
    initial.dir<-getwd()

    #set the output
    sink(“PROGOUT.out”)

    #load data
    spread<-read.table(file.choose(), sep=”,”, header=TRUE)

    #do stuff

    #close output
    sink()
    ~

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.