Foundations of Business Analytics

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/54

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:12 AM on 9/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

55 Terms

1
New cards

What does <- do in R?

assigns the value on the right to the object name on the left

2
New cards

What is a data frame

table with rows and columns

3
New cards

What is a function in R

a command that takes inputs and returns an output

4
New cards

What is a code chunk in a Quarto .qmd file

a block where you write R code that Quarto runs when rendering, and it shows the results (numbers/tables/plots) in the output.

5
New cards

What does Render do in Quarto?

runs all code chunks and converts the .qmd into an output document (e.g., HTML/PDF) with the results inserted

6
New cards

What is a package in R?

a collection of functions, data, and documentation that extends the basic capabilites of R

7
New cards

How business decision-making has evolved

  1. Gut instinct (hippo era)

  2. Simple data support

  3. Advanced analytics

  4. Experimentation and causal learning


8
New cards

Types of business analytics

Descriptive

predictive

causual/prescriptive

9
New cards

What does ```{r} mean in Quarto?

starts an R code chunk

10
New cards

What does #| eval: false do?

tells Quarto not to run this code chunk when rendering

11
New cards

What does library(readr) do?

  • It loads the readr package so you can use functions from it (including read_csv())


12
New cards

What does class() do

Tells you what type of object something is

Use it as quick sanity check right after importing data, to confirm R read it in the way you expected.

13
New cards

What does names() do

Lists the column/variable names of a data frame

14
New cards

What does head() do

hows just the first few rows of a data frame (6 rows, by default)

preview your data without flooding the screen, handy for datasets with hundreds or thousands of rows

15
New cards

nrow()

Counts how many rows a data frame has

16
New cards

ncol()

Counts how many columns a data frame has

17
New cards

any()

Checks a condition across a whole column of values and returns a single TRUE if at least one value meets it, or FALSE if none do

18
New cards

sum()

dds up every value in a numeric column to give a single total.

19
New cards
20
New cards

ggplot()

Starts a new plot and tells R which dataset to build it from

21
New cards

aes()

Maps columns in your data to visual features of the plot

22
New cards

labs()

Adds or changes the text labels on a plot, such as the axis titles and the main title.

23
New cards

bins

how many bins to split the data into (for histogram)

24
New cards

facet_wrap()

Splits one plot into a grid of smaller plots, one panel per category.

25
New cards

geom_point()

Draws a scatter plot, one dot for every row of data

26
New cards

geom_smooth()

Adds a fitted trend line through your data.

27
New cards

method

the type of line to fit for trendline, for example "lm" for a straight regression line.

28
New cards

se

whether to show a shaded confidence band around the trendline. Set to FALSE to hide it.

29
New cards

alpha

the clarity of the points on scatter plot

30
New cards

scale_x_continuous()

Controls how the x-axis of a plot is drawn

31
New cards

trans

a transformation to apply to the axis, for example "log10"

32
New cards

labels

how to format the axis numbers, for example

33
New cards

scale_fill_okabe_ito()

Applies a colorblind-friendly set of colors to whatever is mapped to fill in your plot

34
New cards

theme_bw()

Switches the plot to a clean black-and-white theme

35
New cards

fct_infreq()

Reorders the categories of a variable by how often they occur, from most common to least common

36
New cards

after_stat()

Lets you use a value that ggplot2 calculates internally while it builds the plot, such as a count, in a further calculation of your own

37
New cards

dplyr

A package for wrangling data

38
New cards

filter()

Keeps only the rows that meet a condition you set, and drops the rest

39
New cards

mutate()

Creates a new column in your data, or changes an existing one, based on a calculation you specify

Build new variables

40
New cards

select()

Keeps only the columns you name, and drops the rest.

41
New cards

arrange()

Sorts the rows of your data by one or more columns

42
New cards

slice_max()

Keeps only the rows with the highest values of a column you choose

43
New cards

group_by()

Splits your data into groups based on the values of one or more columns, without changing what the data looks like on screen.

44
New cards

summarise()

Collapses many rows into a single summary row, using calculations you choose, such as an average

45
New cards

slice_head()

Shows the first few rows of your data, in the order they currently appear

46
New cards

n()

Counts how many rows are in the current group

47
New cards

desc()

Flags a column so that arrange() sorts it from highest to lowest instead of lowest to highest.

48
New cards

pivot_longer()

lengthen “short and wide” datasets by stacking values into a single column

49
New cards

pivot_wider()

shorten “long and narrow” datasets by spreading values into multiple columns

50
New cards

What makes data tidy?

Every tidy dataset has the same structure

Makes common R operations easier

51
New cards

!is.na

Checks for values that are not missing

52
New cards

$

Selects 1 variable in a dataset

53
New cards

==

boolean: ensures values on left = values on right

54
New cards

c()

combines arguments into a vector

55
New cards

!

The not operator