library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.6
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.1 ✔ tibble 3.3.1
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.2
## ✔ purrr 1.2.1
## ── 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(pastecs)
##
## Attaching package: 'pastecs'
##
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## The following object is masked from 'package:tidyr':
##
## extract
load("Stress in America.rda")
load("Government_and_Stress.RData")
Government_and_Stress$AGE<-da37288.0025$DMAGE
pastecs::stat.desc(Government_and_Stress$AGE)
## x
## nbr.val 3.795000e+03
## nbr.null 0.000000e+00
## nbr.na 0.000000e+00
## min 1.800000e+01
## max 8.000000e+01
## range 6.200000e+01
## sum 1.846670e+05
## median 4.800000e+01
## mean 4.866061e+01
## SE.mean 2.735760e-01
## CI.mean.0.95 5.363703e-01
## var 2.840324e+02
## std.dev 1.685326e+01
## coef.var 3.463430e-01
hist(Government_and_Stress$AGE)

Government_and_Stress<-Government_and_Stress %>% mutate(AGE_transformed=log(AGE))
hist(Government_and_Stress$AGE_transformed)
