Package comparedf. February 11, 2019

Similar documents
Package datasets.load

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package crossword.r. January 19, 2018

Package messaging. May 27, 2018

Package fastdummies. January 8, 2018

Package docxtools. July 6, 2018

Package IATScore. January 10, 2018

Package spark. July 21, 2017

Package repec. August 31, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package canvasxpress

Package robotstxt. November 12, 2017

Package tidyimpute. March 5, 2018

Package facerec. May 14, 2018

Package bisect. April 16, 2018

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package jpmesh. December 4, 2017

Package dkanr. July 12, 2018

Package githubinstall

Package mdftracks. February 6, 2017

Package validara. October 19, 2017

Package rsppfp. November 20, 2018

Package jstree. October 24, 2017

Package kirby21.base

Package auctestr. November 13, 2017

Package knitrprogressbar

Package bupar. March 21, 2018

Package splithalf. March 17, 2018

Package tidyselect. October 11, 2018

Package extdplyr. February 27, 2017

Package dbx. July 5, 2018

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package oec. R topics documented: May 11, Type Package

Package rcv. August 11, 2017

Package vip. June 15, 2018

Package calpassapi. August 25, 2018

Package embed. November 19, 2018

Package ECctmc. May 1, 2018

Package raker. October 10, 2017

Package estprod. May 2, 2018

Package keyholder. May 19, 2018

Package projector. February 27, 2018

Package datapasta. January 24, 2018

Package sfc. August 29, 2016

Package patentsview. July 12, 2017

Package heims. January 25, 2018

Package tidytransit. March 4, 2019

Package chunked. July 2, 2017

Package slickr. March 6, 2018

Package d3plus. September 25, 2017

Package omu. August 2, 2018

Package smapr. October 20, 2017

Package SEMrushR. November 3, 2018

Package spelling. December 18, 2017

Package labelvector. July 28, 2018

Package tidystats. May 6, 2018

Package NFP. November 21, 2016

Package available. November 17, 2017

Package rgho. R topics documented: January 18, 2017

Package textrecipes. December 18, 2018

Package ezsummary. August 29, 2016

Package cancensus. February 4, 2018

Package wrswor. R topics documented: February 2, Type Package

Package descriptr. March 20, 2018

Package QCAtools. January 3, 2017

Package ecoseries. R topics documented: September 27, 2017

Package geogrid. August 19, 2018

Package editdata. October 7, 2017

Package taxizedb. June 21, 2017

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package fitbitscraper

Package hypercube. December 15, 2017

Package librarian. R topics documented:

Package shiny.semantic

Package tidylpa. March 28, 2018

Package linkspotter. July 22, Type Package

Package loggit. April 9, 2018

Package utilsipea. November 13, 2017

Package farver. November 20, 2018

Package statsdk. September 30, 2017

Package quadprogxt. February 4, 2018

Package widyr. August 14, 2017

Package queuecomputer

Package climber. R topics documented:

Package vinereg. August 10, 2018

Package fastqcr. April 11, 2017

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package nonlinearicp

Package readobj. November 2, 2017

Package strat. November 23, 2016

Package rzeit2. January 7, 2019

Package autocogs. September 22, Title Automatic Cognostic Summaries Version 0.1.1

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package cli. November 5, 2017

Package autoshiny. June 25, 2018

Package postal. July 27, 2018

Package epitab. July 4, 2018

Package graphframes. June 21, 2018

Package lumberjack. R topics documented: July 20, 2018

Package styler. December 11, Title Non-Invasive Pretty Printing of R Code Version 1.0.0

Transcription:

