Learn R Programming

⚠️There's a newer version (1.4.1) of this package.Take me there.

SciencesPo (version 1.3.6)

A Tool Set for Analyzing Political Behavior Data

Description

Provides miscellaneous functions for carrying out political behaviour analysis, including measures of political fragmentation, seats allocation, and graphical demonstrations.

Copy Link

Version

Install

install.packages('SciencesPo')

Monthly Downloads

60

Version

1.3.6

License

GPL (>= 2)

Maintainer

Daniel Marcelino

Last Published

July 27th, 2015

Functions in SciencesPo (1.3.6)

binomcdf

Binomial cumulative distribution function
as.percent

Converts to percentiles
nPermutate

Calculate number of permutations taking repeated elements into consideration
farina

Farina index
formatNumbers

Format numeric digits
winsorize

Winsorized Mean
dbTempTable

Creates a temporary table in the database
joinLists

Join a list of data frames
cv

Pearson's Coefficient of Variation
bootstrap

Method for Bootstrap
grofman

Grofman index
invnormal

Inverse Cumulative Standard Normal Distribution
ci

Confidence Intervals
fill.forward

fill NA by previous cell value (fill forward)
recode

Method for recoding
nobs

Method for the number of observations
freq

Frequency table
build

Method for building things
sheston91

The Penn World Table
fade

Add transparency
categories

Extraction of categorical values as a preprocessing step for making dummy variables
rand.block

Create Block-randomized designs
permutate

Create k random permutations of a vector
SciencesPo

A Tool Set For Analyzing Political Behavior Data
ellipses

Draw ellipses
frac

Fractional part of a numeric vector.
quotize

Add quotation marks
adjResiduals

Adjusted Residuals
mode

Calculate the Mode
nearest

Find the Nearest Value
database

Wrapper for dbConnect
cox.shugart

Cox-Shugart measure of proportionality
matching

Matching
compute

Aggregate a numeric variable
vif

Variance Inflation Factor
mc

Generate Markov Chains
rand.imput

Random Imputation
tabulate

Tabulate
jackknife

Resamples Data Using the Jackknife Method
fillup

Identify columns with at least one NA value and fill with the mean value
ssex

Same Sex Marriage Public Opinion Data
true.median

Calculates the true median
svTransform

Transform dependent variable
rownames2col

Rownames to column
modify

Modify data elements by their position
gini.simpson

Gini Simpson Index
%>%

Chain operator
draw.norm

Shades Normal Distribuion
view

View random n elements of an object.
swatson93

Stock's and Watson's (1993) Data.
mishkin92

Mishkin's (1992) Data
us2012

US Presidential Election Opinion Polls
pause

Pause
ltaylor96

Lothian's and Taylor's (1996) Data Set
kurtosis

Compute the Kurtosis
normalcdf

Normal Cumulative Distribution
normalpdf

Normal probability density function
error.bar

Add Error Bars on the Graph
galton

Galton's Family Data on Human Stature.
nearestPosition

Find Location of the Nearest Value
footnote

Generate a footnote for graphs Generate a footnote for graphs
factorize

Conditionally convert vectors to factors
normalize

Unity-based normalization
turnout

Turnout Data
detail

Method to Produce Descriptive Statistics Summary
regionSignificance

Computes the region significance
destring

Factors to numeric
detach.all

Detach all data frame from the search path
crosstable

Cross-tabulation
se

Calculates the Standard Error
rle2data.frame

Converts rle object to data.frame
unnest

Unnest a Nested List
qm

Quote strings
%nin%

Find Matching (or Non-Matching) Elements
peek

Show Observations Randomly Drawn from the Data
scale_colour_pub

Scale colors for ggplot graphs
geary.test

Geary's test for normality
var.order

Move variable order in a data.frame
stukel

Stukel's test of the logistic link
weather

NY Weather 1995-2014
psum

Parallel sum
gallagher

Gallagher index
rdirichlet

Dirichlet distribution
nerlove63

Marc Nerlove's (1963) data
bhodrick93

Bekaert's and Hodrick's (1993) Data
reverseLevels

Reverse the levels of a factor.
dHondt

Method D'Hondt
rectangularize

Make a data.frame Rectangular by fill in missing records
politicalDiversity

Political Diversity Indices politicalDiversity is used to analyze political diversity in a unity or across them. It provides methods to estimate the Effective Number of Parties as well as other diversity measures.
watch

Watch For Changes in a Data Object
trim

Trim white spaces
binompdf

Binomial probability density function
lookup

Lookup
theme_pub

Themes for ggplot graphs
rename

Method for renaming
titanic

Titanic
head

Return the first n elements of a SQLiteConnection object
flag

Flag duplicated observations
jensen.shannon

Jensen-Shannon Distance
mc.plot

Plot Markov Chains
allocation

Seat allocation and its ordering
z.scores

Compute z-scores
shift

Shifts elements of a vector left or right by N positions (Lag or Lead).
lijphart

Lijphart index of proportionality
as.roman

Converts integer into its Roman Numeral equivalent
add

Method for adding things.
dummy

Generate dummy variables
ggFootnote

Add Footnote to a ggplot Object
griliches76

Griliches's (1976) Data
weighted.var

Weighted Variance
outliers

Detect Outliers
read.zTree

Reads zTree output files
scale_fill_pub

Scale colors for ggplot graphs
tobaccovote

Tobacco Lobbying Data
johnson.neyman

Johnson-Neyman Regression
ddirichlet

Dirichlet distribution
commas2dots

Replace commas by dots
cgreene76

Christensen's and Greene's (1976) Data
ggMultiplot

Multiple ggplot objects
fillin

Filling in missing values fillin replaces missing values with existing observations from other variable or data frame.
skewness

Compute the Skewness
paired

Paired Data