-- R is a programming language for data analysis
-- RStudio is an integrated development environment (IDE) for R
-- Strength of R is in its packages - Over 12,000 packages
-- RStudio is not R. But it facilitates the use of R
Your working directory should now look like in the following Figure:
E.g. library(readr), library(readxl)
File/Environment -> Import Dataset -> From text, Excel……-> Enter a URL/file path
Import the HRS data from a .csv file
# Import the HRS data from a .csv file
hrs = read.csv(“C:/HRS r1bmi.csv”, header=T, sep=“,”)
# Look at the first 6 cases to check the data
head(hrs)
# Look at the last 6 cases to check the data
tail(hrs)
Engel, C. A. (2019, February 4). R and Rstudio. GitHub. https://cengel.github.io/R-intro/backgroud.html.
Please visit this page if you need an instruction/consultation in Data Analytics.