Tables with Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics

Package provides tabulation functions with support for 'SPSS'-style labels, multiple / nested banners, weights, multiple-response variables and significance testing. There are facilities for nice output of tables in 'knitr', 'Shiny', R and 'Jupyter' notebooks, '*.xlsx' files. Proper methods for labelled variables add value labels support to base R functions and to some functions from other packages. Additionally, the package offers useful functions for data processing in marketing research / social surveys - popular data transformation functions from 'SPSS' Statistics ('RECODE', 'COUNT', 'COMPUTE', 'DO IF', etc.) and 'Excel' ('COUNTIF', 'VLOOKUP', etc.). Package is intended to help people to move data processing from 'Excel'/'SPSS' to R.


0.8.7 (12.06.2018)

  • fix long-standing bug with broken html rendering in knitr (issue #6)
  • add '..p' and '..f' - perl regular expression/fixed pattern selectors. Also 'mrset_p', 'mrset_f', 'mdset_p', 'mdset_f' are provided.
  • add shortcut for entire data.frame in 'use_labels'
  • fix awful bug with incorrect nesting multiple response on multiple response ('nest' function)
  • more exports from data.table
  • fix 'add_columns' for data.table
  • fix 'do_if' for data.table
  • fix 'w_cor' - now diag elements always equal to one
  • add 'split_by' - alias for 'split_separate'

0.8.6 (24.01.2018)

  • fix tests for systems with no long doubles support
  • new arguments and small improvements in 'write_labelled_csv'/'write_labelled_sps'
  • minor fixes
  • change 'vlookup'/'vlookup_df' behavior - now it also matches on NA
  • 'datatable' is deprecated. Use as.datatable_widget instead.
  • move DT and htmltools dependencies from Imports to Suggests
  • new function 'add_columns' which is inspired by MATCH FILES (Add variables...) from SPSS Statistics

0.8.4 (11.12.2017)

  • compatibility with new version of htmlTable package
  • minor fixes

0.8.3 (06.11.2017)

  • add 'calc_cro_*' functions family
  • minor fixes
  • compatibility with new version of 'testthat' package

0.8.2 (26.09.2017)

  • fix bug with single column "mrset"
  • fix bug with significance tests on tables with complex headers
  • add uboxing possibilities for ..
  • add 'from_text' for creation data.frame from text lines
  • improve performance of 'cro_*'
  • remove deprecated function ".set"

0.8.1 (10.08.2017)

  • add significance testing (see ?significance)
  • add support for table output for Jupyter notebooks
  • add 'use_labels' function for experimental support variable labels in base R functions and third party packages (see ?use_labels)
  • increase table functions performance
  • increase 'as.dichotomy'/'dummy' performance
  • increase 'vlookup'/'vlookup_df' performance
  • numerous bugfixes
  • now 'keep'/'except'/'by_groups' operate with NSE. For standard evaluation just surround you variable with round brackets
  • add print options 'commented' for printing tables to console with '#'
  • add functions 'split_separate'/'split_off'
  • add 'prepend_names'/'prepend_labels' - issue #2
  • add 'indirect'/'indirect_list' - aliases for 'vars'/'vars_list'
  • add 'mis_val' - alias for 'na_if'
  • add 'unsafe' argument for _fun/_fun_df.
  • add '..' object for parameter substitution inside 'compute' and etc. Usage: '..$param_name'. For details: ?..
  • improve 'lst' function
  • '.set'/'set' inside 'compute' and etc. are deprecated. Use '%into%' instead.
  • expansion of variables in backticks inside 'vars'/'vars_list'/'%into%' is removed. Use explicit 'subst' instead
  • infix/assignment versions removed: '%modify%', '%compute%', '%sort_asc%', '%sort_desc%', '%keep%', '%except%', '%where%', '%by_groups%'

0.7.1 (10.04.2017)

  • make value labels support in the base R and other packages (via 'factor' for class 'labelled')
  • radically improved performace for 'cro_' and 'fre_' due to 'data.table' under the hood
  • multiple/nested banners/variables suppport in 'cro_*'
  • add 'datatable' for tables representation in Shiny
  • add 'htmlTables' for tables representation in RStudio viewer and for knitting to html
  • add methods for where for vectors/matrices/lists
  • less cryptic message about bad number of rows in modify/modify_if
  • .N now is preferable to .n inside modify and etc.
  • Functions for default dataset now invisibly return modified default dataset
  • Fix logical arguments in boolean operations for criteria functions
  • %in_row%/%in_col% are deprecated. Use %row_in%/%col_in% instead.
  • NULL argument for criterion is removed. Use not_na instead.
  • remove default argument in ifs. Use TRUE ~ default_value instead.
  • add usual vectors functions additionally to infix versions.
  • add 'do_repeat' function
  • add functions for weighted statistics - 'w_mean', 'w_median', 'w_cor' and etc.
  • add 'nest' function for creation nested tables.
  • remove 'category', 'category_df' - use 'as.category' instead
  • remove 'dichotomy', 'dichotomy1' - use 'dummy', 'dummy1' instead
  • remove 'dichotomy_df', 'dichotomy_df1' - use 'as.dichotomy' instead
  • remove labelled matrix support
  • bugfixes

0.5.5 (19.10.2016)

  • numerous bugfixes
  • change behavior of if_val() - now it dowsn't copies old values by default. There are 'other' and 'copy' instead of dots.
  • add %n_i%, %n_d% - names intersection and diffs
  • add add_rows function
  • add keep and except functions for selecting/dropping columns in data.frames
  • add 'where' for filtering dataset
  • add sort_asc and sort_desc functions for sorting data.frames

0.5.1 (07.07.2016)

  • initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.8.10 by Gregory Demin, 2 months ago

Report a bug at

Browse source code at

Authors: Gregory Demin [aut, cre]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports foreign, utils, stats, magrittr, htmlTable, matrixStats, data.table

Suggests DT, htmltools, knitr, repr, ggplot2, testthat, openxlsx

See at CRAN