5 Preparing and importing Tidy Data
Tutorial learning objectives
In this tutorial you will:
- Review how to format your data
- Learn how to save a file in CSV (comma-separated values) format
- Learn how to import a CSV file from a website into a
tibble
in R
- Learn how to import a CSV file from a local directory into a
tibble
in R
- Learn how to get an overview of the data and variables in your
tibble
Importing data should be a straightforward task, but this is not always the case; sometimes data files are not formatted properly, so you need to be careful to check what you import.
Here, you’ll learn (or review) how to format your own data files according to best practices, so that you or others will have no problems importing them.
It is assumed that if you are collecting data during a project, you’ll likely enter them on your computer using a spreadsheet software program like Excel.
PAUSE: Before starting any data collection and data-entry, ask yourself: how should I organize the spreadsheet for data-entry?
The short answer: according to TIDY formatting principles…