install.packages(“readxl”)
library(“readxl”)
install.packages(“fansi”)
library(“fansi”)
install.packages(“httr”)
install.packages(“readxl”)
library(readxl)
library(httr)
library(“readxl”)
urlof <- “http://www.ozaneruygur.com/106ostim/rexample11.xls”
GET(urlof, write_disk(“rexample11.xls”, overwrite=TRUE))
of <- read_excel(“rexample.xls”)
head(of, 3)
summary(of$packs)
summary(of$income)
summary(of$price)
mean(of$packs)
mean(of$packs)
median(of$packs)
quantile(of$packs)
min(of$packs)
max(of$packs)
var(of$packs)
sd(of$packs)
regression_url <- lm(packs ~ price, data = of)
summary(regression_url)
D1.png
rexample11 <- read_excel(“C:/rexample11.xls”)
mean(rexample11$price)
median(rexample11$price)
quantile(rexample11$price)
min(rexample11$price)
max(rexample11$price)
var(rexample11$price)
sd(rexample11$price)
regression1 <- lm(packs ~ price, data = rexample11)
summary(regression1)