Type Package Package comparedf February 11, 2019 Title Do a Git Style Diff of the Rows Between Two Dataframes with Similar Structure Version 1.7.1 Date 2019-02-11 Compares two dataframes which have the same column structure to show the rows that have changed. Also gives a git style diff format to quickly see what has changes in addition to summary statistics. License MIT + file LICENSE Depends R (>= 3.4.0) Imports dplyr (>= 0.4.3), magrittr (>= 1.5), htmltable (>= 1.5), tidyr (>= 0.4.1), stringr (>= 1.0.0) Suggests testthat LazyData TRUE RoxygenNote 6.1.1 Encoding UTF-8 NeedsCompilation no Author Alex Joseph [aut, cre] Maintainer Alex Joseph <alexsanjoseph@gmail.com> Repository CRAN Date/Publication 2019-02-11 15:53:57 UTC R topics documented: compare_df......................................... 2 results_2010......................................... 3 results_2011......................................... 3 view_html.......................................... 4 Index 5 1

2 compare_df compare_df Compare Two dataframes Do a git style comparison between two data frames of similar columnar structure compare_df(df_new, df_old, group_col, exclude = NULL, limit_html = 100, tolerance = 0, tolerance_type = "ratio", stop_on_error = TRUE, keep_unchanged = FALSE, color_scheme = c(addition = "green", removal = "red", unchanged_cell = "gray", unchanged_row = "deepskyblue"), html_headers = NULL, html_change_col_name = "chng_type", html_group_col_name = "grp") Arguments df_new df_old group_col exclude limit_html tolerance The data frame for which any changes will be shown as an addition (green) The data frame for which any changes will be shown as a removal (red) A character vector of a string of character vector showing the columns by which to group_by. The columns which should be excluded from the comparison maximum number of rows to show in the html diff. >1000 not recommended The amount in fraction to which changes are ignored while showing the visual representation. By default, the value is 0 and any change in the value of variables is shown off. Doesn t apply to categorical variables. tolerance_type Defaults to ratio. The type of comparison for numeric values, can be ratio or difference stop_on_error Whether to stop on acceptable errors on not keep_unchanged whether to preserve unchanged values or not. Defaults to FALSE color_scheme What color scheme to use for the HTML output. Should be a vector/list with named_elements. Default - c("addition" = "green", "removal" = "red", "unchanged_cell" = "g html_headers A character vector of column names to be used in the table. Defaults to colnames. html_change_col_name Name of the change column to use in the HTML table. Defaults to chng_type. html_group_col_name Name of the group column to be used in the table (if there are multiple grouping vars). Defaults to grp.

results_2010 3 Examples old_df = data.frame(var1 = c("a", "B", "C"), val1 = c(1, 2, 3)) new_df = data.frame(var1 = c("a", "B", "C"), val1 = c(1, 2, 4)) ctable = compare_df(new_df, old_df, c("var1")) print(ctable$comparison_df) ctable$html_output results_2010 Data set created set to show off the package capabilities - Results of students for 2010 A manually created dataset showing the hypothetical scores of two divisions of students Division The division to which the student belongs Student Name of the Student Maths, Physics, Chemistry, Art Scores of the student across different subjects Discipline, PE Grades of the students across different subjects results_2010 Format A data frame 12 rows and 8 columns results_2011 Data set created set to show off the package capabilities - Results of students for 2011 A manually created dataset showing the hypothetical scores of two divisions of students Division The division to which the student belongs Student Name of the Student Maths, Physics, Chemistry, Art Scores of the student across different subjects Discipline, PE Grades of the students across different subjects

4 view_html results_2011 Format A data frame 13 rows and 8 columns view_html View Comparison output HTML Some versions of Rstudio doesn t automatically show the html pane for the html output. This is a workaround view_html(comparison_output) Arguments comparison_output output from the comparisondf compare function Examples old_df = data.frame(var1 = c("a", "B", "C"), val1 = c(1, 2, 3)) new_df = data.frame(var1 = c("a", "B", "C"), val1 = c(1, 2, 4)) ctable = compare_df(new_df, old_df, c("var1")) # Not Run:: # view_html(ctable)

Index Topic datasets results_2010, 3 results_2011, 3 compare_df, 2 results_2010, 3 results_2011, 3 view_html, 4 5