Learn R Programming

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

statar

statar contains functions inspired by useful Stata commands.

The package includes:

You can install

  • The latest released version from CRAN with

    install.packages("statar")
  • The current version from github with

    devtools::install_github("matthieugomez/statar")

Copy Link

Version

Install

install.packages('statar')

Monthly Downloads

718

Version

0.6.2

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Matthieu Gomez

Last Published

June 25th, 2016

Functions in statar (0.6.2)

count

Count number of non missing observations
elapsed

Elapsed dates (monthly, quarterly)
xtile

Bin variable in groups (similar to Stata xtile)
pctile

Weighted quantile of type 2 (similar to Stata _pctile)
tab

Returns cross tabulation
stat_binmean

Plot the mean of y over the mean of x within bins of x.
tempname

Create unique names within a list, a data.frame, or an environment
join

Join two data frames together
is.panel

Check whether a data.frame is a panel
statar

A package for applied research
sum_up

Gives summary statistics (corresponds to Stata command summarize)
fill_gap

Add rows corresponding to gaps in some variable
find_duplicates

returns a data.frame with duplicated rows
winsorize

Winsorize a numeric vector
tlead-tlag

lead and lag with respect to a time variable