Package: janitor 2.2.1

Sam Firke

janitor: Simple Tools for Examining and Cleaning Dirty Data

The main janitor functions can: perfectly format data.frame column names; provide quick counts of variable combinations (i.e., frequency tables and crosstabs); and explore duplicate records. Other janitor functions nicely format the tabulation results. These tabulate-and-report functions approximate popular features of SPSS and Microsoft Excel. This package follows the principles of the "tidyverse" and works well with the pipe function %>%. janitor was built with beginning-to-intermediate R users in mind and is optimized for user-friendliness.

Authors:Sam Firke [aut, cre], Bill Denney [ctb], Chris Haid [ctb], Ryan Knight [ctb], Malte Grosser [ctb], Jonathan Zadra [ctb]

janitor_2.2.1.tar.gz
janitor_2.2.1.tar.gz(r-4.5-noble)janitor_2.2.1.tar.gz(r-4.4-noble)
janitor_2.2.1.tgz(r-4.4-emscripten)janitor_2.2.1.tgz(r-4.3-emscripten)
janitor.pdf |janitor.html
janitor/json (API)
NEWS

# Install 'janitor' in R:
install.packages('janitor', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/sfirke/janitor/issues

Pkgdown site:https://sfirke.github.io

12.76 score 222 packages 32k scripts 273k downloads 11 mentions 40 exports 25 dependencies

Last updated 5 days agofrom:400b34bd37. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 23 2024
R-4.5-linuxOKDec 23 2024

Exports:%>%add_totals_coladd_totals_rowadorn_crosstabadorn_nsadorn_pct_formattingadorn_percentagesadorn_roundingadorn_titleadorn_totalsas_tabylchisq.testclean_namescompare_df_colscompare_df_cols_sameconvert_to_dateconvert_to_datetimeconvert_to_NAcrosstabdescribe_classexcel_numeric_to_datefind_headerfisher.testget_dupesget_one_to_onemake_clean_namesremove_constantremove_emptyremove_empty_colsremove_empty_rowsround_half_upround_to_fractionrow_to_namessas_numeric_to_datesignif_half_upsingle_valuetabyltop_levelsuntabyluse_first_valid_of

Dependencies:clicpp11dplyrfansigenericsgluehmslifecyclelubridatemagrittrpillarpkgconfigpurrrR6rlangsnakecasestringistringrtibbletidyrtidyselecttimechangeutf8vctrswithr

Overview of janitor functions

Rendered fromjanitor.Rmdusingknitr::rmarkdownon Dec 23 2024.

Last update: 2024-12-22
Started: 2018-03-22

tabyls: a tidy, fully-featured approach to counting things

Rendered fromtabyls.Rmdusingknitr::rmarkdownon Dec 23 2024.

Last update: 2024-12-22
Started: 2018-03-22

Readme and manuals

Help Manual

Help pageTopics
Append a totals column to a data.frame.add_totals_col
Append a totals row to a data.frame.add_totals_row
Add underlying Ns to a tabyl displaying percentages.adorn_ns
Format a data.frame of decimals as percentages.adorn_pct_formatting
Convert a data.frame of counts to percentages.adorn_percentages
Round the numeric columns in a data.frame.adorn_rounding
Add column name to the top of a two-way tabyl.adorn_title
Append a totals row and/or column to a data.frame.adorn_totals
Add 'tabyl' attributes to a data.frame.as_tabyl
Apply stats::chisq.test to a two-way tabylchisq.test chisq.test.default chisq.test.tabyl
Cleans names of an object (usually a data.frame).clean_names clean_names.default clean_names.sf clean_names.tbl_graph clean_names.tbl_lazy
Generate a comparison of data.frames (or similar objects) that indicates if they will successfully bind together by rows.compare_df_cols
Do the the data.frames have the same columns & types?compare_df_cols_same
Convert many date and datetime formats as may be received from Microsoft Excelconvert_to_date convert_to_datetime
Convert string values to true 'NA' values.convert_to_NA
Describe the class(es) of an objectdescribe_class describe_class.default describe_class.factor
Convert dates encoded as serial numbers to Date class.excel_numeric_to_date
Find the header row in a data.framefind_header
Apply stats::fisher.test to a two-way tabylfisher.test fisher.test.default fisher.test.tabyl
Get rows of a 'data.frame' with identical values for the specified variables.get_dupes
Find the list of columns that have a 1:1 mapping to each otherget_one_to_one
Deprecated Functions in Package janitorjanitor_deprecated
Cleans a vector of text, typically containing the names of an object.make_clean_names
Constant to help map from mu to umu_to_u
Remove constant columns from a data.frame or matrix.remove_constant
Remove empty rows and/or columns from a data.frame or matrix.remove_empty
Removes empty columns from a data.frame.remove_empty_cols
Removes empty rows from a data.frame.remove_empty_rows
Round a numeric vector; halves will be rounded up, ala Microsoft Excel.round_half_up
Round to the nearest fraction of a specified denominator.round_to_fraction
Elevate a row to be the column names of a data.frame.row_to_names
Convert a SAS date, time or date/time to an R objectsas_numeric_to_date
Round a numeric vector to the specified number of significant digits; halves will be rounded up.signif_half_up
Ensure that a vector has only a single value throughout.single_value
Generate a frequency table (1-, 2-, or 3-way).tabyl tabyl.data.frame tabyl.default
Generate a frequency table of a factor grouped into top-n, bottom-n, and all other levels.top_levels
Remove 'tabyl' attributes from a data.frame.untabyl
Returns first non-NA value from a set of vectors.use_first_valid_of