ST 308 Final Exam

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

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

23 Terms

1
New cards

Numerical Variables

integer, numeric, and double

2
New cards

Categorical Variables

character and factor

3
New cards

Row Manipulation

  • filter()

  • arrange()


4
New cards

Column Manipulation

  • select()

  • rename()

  • mutate()


5
New cards

Box Plot

used for a numerical variable over categories of a categorical variable

6
New cards

Scatterplot

used for two numerical variables

7
New cards

Bar Plot

used for one categorical variable with frequency on the y-axis

8
New cards

Histogram

used for a numerical variable on the x-axis and frequency on the y-axis

9
New cards

Vector

1-dimensional object that takes values of all one type, such all numerical values

10
New cards

List

1-dimensional object that can take values of different types, such as numerical values AND categories

11
New cards

Data Frame

2-dimensional object with a certain number of rows and columns, very similar to a matrix or array

12
New cards

na.rm = TRUE

tells a function to ignore missing values (NA) when calculating a result

13
New cards

KEY DIFFERENCE BETWEEN QUARTO AND R SCRIPT

  • Quarto can be rendered to a pdf, R Script cannot

  • You need to insert a code chunk to type code in a Quarto document, whereas code is just typed plainly into R Script

  • You can do text, code, and output in Quarto, whereas R Script can only do code and comments with “#”


14
New cards

arrange()

arranges rows based on the values of a given column in ascending order

15
New cards

select()

selects a subset of which columns to keep in (or drop from) the dataset

16
New cards

rename()

renames columns

  • rename(new name = `old name`)


17
New cards

mutate()

creates a new column in a data frame or tibble

18
New cards

filter()

filters rows to only the ones you want

19
New cards

drop_na()

removes rows with missing values (NA) in the specified columns. If no columns are specified, it checks all columns.

20
New cards

if_else()

this is an argument commonly used inside of the “mutate()” function that sets a logical condition and sets observations equal to TRUE or FALSE

Format:

if_else(condition, if true then return…, if false then return…)

Example:

if_else(grade >= 70, "Pass", "Fail")

This means if a grade is 70 or higher, return "Pass". Otherwise, return "Fail".


21
New cards

group_by()

groups rows by the values in one or more columns so later operations can run separately for each group.

22
New cards

summarise()

calculates summary values, returning one row per group or one row for the entire dataset if ungrouped.

23
New cards