10: Introduction to Importing Data in R

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/20

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:31 PM on 8/26/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Front

Back

2
New cards

What function do you use to import a .csv file? What are its major arguments?

read.csv(“path to file“)

3
New cards

What function builds a path to a file in a way this is independent of platform? (platform being linux, mac, windows, etc.) How does this function work?

file.path()

For this function you enter a series of strings representing the destinations along a path and the endpoint of the path.

4
New cards

What function do you use to import data in a table format? What are the basic arguments for this function, and what do they mean?

read.table()

… : The file name

header: Whether the first row of the file contains the variable names

sep: What separates the values in the file

5
New cards

What function do you use to import non-csv delimited files?

read.delim()

6
New cards

What is the structure of the read import functions?

They all call read.table, but have different default args

7
New cards

What is the readr function to import a csv file? What are the general outputs of readr functions?

read_csv()

readr generally outputs tibbles

8
New cards

What is the readr function to import a delimited file?

read_tsv()

9
New cards

What is the structure of the readr import functions? What are the required args for the main function?

They all call read_delim, but have different default args

The required args are file and delim

10
New cards

What type of function can help you set the type of a column?

A collector function

11
New cards

When do you want to use the data.table package? What is the main function of this package, and what is an advantage of this function that wouldn’t be in the answer of the previous question?

If you want to import and munge large data files

fread() is the main function, and it is conveniant because it can name columns and recognize delim operators without the user

12
New cards

What package allows you to wrangle excel file? What function allows you to see the sheets in the excel file? What function allows you to import an excel sheet?

readxl

read_excel()

excel_sheets()

13
New cards

For the function that imports excel files, what value for what argument allows you to get rid of a column?

col_type = “blank”

14
New cards

What package allows you to better manipulate excel files from within R? What issue does this package commonly run into during installation?

XLConnect

This package runs in conjunction with Java which can cause issues

15
New cards

Using the excel manipulation package, what function allows you to import a workbook? What function allows you to import a sheet? What function allows you to get the name of the sheets in the workbook?

loadWorkbook()

readWorksheet()

getSheets()

16
New cards

What function creates a blank manipulatable sheet? What function allows you to populate this sheet?

createSheet()

writeWorksheet()

17
New cards

What function adds a sheet to an ACTUAL excel file? What is a feature of this function that is important to remember?

saveWorkbook()

This function can save a sheet to a new workbook / file that the function itself creates

18
New cards

What function changes the name of a sheet?

renameSheet()

19
New cards

What function gets rid of a sheet from a workbook?

removeSheet()

20
New cards

FIRST PASS

FIRST PASS

21
New cards

SECOND PASS

SECOND PASS