Setup

#install.packages("pastecs")
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.0.2
## -- Attaching packages --------------------------------------------------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2     v purrr   0.3.4
## v tibble  3.0.3     v dplyr   1.0.2
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.0
## Warning: package 'tibble' was built under R version 4.0.2
## Warning: package 'tidyr' was built under R version 4.0.2
## Warning: package 'dplyr' was built under R version 4.0.2
## -- Conflicts ------------------------------------------------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(mosaic)
## Warning: package 'mosaic' was built under R version 4.0.2
## Registered S3 method overwritten by 'mosaic':
##   method                           from   
##   fortify.SpatialPolygonsDataFrame ggplot2
## 
## The 'mosaic' package masks several functions from core packages in order to add 
## additional features.  The original behavior of these functions should not be affected by this.
## 
## Attaching package: 'mosaic'
## The following object is masked from 'package:Matrix':
## 
##     mean
## The following objects are masked from 'package:dplyr':
## 
##     count, do, tally
## The following object is masked from 'package:purrr':
## 
##     cross
## The following object is masked from 'package:ggplot2':
## 
##     stat
## The following objects are masked from 'package:stats':
## 
##     binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
##     quantile, sd, t.test, var
## The following objects are masked from 'package:base':
## 
##     max, mean, min, prod, range, sample, sum
library(infer)
## Warning: package 'infer' was built under R version 4.0.2
## 
## Attaching package: 'infer'
## The following objects are masked from 'package:mosaic':
## 
##     prop_test, t_test
library(pastecs)
## Warning: package 'pastecs' was built under R version 4.0.3
## 
## Attaching package: 'pastecs'
## The following objects are masked from 'package:dplyr':
## 
##     first, last
## The following object is masked from 'package:tidyr':
## 
##     extract
getwd()
## [1] "C:/Users/Jerome/Documents/From_Toshiba_HD_Work_Files/0000_Montgomery_College/Math_217/Final_Project/Working_Folder"
family_z32 <- read_csv("family_z31.csv")
## Warning: Missing column names filled in: 'X1' [1]
## 
## -- Column specification --------------------------------------------------------------------------------------------------
## cols(
##   .default = col_double()
## )
## i Use `spec()` for the full column specifications.
save(family_z32, file = "family_z32.Rmd")

### Try Pastecs

stat.desc(family_z32$FM_SIZE, basic = TRUE, norm = TRUE)
##      nbr.val     nbr.null       nbr.na          min          max        range 
## 3.300000e+02 0.000000e+00 3.252400e+04 1.000000e+00 1.000000e+01 9.000000e+00 
##          sum       median         mean      SE.mean CI.mean.0.95          var 
## 9.670000e+02 3.000000e+00 2.930303e+00 9.030548e-02 1.776490e-01 2.691176e+00 
##      std.dev     coef.var     skewness     skew.2SE     kurtosis     kurt.2SE 
## 1.640480e+00 5.598330e-01 8.897302e-01 3.314140e+00 7.901908e-01 1.476042e+00 
##   normtest.W   normtest.p 
## 9.000614e-01 6.253583e-14
summary(family_z32$FM_SIZE)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    1.00    2.00    3.00    2.93    4.00   10.00   32524
#install.packages("Hmisc")
library(Hmisc)
## Warning: package 'Hmisc' was built under R version 4.0.3
## Loading required package: survival
## Loading required package: Formula
## Warning: package 'Formula' was built under R version 4.0.3
## 
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## The following objects are masked from 'package:base':
## 
##     format.pval, units

Try the Sample

family_sample1 <- sample_n(family_z32, 200)
write.csv (family_sample1, file = "family_sample1.csv", row.names = FALSE)
family_sample1 <- read_csv("family_sample1.csv")
## 
## -- Column specification --------------------------------------------------------------------------------------------------
## cols(
##   .default = col_logical(),
##   X1 = col_double()
## )
## i Use `spec()` for the full column specifications.