That was dry, but let’s see some potential, reading a CSV file and calculating some descriptive statistics.
You’ll need to install the packages/load the library beforehand
#install.packages(c("readr","readxl","haven","foreign","Hmisc"),
#repos = "http://cran.us.r-project.org")
readr::read_delim("here_path.csv", delim = ",") #CSV
readr::read_rds("here_path.Rds") #RDS (R format)
readxl::read_excel("here_path.xlsx") #Excel
haven::read_dta("here_path.dta") #Stata
haven::read_spss("here_path.sav") #SPSS
#Read example data
df <- readr::read_delim("../common_datasets/dataset_boys.csv", delim = ",")
## Rows: 748 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): gen, phb, reg
## dbl (6): age, hgt, wgt, bmi, hc, tv
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.