MyNixOS website logo
Description

Descriptive Statistics and Data Management Tools.

Extracts and summarizes metadata from data frames, including variable names, labels, types, and missing values. Computes compact descriptive statistics, frequency tables, and cross-tabulations to assist with efficient data exploration. Facilitates the identification of missing data patterns and structural issues in datasets. Designed to streamline initial data management and exploratory analysis workflows within 'R'.

spicy spicy website

R-CMD-check License:MIT

spicy adds a dash of heat to data analysis, giving insights a whole new flavour! It is designed to make variable exploration and descriptive statistics fast, expressive, and easy to use.

What is spicy?

spicy is an R package for quick, consistent, and elegant exploration of data frames. It helps you:

  • Extract variable metadata and display compact summaries of dataset variables, including names, labels, values, classes, number of distinct non-missing values, number of valid observations, number of missing observations (varlist()). Similar to the “Variable View” in SPSS or the “Variables Manager” in Stata.
  • Compute frequency tables (freq()), row means (mean_n()), row sums (sum_n()), and row count of specific values (count_n()) with automatic handling of missing data.
  • Explore relationships between variables via cross-tabulations (cross_tab()), and Cramer’s V for categorical associations (cramer_v()).
  • Copy data or results directly to the clipboard (copy_clipboard()) for quick export.
  • Handle labelled, factor, Date, POSIXct, and other common types.

All with intuitive functions that produce clean, structured outputs.


Installation

You can install the development version of spicy from GitHub with:

# install.packages("pak")
pak::pak("amaltawfik/spicy")

Example usage

Here are some quick examples using built-in datasets:

library(spicy)

# Get a summary of all variables
varlist(iris, tbl = TRUE)

# Tabulate frequencies
freq(iris$Species)

# Cross-tab with row percentages
cross_tab(mtcars, cyl, gear, percent = "row")

# Compute row-wise mean/sum (all values must be valid by default)
df <- data.frame(
      var1 = c(10, NA, 30, 40, 50),
      var2 = c(5, NA, 15, NA, 25),
      var3 = c(NA, 30, 20, 50, 10)
      )
mean_n(df)
sum_n(df)

All functions can be directly used in pipelines.


Why use spicy?

  • Clean, expressive output
  • Works well with labelled survey data
  • Handles weights, percentages, NA counts
  • Great for exploring data and variables, teaching, or reporting

Citation

If you use spicy in a publication or teaching material, please cite it as:

Tawfik, A. (2025). spicy: Tools for Data Management and Variable Exploration. R package version 0.1.0. https://github.com/amaltawfik/spicy

You can also get the citation in R format by typing:

citation("spicy")

License

This package is licensed under the MIT license. See LICENSE for details.

Metadata

Version

0.1.0

License

Unknown

Platforms (76)

    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-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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