Reference

Below are the jstats functions and datasets, grouped by what they do. First, two quick notes on getting help.

Getting help within RStudio

Every function has a built-in help page. The quick way to open one in RStudio is to click the function’s name — in your script or the console — and press F1 (or Fn+F1 on most Macs). In any R setup you can also type ? followed by the name — for example, ?jfreq. Either way you get the description, the options, and worked examples.

What this site adds

The function and dataset names below link to those same help pages online — and those pages rebuild themselves automatically from the package. Whenever the package changes or a new function is added, they regenerate from its built-in documentation and the examples are re-run, so the documentation and the code never drift apart: what you see is always current. The payoff is that every example shows the real output the call produces, not output typed in by hand — so you can copy one and trust it matches what you’ll get.

NoteGrowing into a fuller reference

Over time this section will grow into a task-indexed reference — a place to look up how to do a specific thing while you work, organized by what you want to do rather than by function name. For now, it’s a grouped map of what’s available, with each name linking to its full help page.

Describe and explore

  • jdesc — descriptive statistics for one or more variables.
  • jfreq — frequency tables for categorical variables.
  • jscreen — a one-call overview of a whole dataset: ranges, missing values, possible outliers, and what kind each variable looks to be.

Tests and models

  • jt — independent-samples or paired-samples t-test.
  • jaov — one-way ANOVA.
  • jcrosstab — cross-tabulation, with an optional chi-square test.
  • jcorr — a correlation matrix, with p-values and the N behind each pair.
  • jlm — linear regression.
  • jlogistic — logistic regression.

Scales and reliability

  • jalpha — Cronbach’s alpha reliability analysis for a set of scale items.
  • jsum — a row-wise sum across several variables (for example, a scale total).
  • javg — a row-wise mean across several variables (for example, a scale score).

Prepare and manage your data

  • jrecode — recode a variable using an explicit value mapping, with optional labels.
  • jrelabel — add or change a variable’s variable- and value-labels.
  • jdeclare_udm — declare user-defined missing values (values that should count as missing, such as a “Refused” code) without overwriting your data.
  • jsubset — set a case-selection filter so functions run on a chosen subset of cases.
  • jcomplete — set a listwise complete-case filter so a run of analyses share a matching N.
  • jcopy — copy a data frame, carrying any of its variable settings along with it.

Open, save, and convert files

  • jload — open a data file (from commercial statistical software, Excel, or CSV) in one command, bringing its value labels, variable labels, and missing-value codes along automatically.
  • jsave — save a data frame back out to a file.
  • jconvert — convert missing-value declarations between the conventions different programs use.
  • jdata_dir — show the folder jstats reads your data files from.

Set up your session

  • juse — set (or display) the default dataset, so you don’t have to name it in every call.
  • joptions — set or display session-level options, such as the data folder.
  • joutput — set how much detail jstats prints (the output verbosity level).
  • jupdate — update jstats to the latest version (one command; restart R afterward to load it).

Plots

  • jplot — plot a jstats result, or draw a quick plot of variables straight from a dataset.

Fine-tuning: tell jstats how to treat a variable

Most users will not need these. jstats works out what kind each variable is on its own; these let you override that when you want a particular variable handled a particular way.

  • jnumeric — treat a variable as numeric.
  • jdummy — treat a categorical variable as a set of dummy variables in regression.
  • jcount — treat a variable as a count.
  • jlikert — treat a variable as an ordered (Likert) response item.

Datasets

jstats ships with two practice datasets, both available the moment the package loads:

  • community — a clean 100-respondent community survey (income, education, age, a wellbeing score, several yes/no items, a region, and a five-item attitude scale). The package’s default example data; it’s what every function’s help examples use.
  • clinic — a deliberately messy 70-client mental-health and wellbeing sample, the companion for practicing data cleaning: it carries undeclared missing-value codes, stripped labels, and imperfect scale items to work through.

On the way

A few capabilities are planned for future versions — among them regression for count outcomes (Poisson and negative-binomial models) and exporting formatted, APA-style results to Word. The function set above is what ships today.