+ - 0:00:00
Notes for current slide
Notes for next slide

Importing Data


Session 3

1 / 13

Import data to R


There are R packages to import all types of data.
In this course, we'll cover the most
common imports:

csvs and Excel workbooks

2 / 13

Import data to R


There are R packages to import all types of data.
In this course, we'll cover the most
common imports:

csvs and Excel workbooks


We'd like to import the capacity_ae.csv file.


While we could write code from scratch to do this,
it's often easier to get the import wizard to do this
for you.

2 / 13

Import data to R

We will use the "Import Dataset" button (but you can also click on the file itself):


3 / 13

Import data to R

We will use the "Import Dataset" button:


4 / 13

Import data to R

The package used to install csvs is {readr} which is loaded with the {tidyverse} package.

Excel workbooks require the package {readxl}.


5 / 13

Import wizard

Locate the file capacity_ae.csv


6 / 13

Import wizard


7 / 13

Import wizard


8 / 13

Import wizard


9 / 13

Import wizard


10 / 13

Import wizard

Once copied then select Cancel and then Paste.

From the clipboard:

11 / 13

Import wizard

Once copied then select Cancel and then Paste.

From the clipboard:

Where just one line copied:

11 / 13

Run code from the editor


No need to highlight all code to run.


Put the cursor in the line you want to run then select the button to Run or Ctrl + Return

12 / 13

This work is licensed as


Creative Commons
Attribution
ShareAlike 4.0
International
To view a copy of this license, visit
https://creativecommons.org/licenses/by/4.0/

13 / 13

Import data to R


There are R packages to import all types of data.
In this course, we'll cover the most
common imports:

csvs and Excel workbooks

2 / 13
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow