Reading Data from File
ReadingData.R
# Specify a file path as a variable fpath <- "outputs/cars.csv" # Read our csv file dat <- read.csv(fpath)
Other code in the console
# Read the first 5 lines of a file readLines(fpath, n = 5) # Can also use read.table, specifying the header and separator parameters. # read.table(fpath, header = T, sep = ",")
