# ============================================================
# R Basics
# R Foundations — Rverse Analytics
# https://rverseanalytics.com/learn/r-basics
# ============================================================

# R Basics - run real R, no install
# 1. R is a calculator
2 + 2
10 * 5
100 / 7
2 ^ 10
# 2. Store values in variables with  <-
price <- 20
quantity <- 3
price * quantity
# 3. Call a function: name(input)
sqrt(144)
round(3.14159, 2)
toupper("hello r")
# 4. Comments start with #  - R ignores them
radius <- 5
area <- pi * radius ^ 2
area
# 5. Your turn: Celsius to Fahrenheit
celsius <- 25
celsius * 9 / 5 + 32
