Intro to Data Science with R – Key Vocabulary

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/85

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards summarizing essential R functions, statistical terms, and data-handling concepts from the lecture notes. Use them to review key commands, definitions, and ideas for the upcoming exam.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

86 Terms

1
New cards

mean()

R function that returns the arithmetic average of a numeric vector or column.

2
New cards

median()

R function that returns the middle value of a numeric vector or column.

3
New cards

sd()

R function that computes the standard deviation (spread around the mean).

4
New cards

IQR()

R function that calculates the inter-quartile range (Q3 – Q1).

5
New cards

range()

R function that returns a two-element vector of the minimum and maximum values.

6
New cards

quantile()

R function that finds a specified percentile; e.g., probs = 0.25 yields Q1.

7
New cards

min()

R function that retrieves the smallest value of a numeric vector.

8
New cards

max()

R function that retrieves the largest value of a numeric vector.

9
New cards

summary()

Returns six-number summary (min, Q1, median, mean, Q3, max) for a vector or each numeric column of a data frame.

10
New cards

weighted.mean()

Calculates the mean of values using a supplied vector of weights.

11
New cards

exp()

R function that evaluates the exponential function e^x.

12
New cards

log()

Computes the natural logarithm (ln) of its argument.

13
New cards

log10()

Computes the base-10 logarithm of its argument.

14
New cards

sqrt()

Returns the square root of numeric input.

15
New cards

abs()

Returns the absolute value of numeric input.

16
New cards

factorial()

Returns n! for each element of a numeric vector.

17
New cards

sum()

Adds up all elements of a numeric vector or column.

18
New cards

floor()

Rounds numeric values toward negative infinity (always down).

19
New cards

ceiling()

Rounds numeric values toward positive infinity (always up).

20
New cards

round()

Rounds to a specified number of digits; .5s go to the nearest even number.

21
New cards

table()

Base R function that creates a frequency or contingency table for categorical data.

22
New cards

data frame

Two-dimensional heterogeneous data structure with rows as observations and columns as variables.

23
New cards

tibble

Tidyverse’s modern re-imagining of a data frame that preserves column types and prints nicely.

24
New cards

observational unit

Individual entity on which data are recorded in an observational study.

25
New cards

experimental unit

Entity subjected to treatments in an experimental study.

26
New cards

variable

Recorded characteristic of observational/experimental units; can be quantitative or categorical.

27
New cards

quantitative variable

Takes numerical values for which arithmetic operations make sense.

28
New cards

categorical variable

Takes category labels (nominal or ordinal) rather than numeric magnitudes.

29
New cards

discrete variable

Quantitative variable whose possible values have gaps (often counts).

30
New cards

continuous variable

Quantitative variable that can take any value within an interval (no gaps).

31
New cards

ordinal variable

Categorical variable with an inherent order among categories.

32
New cards

nominal variable

Categorical variable whose categories have no natural order.

33
New cards

mean (concept)

Balancing point of a distribution—the arithmetic average.

34
New cards

median (concept)

Value that separates the lower 50 % and upper 50 % of data.

35
New cards

mode

Most frequently occurring observation in a dataset.

36
New cards

standard deviation

Average distance each observation is from the mean.

37
New cards

inter-quartile range (IQR)

Middle 50 % spread; difference between Q3 and Q1.

38
New cards

statistical range

Difference between maximum and minimum values: max – min.

39
New cards

frequency table

Displays counts of occurrences for each category of a categorical variable.

40
New cards

relative frequency table

Displays percentages instead of counts for each category.

41
New cards

contingency table

Cross-tabulation of counts for two (or more) categorical variables.

42
New cards
  • – * /

Basic arithmetic operators for addition, subtraction, multiplication, and division in R.

43
New cards

| & !

Logical OR, AND, and NOT operators in R.

44
New cards

^

Exponentiation (power) operator in R.

45
New cards

%>%

Pipe operator from magrittr/tidyverse that passes the result of one expression into the next.

46
New cards

setwd()

Sets the working directory to a specified file path.

47
New cards

getwd()

Returns the current working directory path.

48
New cards

read.csv()

Base R function to import a comma-separated file into a data frame.

49
New cards

read.table()

Base R import function with flexible delimiter via sep argument.

50
New cards

read.delim()

Reads tab-delimited text files into R (Base R).

51
New cards

read_csv()

readr function (tidyverse) for fast CSV import; automatically sets col_names = TRUE.

52
New cards

read_table()

readr function for whitespace-delimited files.

53
New cards

read_delim()

readr import function allowing any specified delimiter.

54
New cards

read_xls()

readxl function that imports legacy .xls Excel files.

55
New cards

read_xlsx()

readxl function that imports modern .xlsx Excel files.

56
New cards

write.csv()

Base R function to export data to a CSV file (adds row names by default).

57
New cards

write_csv()

readr function to export data to CSV without row names by default.

58
New cards

head()

Shows the first six rows (or n specified) of a data frame.

59
New cards

tail()

Shows the last six rows (or n specified) of a data frame.

60
New cards

glimpse()

Tidyverse function that previews a data frame’s structure horizontally.

61
New cards

View() / view()

Opens data in a spreadsheet-style tab in RStudio.

62
New cards

install.packages()

Downloads and installs an R package from CRAN.

63
New cards

library() / require()

Loads an installed package into the current R session.

64
New cards

package

Collection of R functions, data, and documentation that extends base R functionality.

65
New cards

working directory

Default folder R uses for reading and writing files during a session.

66
New cards

comment

Any text following # is treated as a comment and ignored by R.

67
New cards

R script heading

Lines that start with one or more # and end with ----, ####, or ==== to create foldable headers.

68
New cards

numeric (double)

Default numeric class in R, stored with double-precision decimals.

69
New cards

integer

Whole-number class in R; created by appending L (e.g., 5L).

70
New cards

character

Class for text strings enclosed in quotes.

71
New cards

logical

TRUE/FALSE values resulting from Boolean expressions.

72
New cards

vector

One-dimensional collection of values of the same class; fundamental R object.

73
New cards

factor

Special class for categorical variables with fixed possible values (levels).

74
New cards

as.numeric()

Coerces an object to numeric if possible.

75
New cards

as.character()

Coerces an object to character strings.

76
New cards

length()

Returns the number of elements in a vector or the number of columns in a data frame.

77
New cards

nrow()

Returns the number of rows in a two-dimensional object.

78
New cards

ncol()

Returns the number of columns in a two-dimensional object.

79
New cards

dim()

Returns a two-element vector of rows and columns for 2D objects.

80
New cards

square brackets []

Primary indexing syntax: rows, columns for 2D objects or positions for vectors.

81
New cards

names()

Gets or sets names for elements in a vector or column names in data frames.

82
New cards

colnames()

Gets or sets column names specifically for matrices/data frames.

83
New cards

rownames()

Gets or sets row names for matrices/data frames.

84
New cards

indexing starts at 1

In R, the first element of any object has index 1, not 0.

85
New cards

factorial(value)

Returns value! (repeated multiplication down to 1).

86
New cards

factorial(vector)

Vectorized factorial; computes n! for each vector element.