1/48
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Functions
blocks of code that perform specific tasks, typically taking inputs, processing them, and returning outputs
Arguments
values passed to functions for processing
sqrt()
a mathematical function that returns the square root of a given number
lm()
a statistical function in R that fits a linear model to data, allowing for the analysis of relationships between variables
rnorm()
a function in R that generates random numbers following a normal distribution, specified by mean and standard deviation
Objects
data structures in R that can store various types of information, including numbers, characters, or lists. cannot begin with numbers or characters
Vectors
one-dimensional arrays in R that hold elements of the same type, such as numeric, character, or logical
Atomic types
the simplest types of data in R, including logical, integer, numeric, complex, character, and raw, which cannot be broken down into simpler components
Lists
data structures in R that can hold elements of different types, including vectors, matrices, or even other lists
Data frames
two-dimensional tabular structures in R that hold elements of different types and are organized into rows and columns, similar to a spreadsheet or a SQL table
data.frame()
a function in R used to create data frames. It allows the user to combine vectors of differing types into a structured, tabular format
Extracting with $
a method in R to access elements of lists, data frames, or other objects by using the dollar sign followed by the name of the element
Packages
collections of R functions, data, and documentation bundled together to extend the functionality of R
ggplot()
a function in R used for data visualization, which creates complex plots by combining layers and aesthetics derived from the data
geom_point()
a function in ggplot2 used to create scatter plots by adding points to the plot, representing data points in a Cartesian coordinate system
mapping = aes()
specifies how data are mapped to visual properties in ggplot2, defining aesthetics such as x and y axes, color, and size
geom_ function
is a generic term in ggplot2 for functions that define geometric objects to be displayed, like points, lines, or bars, allowing the user to visualize data in various formats
aesthetics
refer to the visual elements in a ggplot2 plot that represent data attributes, such as color, size, and shape, allowing for effective data visualization
alpha =
a parameter in ggplot2 that controls the transparency of geometric objects in a plot, allowing for better visualization of overlapping data points
size =
a parameter in ggplot2 that adjusts the size of geometric objects in a plot, helping to emphasize or minimize the display of certain data attributes
shape =
a parameter in ggplot2 that defines the shape of geometric objects in a plot, which can be used to distinguish between different categories of data
color =
a parameter in ggplot2 that sets the color of geometric objects in a plot, which can be utilized to represent different values or categories of data
Setting
if you want to manually set the aesthetic to a value in the visual space, set it outside of aes(). no legend
Mapping
if you want to map the aesthetic to a variable in the data space, map it inside aes(). has legend
Geometric Objects
the visual representations of data points in a ggplot2 plot, such as points, lines, or bars, that help convey the underlying information
geom_smooth
a function in ggplot2 that adds a smoothed line, typically a regression line, to a plot, helping to visualize trends in the data
geom_line
a geometric object in ggplot2 used to connect data points with lines, useful for visualizing trends over time or continuous data
se argument
a parameter in ggplot2 functions that specifies whether to display the standard error around a smoothed line, helping to show the uncertainty of the estimates
Tibbles
a modern version of data frames in R, providing a user-friendly printing method and improved handling of various data types
as_tibble()
a function in R that converts regular data frames or lists to tibbles, ensuring a more consistent and user-friendly experience when working with data
is_titbble()
a function in R that checks if an object is a tibble, returning TRUE if it is and FALSE otherwise
view()
a function in R that opens the data viewer for a data frame or tibble, allowing users to visually inspect and explore the contents of the dataset
tidyverse
a collection of R packages designed for data science, emphasizing clean data and efficient workflows
Isolating
data transformations in R to prevent unwanted side effects and ensure the integrity of data during manipulation
select()
extracts columns of a data frame and returns the columns as a new data frame
filter()
extracts rows from a data frame and returns them as a new data frame. will return every row which the tests return TRUE
Logical tests
conditions evaluated to determine which rows to return, typically used within functions like filter()
arrange()
reorders rows of a data frame based on the values of one or more columns, allowing for ascending or descending order
desc()
function used to specify descending order in the arrange() function, affecting how data is sorted
%>%
a pipe operator used in R to pass the output of one function directly as an input to another, facilitating a clear and readable workflow
summarise()
takes a data frame and uses it to calculate a new data frame of summary statistics. will turn each named argument into a new column in the new data frame
sum()
function used to calculate the total of numeric values in a vector or data frame column
max()
function that returns the maximum value in a vector or data frame column
mean()
function that calculates the average of numeric values in a vector or data frame column
group_by()
function used to group data frames by one or more variables, allowing for summary operations on grouped data
ungroup()
function that removes grouping from a data frame, returning it to its original ungrouped state
mutate()
function that creates new variables or modifies existing ones in a data frame, often based on transformations of other variables
Vectorized functions
functions that operate on entire vectors or arrays at once, enhancing performance and efficiency in data manipulation
min_rank()
function that assigns ranks to elements in a vector, with ties receiving the same rank and the next rank skipped