Package: RCPA4 1.0.0

Barry C. Edwards

RCPA4: Data and Functions for "An R Companion to Political Analysis, Fourth Edition"

Provides teaching-oriented functions and datasets for "An R Companion to Political Analysis, Fourth Edition" (forthcoming 2026). Functions produce readable tables and graphics for descriptive statistics, data transformation, confidence intervals, hypothesis testing, comparisons, cross-tabulation, and linear and logistic regression. Sampling weights are supported where appropriate, and analysis functions return reusable results for further examination. The package also includes curated political datasets designed for classroom instruction and independent practice. See Edwards and Pollock (forthcoming 2026) <https://www.poliscidata.com/textbooks/r_companion_4e.php>.

Authors:Barry C. Edwards [aut, cre], Philip H. Pollock III [ctb]

RCPA4_1.0.0.tar.gz
RCPA4_1.0.0.zip(r-4.7-any)RCPA4_1.0.0.zip(r-4.6-any)
RCPA4_1.0.0.tar.gz(r-4.7-any)RCPA4_1.0.0.tar.gz(r-4.6-any)
RCPA4_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
RCPA4/json (API)

# Install 'RCPA4' in R:
install.packages('RCPA4', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:
  • anes - ANES 2024 dataset for R Companion to Political Analysis, Fourth Edition
  • debate - Debate Experiment dataset for R Companion to Political Analysis, Fourth Edition
  • gss - GSS 2024 dataset for R Companion to Political Analysis, Fourth Edition
  • states - States dataset for R Companion to Political Analysis, Fourth Edition
  • world - World dataset for R Companion to Political Analysis, Fourth Edition

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

1.00 score 44 exports 116 dependencies

Last updated from:6abd18e647. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK341
source / vignettesOK253
linux-releaseOK356
windows-develOK262
windows-releaseOK294
wasm-releaseOK124

Exports:boxplotCCImeanCIpropColorscompmeansCcorrelateCCramersVcrosstabCdescribeCfit_svyglmfreqCgetChelpChistCinverse_logitlambdalineTypelogregClogregR2orcipchisqCplotCharprintCrandom_namesrandom.namesregCsampdistCsortCtablesomersDCtestmeansCtestpropsCtransformCwelcomeCwidgetFactorywtd_corwtd_histwtd_kurtosiswtd_meanwtd_medianwtd_modewtd_quantilewtd_sdwtd_skewnesswtd_var

Dependencies:abindaudiobackportsbase64encbeeprbitbit64bootbroombslibcachemcarcarDatacheckmateclicliprclustercolorspacecowplotcpp11crayondata.tableDBIDerivdigestdoBydplyrevaluatefarverfastmapfontawesomeforcatsforecastforeignFormulafracdifffsgenericsggplot2gluegridExtragtablehavenhighrHmischmshtmlTablehtmltoolshtmlwidgetsisobandjquerylibjsonliteknitrlabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixMatrixModelsmemoisemgcvmimeminqamitoolsmodelrnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigprettyunitsprogresspurrrquantregR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreadrreformulasrlangrmarkdownrpartrstudioapiS7sassscalesSparseMstringistringrsurveysurvivaltibbletidyrtidyselecttimeDatetinytextzdburcautf8vctrsviridisLitevroomwithrxfunyamlzoo

Readme and manuals

Help Manual

Help pageTopics
ANES 2024 dataset for R Companion to Political Analysis, Fourth Editionanes
Generates box plots to compare interval-level dependent variable's distribution across categories of independent variable.boxplotC
Confidence interval of a dataset variable's sample mean in table and figureCImean
Confidence intervals of a dataset variable's sample proportions in table and figureCIprop
Mean comparison analysis function, makes controlled comparisons, generates plots, performs ANOVAcompmeansC
Correlation analysis for two or more numeric variables, with options for scatterplots, weighted observations, and inferential statistics.correlateC
Cross-tabulation analysis, option for weighting observations, makes controlled comparisons, generates plots, performs Chi-Square test, measures strength of associationcrosstabC
Debate Experiment dataset for R Companion to Political Analysis, Fourth Editiondebate
Generates table of descriptive statistics for one or more variables in a datasetdescribeC
Reports the frequency distribution of dataset variable with table and bar chartfreqC
Imports common dataset file types into R environmentgetC
GSS 2024 dataset for R Companion to Political Analysis, Fourth Editiongss
Interactive helper for RCPA4 documentation, examples, resources, plotting references, and settingshelpC
Creates histogram to show distribution of interval (numeric) variable's valueshistC
Logistic regression analysis with options for weighted observations, odds ratio reports, model fit statistics, and plots of residualslogregC
Prints table of results to a .html file in local working directoryprintC
Backward-compatible alias for random_names().random.names
Linear regression analysis (OLS regression), with options for weighted observations, diagnostic tests, and plots of residualsregC
Plots probability and cumulative density functions (PDFs and CDFs) of sample statisticssampdistC
Sorts dataset observations by user-defined criteria to return case-level informationsortC
States dataset for R Companion to Political Analysis, Fourth Editionstates
One and two-sample difference of means tests (t-tests) with confidence intervals.testmeansC
Tests the difference between two sample proportions, or difference between sample proportion and hypothesized value, with options for weighted observations, confidence intervalstestpropsC
Returns new variables by transforming existing dataset variables (e.g. dummy variables, standardized variables, rank orders)transformC
Welcomes users to RCPA4 and confirms that the package is availablewelcomeC
An interactive game to practice using R functions.widgetFactory
World dataset for R Companion to Political Analysis, Fourth Editionworld