Reading a text file into R
- Right-click on the link to the data-file and choose the option: "Save Target As...".
- Save the data-file in an appropriate directory. (To simplify things, you can save it in the working directory of R.)
- Start R, and check to see that data-file is indeed in the working directory with the function dir(). You can change the working directory to the directory that contains the data-file by selecting File/Change dir... in the upper command ruler of the R window.
- Use the command: data <- read.table("data-file-name") in order to read the data-file in a data frame object named data. Note that in some cases you may need to use non-default options of the function read.table.