P1 - Data Structures Flashcards

1
Q

Array function

A
  • A 3D structure that takes one data type

- array(df, dim = c(1,1,1))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Matrix function

A
  • 2D data structure that only takes one data type

- matrix(df, nrow = x, ncol = y, byrow = T/F, dimnames = list(c()))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Factor function

A
  • Converts characters to factor (categorical)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data frame function

A
  • 2D structure that uses many data types

- data.frame( variable name = c(“help”, “hello”), number variable = c(1,2)…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Use the summarise function and remove NA values.

A
  • summarise(df, NEW column name = mean(column, na.rm = TRUE))
How well did you know this?
1
Not at all
2
3
4
5
Perfectly