MyNixOS website logo
Description

Comprehensive Data Summarization for Statistical Analysis.

Summarizing data frames by calculating various statistical measures, including measures of central tendency, dispersion, skewness(), kurtosis(), and normality tests. The package leverages the 'moments' package for calculating statistical moments and related measures, the 'dplyr' package for data manipulation, and the 'nortest' package for normality testing. 'DataSum' includes functions such as getmode() for finding the mode(s) of a data vector, shapiro_normality_test() for performing the Shapiro-Wilk test (Shapiro & Wilk 1965 <doi:10.1093/biomet/52.3-4.591>) (or the Anderson-Darling test when the data length is outside the valid range for the Shapiro-Wilk test) (Stephens 1974 <doi:10.1080/01621459.1974.10480196>), Datum() for generating a comprehensive summary of a data vector with various statistics (including data type, sample size, mean, mode, median, variance, standard deviation, maximum, minimum, range, skewness(), kurtosis(), and normality test result) (Joanes & Gill 1998 <doi:10.1111/1467-9884.00122>), and DataSumm() for applying the Datum() function to each column of a data frame. Emphasizing the importance of normality testing, the package provides robust tools to validate whether data follows a normal distribution, a fundamental assumption in many statistical analyses and models.

DataSum

The goal of DataSum is to provide functions for summarizing data frames by calculating various statistical measures, including measures of central tendency, dispersion, skewness, kurtosis, and normality tests. The package leverages the moments package for calculating statistical moments and related measures, the dplyr package for data manipulation, and the nortest package for normality testing. DataSum includes functions such as getmode for finding the mode(s) of a data vector, shapiro_normality_test for performing Shapiro-Wilk normality tests (or Anderson-Darling tests when the data length is outside the valid range for the Shapiro-Wilk test), Datum for generating a comprehensive summary of a data vector with various statistics (including data type, sample size, mean, mode, median, variance, standard deviation, maximum, minimum, range, skewness, kurtosis, and normality test result), and DataSumm for applying the Datum function to each column of a data frame. Emphasizing the importance of normality testing, the package provides robust tools to validate whether data follows a normal distribution, a fundamental assumption in many statistical analyses and models.

Functions getmode: Takes a data vector as input and returns the mode(s) of the data. shapiro_normality_test: Performs a Shapiro-Wilk normality test on the input data. If the data length is outside the valid range for the Shapiro-Wilk test (3 to 5000), it performs an Anderson-Darling normality test instead. Datum: Takes a data vector as input and returns a data frame with various summary statistics, including data type, sample size, mean, mode, median, variance, standard deviation, maximum, minimum, range, skewness, kurtosis, and normality test result. DataSumm: Takes a data frame as input and applies the Datum function to each column, returning a data frame with the summary statistics for each column. Measures of Central Tendency Mean: The average of the values. Median: The middle value when the data is arranged in order. Mode: The value that appears most frequently in the data set. Measures of Dispersion Range: The difference between the largest and smallest values in the data set. Variance: A measure of how spread out the values are from the mean. Standard Deviation: The square root of the variance. Other Measures Skewness: A measure of the asymmetry of the probability distribution. Kurtosis: A measure of the “peakedness” of the probability distribution. Normality: A test to determine if the data follows a normal (Gaussian) distribution, such as the Shapiro-Wilk test.

Installation

You can install the released version of DataSum from CRAN with:

install.packages("DataSum")

Example

This is a basic example which shows you how to solve a common problem:

library(DataSum)

# Example data
data <- mtcars

#Top Portion of data
head(data)

# Get the summary statistics
summary_statistics <- DataSumm(data)

# Print the summary statistics
print(summary_statistics)

CRAN Note

The following terms were flagged as potential spelling errors during the CRAN submission process. However, they are intentionally used in the package and are relevant to its functionality:

  • DataSum: The name of the package.
  • DataSumm: A function within the package that summarizes data frames.
  • Wilk: Refers to the Shapiro-Wilk normality test.
  • dplyr: A widely-used R package for data manipulation.
  • getmode: A function that returns the mode(s) of a dataset.
  • nortest: An R package for performing normality tests.
  • shapiro: Refers to the Shapiro-Wilk normality test.
  • skewness: A measure of asymmetry in the distribution of data.
  • kurtosis: A measure of the “peakedness” of the probability distribution.

These terms are not misspelled but are specific to the package’s context.

Metadata

Version

0.1.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows