Data Visualization in R - Midterm Study Guide

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/78

flashcard set

Earn XP

Description and Tags

These flashcards encompass essential concepts and functions related to data visualization and manipulation in R, aiming to help the student review for their midterm exam.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

79 Terms

1
New cards

The function to import comma-separated data in R is __.

read_csv("file.csv")

2
New cards

To export a tibble as CSV, you would use __.

write_csv(df, "out.csv")

3
New cards

The tidy data principle states that each __ corresponds to one column.

variable

4
New cards

Use the pipe %>% to __ multiple steps together.

chain

5
New cards

To check for any missing values in a data frame, you can use __.

any(is.na(df))

6
New cards

In data inspection, the function __ provides a compact structure view.

glimpse(df)

7
New cards

To convert a character variable to a factor, the function used is __.

as_factor(x)

8
New cards

In dplyr, the function __ is used to remove duplicate rows.

distinct()

9
New cards

To sort rows in a data frame, you would use __.

arrange()

10
New cards

The function __ summarizes multiple columns at once.

summarize(across())

11
New cards

To create a new variable based on an existing one, you can use __.

mutate()

12
New cards

The core function to count frequency of values in dplyr is __.

count(var)

13
New cards

The command __ reshapes data from wide format to long format.

pivot_longer()

14
New cards

To fill missing values in a variable, use __.

replace_na(list(var = value))

15
New cards

The function __ allows joining two data frames using a common key.

left_join()

16
New cards

A rectangular shape storing both geometry and attributes in spatial data is called __.

a shapefile.

17
New cards

In ggplot2, to add a regression line, you use __.

geom_smooth(method = "lm")

18
New cards

Shapefile projection can be changed using __.

st_transform(object, crs = 4326)

19
New cards

To visualize distribution by category, you would typically use __.

geom_boxplot()

20
New cards

The function __ is used to handle multiple conditions in data transformation.

case_when()

21
New cards

The function to import comma-separated data in R is __.\n\n

read_csv("file.csv")\n\n

22
New cards

To export a tibble as CSV, you would use __.\n\n

write_csv(df, "out.csv")\n\n

23
New cards

The tidy data principle states that each __ corresponds to one column.\n\n

variable\n\n

24
New cards

Use the pipe %>% to __ multiple steps together.\n\n

chain\n\n

25
New cards

To check for any missing values in a data frame, you can use __.\n\n

any(is.na(df))\n\n

26
New cards

In data inspection, the function __ provides a compact structure view.\n\n

glimpse(df)\n\n

27
New cards

To convert a character variable to a factor, the function used is __.\n\n

as_factor(x)\n\n

28
New cards

In dplyr, the function __ is used to remove duplicate rows.\n\n

distinct()\n\n

29
New cards

To sort rows in a data frame, you would use __.\n\n

arrange()\n\n

30
New cards

The function __ summarizes multiple columns at once.\n\n

summarize(across())\n\n

31
New cards

To create a new variable based on an existing one, you can use __.\n\n

mutate()\n\n

32
New cards

The core function to count frequency of values in dplyr is __.\n\n

count(var)\n\n

33
New cards

The command __ reshapes data from wide format to long format.\n\n

pivot_longer()\n\n

34
New cards

To fill missing values in a variable, use __.\n\n

replace_na(list(var = value))\n\n

35
New cards

The function __ allows joining two data frames using a common key.\n\n

left_join()\n\n

36
New cards

A rectangular shape storing both geometry and attributes in spatial data is called __.\n\n

a shapefile.\n\n

37
New cards

In ggplot2, to add a regression line, you use __.\n\n

geom_smooth(method = "lm")\n\n

38
New cards

Shapefile projection can be changed using __.\n\n

st_transform(object, crs = 4326)\n\n

39
New cards

To visualize distribution by category, you would typically use __.\n\n

geom_boxplot()\n\n

40
New cards

The function __ is used to handle multiple conditions in data transformation.\n\n

case_when()\n\n

41
New cards

To select a subset of rows based on conditions, you would use __.\n\n

filter()\n\n

42
New cards

The function to choose specific columns in a data frame is __.\n\n

select()\n\n

43
New cards

To perform grouped operations, first use __.\n\n

group_by()\n\n

44
New cards

To change the name of a column, use __.\n\n

rename()\n\n

45
New cards

To create a scatter plot in ggplot2, you would use __.\n\n

geom_point()\n\n

46
New cards

The command __ reshapes data from long format to wide format.\n\n

pivot_wider()\n\n

47
New cards

To remove rows containing any missing values, use __.\n\n

