Correlation and Regression
path <- "C:/Users/andre/OneDrive/Área de Trabalho/salerno/blogdown/datasets/ncbirths" path <- paste0(path, "/ncbirths.csv") data <- read.csv(path, stringsAsFactors = FALSE) dim(data) ## [1] 1450 15 names(data) ## [1] "ID" "Plural" "Sex" "MomAge" ## [5] "Weeks" "Marital" "RaceMom" "HispMom" ## [9] "Gained" "Smoke" "BirthWeightOz" "BirthWeightGm" ## [13] "Low" "Premie" "MomRace" library(ggplot2) ggplot(data = data, aes(y = BirthWeightOz, x = Weeks)) + geom_point() ## Warning: Removed 1 rows containing missing values (geom_point). # Boxplot of weight vs.