Importing data
There are numerous ways of importing data depending on if you have the files locally on your computer or if they are available on the internet. Different functions (and packages) are needed to import data based on it's location and file type. The two functions you will probably use most often are base R's read.csv()
and {readr}
's read_csv()
. I recommend reading the documentation for both of these (?read.csv()
and ?readr::read_csv
).
And don't forget that here::here()
will help facilitate data import when you are using R Projects (which you should!).
Exporting data
Typically, exporting data to files is more straightforward because most of the time, you will be exporting CSV files. Again, the two functions you will probably use most often are base R's write.csv()
and {readr}
's write_csv()
(?write.csv()
and ?readr::write.csv
).
Wrap-up
Congratulations, you finished the tutorial!
To get credit for this assignment, replace my name with the first name that you submitted in the course introduction form in the code below and click Run Code to generate the text for you to submit to Canvas.
# replace my name below with your first name (surrounded by quotes)
first_name <- "Jeff"
generate_text(first_name)
Assignment complete!
Great! Copy that code into Canvas, and you're all set for this tutorial.