library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.2.1 ✔ readr 2.2.0
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.3 ✔ tibble 3.3.1
## ✔ lubridate 1.9.5 ✔ tidyr 1.3.2
## ✔ purrr 1.2.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)
library(pastecs)
##
## Attaching package: 'pastecs'
##
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## The following object is masked from 'package:tidyr':
##
## extract
stadium <- read.csv("us_sportsvenues1909_2027.csv")
pastecs:::stat.desc(stadium$totalcost)
## nbr.val nbr.null nbr.na min max range
## 1.970000e+02 0.000000e+00 2.200000e+01 2.250000e-01 5.500000e+03 5.499775e+03
## sum median mean SE.mean CI.mean.0.95 var
## 5.379090e+04 1.280000e+02 2.730502e+02 3.804338e+01 7.502691e+01 2.851178e+05
## std.dev coef.var
## 5.339642e+02 1.955553e+00
stadium_Clean<- stadium |> drop_na(totalcost) %>% filter(totalcost>0)
hist(stadium_Clean$totalcost)

stadium_Clean <-stadium_Clean %>% mutate(toalcost_sqrt =sqrt(totalcost))
hist (stadium_Clean$toalcost_sqrt)
