statar: Tools Inspired by Stata to Manipulate Tabular Data

テーブルデータ操作

> library(statar)

Attaching package: 'statar'

The following object is masked from 'package:git2r':

    tag

The following object is masked from 'package:dplyr':

    count

The following object is masked from 'package:gWidgets':

    tag

バージョン: 0.5.0


関数名 概略
count Count number of non missing observations
elapsed Elapsed dates (monthly, quarterly)
find_duplicates returns a data.frame with duplicated rows
is.panel Check whether a data.frame is a panel
join Join two data frames together
pctile Weighted quantile of type 2 (similar to Stata _pctile)
stat_binmean Plot the mean of y over the mean of x within bins of x.
statar A package for applied research
sum_up Gives summary statistics (corresponds to Stata command summarize)
tab Returns cross tabulation
tag Creates a vector of zero except for one subscript
tempname Create unique names within a list, a data.frame, or an environment
tlead-tlag lead and lag with respect to a time variable
winsorize Winsorize a numeric vector
xtile Bin variable in groups (similar to Stata xtile)

count

欠損値でないベクトルの数を返す

> count(c(NA, 1))
[1] 1

discard

fill_gap

setna