FIND DATA: By Author | Journal | Sites   ANALYZE DATA: Help with R | SPSS | Stata | Excel   WHAT'S NEW? US Politics | Int'l Relations | Law & Courts
   FIND DATA: By Author | Journal | Sites   WHAT'S NEW? US Politics | IR | Law & Courts
Run R Code
About This Page
This page features live demonstrations of the R Statistics Program used for political science research.
  • To run example, click the Run button.
  • To copy example code, click the Copy button.


See More R Demos
Run R Code in Your Web Browser
# Descriptive Statistics for Nominal-Level Variable
#############################################################
library("poliscidata")
#############################################################

# Nominal-level variables categorize observations into different groups.
# The zodiac variable in the GSS is an example of a nominal-level variable.
# Because it is a low level of measurement, the tools for description are limited.

cat("Frequency Distribution Table:\n")
freqC(gss$zodiac, gss$wtss)

cat("\n\nMode:\n")
wtd.mode(gss$zodiac, gss$wtss)
Watch & Learn
thumbnail preview
â–º
i
Video tutorial & demo by Barry Edwards for R Companion to Political Analysis, 3rd Ed. (11:11).
 Sort and View Case-Level Information With the RCPA3's SortC Function
thumbnail preview
â–º
i
(6:51).
 Multiple Regression in R
MORE VIDEOS: See Video Channels for more political science videos!
LEARN HOW: Watch Lecture Videos for Essentials of Political Analysis, Video Tutorials for R, Stata, SPSS, and Excel