Read a Dataframe

Use read.table function to read the data frame.
Use header = T to specify that the first row contains headers.
Use double backslashes (\\) rather than single forward slashes to specify file folders.
Specify a name for the dataframe, then use ‘gets’ (<-) to attach the file to the dataframe name.
Use skip = 1 to skip one row of the csv file (useful for skipping crap at the beginning of downloaded files)

Example

worms <- read.table("\\Users\\Phil\\R...\\worms.csv",header = T,row.names=1)
Advertisements