drop_na()\n\n

48
New cards

The function to import comma-separated data in R is ****\\.\n\n

read\_csv(\"file.csv\")\n\n

49
New cards

To export a tibble as CSV, you would use ****\\.\n\n

write\_csv(df, \"out.csv\")\n\n

50
New cards

The tidy data principle states that each ****\\ corresponds to one column.\n\n

variable\n\n

51
New cards

Use the pipe %>% to ****\\ multiple steps together.\n\n

chain\n\n

52
New cards

To check for any missing values in a data frame, you can use ****\\.\n\n

any(is.na(df))\n\n

53
New cards

In data inspection, the function ****\\ provides a compact structure view.\n\n

glimpse(df)\n\n

54
New cards

To convert a character variable to a factor, the function used is ****\\.\n\n

as\_factor(x)\n\n

55
New cards

In dplyr, the function ****\\ is used to remove duplicate rows.\n\n

distinct()\n\n

56
New cards

To sort rows in a data frame, you would use ****\\.\n\n

arrange()\n\n

57
New cards

The function ****\\ summarizes multiple columns at once.\n\n

summarize(across())\n\n

58
New cards

To create a new variable based on an existing one, you can use ****\\.\n\n

mutate()\n\n

59
New cards

The core function to count frequency of values in dplyr is ****\\.\n\n

count(var)\n\n

60
New cards

The command ****\\ reshapes data from wide format to long format.\n\n

pivot\_longer()\n\n

61
New cards

To fill missing values in a variable, use ****\\.\n\n

replace\_na(list(var = value))\n\n

62
New cards

The function ****\\ allows joining two data frames using a common key.\n\n

left\_join()\n\n

63
New cards

A rectangular shape storing both geometry and attributes in spatial data is called ****\\.\n\n

a shapefile.\n\n

64
New cards

In ggplot2, to add a regression line, you use ****\\.\n\n

geom\_smooth(method = \"lm\")\n\n

65
New cards

Shapefile projection can be changed using ****\\.\n\n

st\_transform(object, crs = 4326)\n\n

66
New cards

To visualize distribution by category, you would typically use ****\\.\n\n

geom\_boxplot()\n\n

67
New cards

The function ****\\ is used to handle multiple conditions in data transformation.\n\n

case\_when()\n\n

68
New cards

To select a subset of rows based on conditions, you would use ****\\.\n\n

filter()\n\n

69
New cards

The function to choose specific columns in a data frame is ****\\.\n\n

select()\n\n

70
New cards

To perform grouped operations, first use ****\\.\n\n

group\_by()\n\n

71
New cards

To change the name of a column, use ****\\.\n\n

rename()\n\n

72
New cards

To create a scatter plot in ggplot2, you would use ****\\.\n\n

geom\_point()\n\n

73
New cards

The command ****\\ reshapes data from long format to wide format.\n\n

pivot\_wider()\n\n

74
New cards

To remove rows containing any missing values, use ****\\.\n\n

drop\_na()\n\n

75
New cards

To initialize a ggplot object, defining the default dataset and aesthetic mappings, you would use ****\\.\n\n

ggplot()\n\n

76
New cards

Inside ggplot2, to map variables to visual aesthetics (like x, y, color), the function used is ****\\.\n\n

aes()\n\n

77
New cards

To separate a plot into subplots based on one or more discrete variables in ggplot2, you can use ****\\ or ****\\.\n\n

facet\wrap() or facet\grid()\n\n

78
New cards

To add a main title, subtitle, captions, or axis labels to a ggplot visualization, you would use ****\\.\n\n

labs()\n\n

79
New cards

In dplyr, to select rows by their integer position, you would use the function ****\\.\n\n

slice()\n\n

Explore top flashcards

Peripheral Nerve
Updated 905d ago
flashcards Flashcards (62)
-4 Poverty, Part 1
Updated 1088d ago
flashcards Flashcards (61)
BIO-205 Chapter 12
Updated 263d ago
flashcards Flashcards (51)
Anime
Updated 51d ago
flashcards Flashcards (70)
Optics and Vision
Updated 45d ago
flashcards Flashcards (50)
Peripheral Nerve
Updated 905d ago
flashcards Flashcards (62)
-4 Poverty, Part 1
Updated 1088d ago
flashcards Flashcards (61)
BIO-205 Chapter 12
Updated 263d ago
flashcards Flashcards (51)
Anime
Updated 51d ago
flashcards Flashcards (70)
Optics and Vision
Updated 45d ago
flashcards Flashcards (50)