R

THE BASIC CONCEPTS OF R

# assignment variable
variable_1 <- "This is variable"
variable_2 <- 3
# vec_1 is our vector
vec_1 <- c(2, 4, 7, 3.5, 54.5)

DATA STRUCTURE

VECTORS

Type Description Example
Logical True/False TRUE
Integer Positive and negative whole values 3
Double Decimal values 101.751
Character String/character values "Coding"
Screenshot 2024-12-31 at 1.05.12 PM.png

DATE AND TIME

facet_wrap() is a function used to create subplots, which are individual plots that represent a specific part of a broader data set.
geom_point() function is used in the ggplot2 package to create scatter plots or plots with individual points

ggplot(data, aes(x = <x-variable), y =<y-variable>)+
	geom_point()

Common arguments:
mapping: Used to map aesthetic (aes(x, y, color, size)) color: sets the color of points size: sets the size of points shape: changes the shape (circles, triangles) alpha`: adjusts the transparency of points

DATA FRAMES:

TIBBLE

DATA-IMPORT BASICS:

GGPLOT2

ggplot(data= penguins) +geom_point(mapping= aes(x= flipper_length_mm, y= body_mass_g))

R MARKDOWN