| Title: | Compare Two Data Frames and Summarize Differences |
|---|---|
| Description: | Tools for systematic comparison of data frames, offering functionality to identify, quantify, and extract differences. Provides functions with user-friendly and interactive console output for immediate analysis, while also offering options to export differences as structured data frames that can be easily integrated into existing workflows. |
| Authors: | Giorgia Cecchinato [aut], R.Andres Castaneda [aut, cre], Rossana Tatulli [aut], Global Poverty and Inequality Data Team World Bank [cph] |
| Maintainer: | R.Andres Castaneda <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.2.9000 |
| Built: | 2026-05-22 10:36:58 UTC |
| Source: | https://github.com/pip-technical-team/myrror |
This function compares the types of the columns in the two data frames.
compare_type( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("full", "simple", "silent"), interactive = getOption("myrror.interactive"), verbose = getOption("myrror.verbose") )compare_type( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("full", "simple", "silent"), interactive = getOption("myrror.interactive"), verbose = getOption("myrror.verbose") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
myrror_object |
myrror object from create_myrror_object |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
output |
character: one of "full" (returns a myrror_object), "simple" (returns a dataframe), "silent" (invisible object returned). |
interactive |
logical: If |
verbose |
logical: If |
Depending on output parameter:
"full": myrror object with compare_type slot containing a data.table of column class comparisons
"simple": data.table with columns: variable, class_x, class_y, same_class
"silent": invisibly returns myrror object (same as "full")
Returns NULL if no differences are found and output = "simple".
# 1. Standard report, myrror_object output: compare_type(survey_data, survey_data_2, by=c('country', 'year')) # 2. Simple output, data.table output: compare_type(survey_data, survey_data_2, by=c('country', 'year'), output = 'simple') # 3. Toggle interactvity: compare_type(survey_data, survey_data_2, by=c('country', 'year'), interactive = FALSE) # 4. Different keys (see also ?myrror): compare_type(survey_data, survey_data_2_cap, by.x = c('country', 'year'), by.y = c('COUNTRY', 'YEAR')) # 5. Using existing myrror object created by myrror(): myrror(survey_data, survey_data_2, by=c('country', 'year')) compare_type()# 1. Standard report, myrror_object output: compare_type(survey_data, survey_data_2, by=c('country', 'year')) # 2. Simple output, data.table output: compare_type(survey_data, survey_data_2, by=c('country', 'year'), output = 'simple') # 3. Toggle interactvity: compare_type(survey_data, survey_data_2, by=c('country', 'year'), interactive = FALSE) # 4. Different keys (see also ?myrror): compare_type(survey_data, survey_data_2_cap, by.x = c('country', 'year'), by.y = c('COUNTRY', 'YEAR')) # 5. Using existing myrror object created by myrror(): myrror(survey_data, survey_data_2, by=c('country', 'year')) compare_type()
Function to compare values of matched data frames.
compare_values( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("full", "simple", "silent"), interactive = getOption("myrror.interactive"), verbose = getOption("myrror.verbose"), tolerance = getOption("myrror.tolerance") )compare_values( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("full", "simple", "silent"), interactive = getOption("myrror.interactive"), verbose = getOption("myrror.verbose"), tolerance = getOption("myrror.tolerance") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
myrror_object |
myrror object from create_myrror_object |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
output |
character: one of "full" (returns a myrror_object), "simple" (returns a dataframe), "silent" (invisible object returned). |
interactive |
logical: If |
verbose |
logical: If |
tolerance |
numeric, default to 1e-7. |
Depending on output parameter:
"full": myrror object with compare_values slot containing a summary tibble of value differences
"simple": tibble with columns: variable, change_in_value, na_to_value, value_to_na (counts)
"silent": invisibly returns myrror object (same as "full")
Returns NULL if no differences are found and output = "simple".
# 1. Standard report, myrror_object output: compare_values(survey_data, survey_data_2, by=c('country', 'year')) # 2. Simple output, list of data.tables output: compare_values(survey_data, survey_data_2, by=c('country', 'year'), output = 'simple') # 3. Toggle tolerance: compare_values(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5) # 4. Toggle interactvity: compare_values(survey_data, survey_data_2, by=c('country', 'year'), interactive = FALSE) # 5. Different keys (see also ?myrror): compare_values(survey_data, survey_data_2_cap, by.x = c('country', 'year'), by.y = c('COUNTRY', 'YEAR')) # 6. Using existing myrror object created by myrror(): myrror(survey_data, survey_data_2, by=c('country', 'year')) compare_values()# 1. Standard report, myrror_object output: compare_values(survey_data, survey_data_2, by=c('country', 'year')) # 2. Simple output, list of data.tables output: compare_values(survey_data, survey_data_2, by=c('country', 'year'), output = 'simple') # 3. Toggle tolerance: compare_values(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5) # 4. Toggle interactvity: compare_values(survey_data, survey_data_2, by=c('country', 'year'), interactive = FALSE) # 5. Different keys (see also ?myrror): compare_values(survey_data, survey_data_2_cap, by.x = c('country', 'year'), by.y = c('COUNTRY', 'YEAR')) # 6. Using existing myrror object created by myrror(): myrror(survey_data, survey_data_2, by=c('country', 'year')) compare_values()
This function constructs a myrror object by comparing two data frames. It handles the preparation, validation, and joining of datasets, identifies matching and non-matching observations, and performs column pairing for comparison. The function supports various join types (1:1, 1:m, m:1) and provides detailed reports on the comparison results.
create_myrror_object( dfx, dfy, by = NULL, by.x = NULL, by.y = NULL, factor_to_char = TRUE, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )create_myrror_object( dfx, dfy, by = NULL, by.x = NULL, by.y = NULL, factor_to_char = TRUE, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
factor_to_char |
TRUE or FALSE, default to TRUE. |
verbose |
logical: If |
interactive |
logical: If |
An object of class "myrror" containing comparison results, dataset information, and various reports on matching/non-matching observations.
# convert rownames of mtcars to a column mtcars2 <- mtcars mtcars2$car_name <- rownames(mtcars2) rownames(mtcars2) <- NULL # modify mtcars2 slightly by remove one row and changing one value mtcars3 <- mtcars2[-1, ] mtcars3$mpg[1] <- mtcars3$mpg[1] + 1 mo <- create_myrror_object(mtcars2, mtcars3, by = "car_name") mo# convert rownames of mtcars to a column mtcars2 <- mtcars mtcars2$car_name <- rownames(mtcars2) rownames(mtcars2) <- NULL # modify mtcars2 slightly by remove one row and changing one value mtcars3 <- mtcars2[-1, ] mtcars3$mpg[1] <- mtcars3$mpg[1] + 1 mo <- create_myrror_object(mtcars2, mtcars3, by = "car_name") mo
Extract Different Rows Function to extract missing or new rows from comparing two data frames.
extract_diff_rows( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("simple", "full", "silent"), tolerance = 0.0000001, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )extract_diff_rows( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("simple", "full", "silent"), tolerance = 0.0000001, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
myrror_object |
myrror object from create_myrror_object |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
output |
character: one of "full", "simple", "silent". |
tolerance |
numeric, default to 1e-7. |
verbose |
logical: If |
interactive |
logical: If |
Depending on output parameter:
"full": myrror object with extract_diff_rows slot containing a data.table of non-matching rows
"simple": data.table with columns: df (indicating 'dfx' or 'dfy'), keys, and all other columns. Contains rows that exist in only one dataset
"silent": invisibly returns myrror object (same as "full")
Returns NULL if no row differences are found and output = "simple".
# 1. Standard report, after running myrror() or compare_values(): myrror(survey_data, survey_data_2, by=c('country', 'year')) extract_diff_rows() # 2. Standard report, with new data: extract_diff_rows(survey_data, survey_data_2, by=c('country', 'year')) # 3. Toggle tolerance: extract_diff_rows(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)# 1. Standard report, after running myrror() or compare_values(): myrror(survey_data, survey_data_2, by=c('country', 'year')) extract_diff_rows() # 2. Standard report, with new data: extract_diff_rows(survey_data, survey_data_2, by=c('country', 'year')) # 3. Toggle tolerance: extract_diff_rows(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)
Extract Different Values in Table Format Function to extract rows with different values between two data frames.
extract_diff_table( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("simple", "full", "silent"), tolerance = 0.0000001, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )extract_diff_table( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("simple", "full", "silent"), tolerance = 0.0000001, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
myrror_object |
myrror object from create_myrror_object |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
output |
character: one of "full", "simple", "silent". |
tolerance |
numeric, default to 1e-7. |
verbose |
logical: If |
interactive |
logical: If |
Depending on output parameter:
"full": myrror object with extract_diff_values slot containing a list with diff_list and diff_table
"simple": data.table with all observations where at least one value differs. Contains columns: diff, variable, indexes, keys, and all compared variables with .x/.y suffixes
"silent": invisibly returns myrror object (same as "full")
Returns NULL if no differences are found and output = "simple".
# 1. Standard report, after running myrror() or compare_values(): myrror(survey_data, survey_data_2, by=c('country', 'year')) extract_diff_table() # 2. Standard report, with new data: extract_diff_table(survey_data, survey_data_2, by=c('country', 'year')) # 3. Toggle tolerance: extract_diff_table(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)# 1. Standard report, after running myrror() or compare_values(): myrror(survey_data, survey_data_2, by=c('country', 'year')) extract_diff_table() # 2. Standard report, with new data: extract_diff_table(survey_data, survey_data_2, by=c('country', 'year')) # 3. Toggle tolerance: extract_diff_table(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)
Extract Different Values Function to extract rows with different values between two data frames.
extract_diff_values( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("simple", "full", "silent"), tolerance = 0.0000001, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )extract_diff_values( dfx = NULL, dfy = NULL, myrror_object = NULL, by = NULL, by.x = NULL, by.y = NULL, output = c("simple", "full", "silent"), tolerance = 0.0000001, verbose = getOption("myrror.verbose"), interactive = getOption("myrror.interactive") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
myrror_object |
myrror object from create_myrror_object |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
output |
character: one of "full", "simple", "silent". |
tolerance |
numeric, default to 1e-7. |
verbose |
logical: If |
interactive |
logical: If |
Depending on output parameter:
"full": myrror object with extract_diff_values slot containing a list with diff_list and diff_table
"simple": named list of data.tables, one per variable with differences. Each table contains columns: diff, indexes, keys, variable.x, variable.y
"silent": invisibly returns myrror object (same as "full")
Returns NULL if no differences are found and output = "simple".
# 1. Standard report, after running myrror() or compare_values(): myrror(survey_data, survey_data_2, by=c('country', 'year')) extract_diff_values() # 2. Standard report, with new data: extract_diff_values(survey_data, survey_data_2, by=c('country', 'year')) # 3. Toggle tolerance: extract_diff_values(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)# 1. Standard report, after running myrror() or compare_values(): myrror(survey_data, survey_data_2, by=c('country', 'year')) extract_diff_values() # 2. Standard report, with new data: extract_diff_values(survey_data, survey_data_2, by=c('country', 'year')) # 3. Toggle tolerance: extract_diff_values(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)
This dataset variation includes:
Additional rows by duplicating the first 5 rows.
A new column Petal.Area calculated from Petal.Length and Petal.Width.
Introduction of NA values in Sepal.Length.
iris_var1iris_var1
A data.frame with 155 rows and 6 variables:
Numeric, Sepal length in cm, with some NA values.
Numeric, Sepal width in cm.
Numeric, Petal length in cm.
Numeric, Petal width in cm.
Factor with levels: "setosa","versicolor","virginica".
Numeric, calculated as Petal.Length * Petal.Width.
It tests the handling of extended datasets, new calculated fields, and missing values.
Modified iris dataset.
This dataset variation includes:
NaN values in the Sepal.Width column.
Random adjustments to Sepal.Length to create a range of different values.
A shuffled order of rows to test comparison without reliance on row order.
iris_var2iris_var2
A data frame with 150 rows and 5 variables, row order shuffled:
Numeric, Sepal length in cm, modified by adding random values.
Numeric, Sepal width in cm, with some NaN values.
Numeric, Petal length in cm.
Numeric, Petal width in cm.
Factor with levels: "setosa","versicolor","virginica".
It is designed to test the handling of NaN values, comparison of numeric differences, and insensitivity to row order.
Modified iris dataset.
This dataset variation includes:
Column name changes (e.g., Sepal.Length to SL).
Conversion of numeric to character type for the Sepal.Length (now SL) column.
An NA value introduced into the SL column.
iris_var3iris_var3
A data.frame with 150 rows and 5 variables:
Character, originally numeric, with one NA value.
Numeric, Sepal width in cm.
Numeric, Petal length in cm.
Numeric, Petal width in cm.
Factor with levels: "setosa","versicolor","virginica".
This variation tests the package's ability to correctly identify and handle column renaming, type conversion, and missing values.
Modified iris dataset.
This dataset variation includes:
Uppercase transformation of Species factor levels.
Duplicated rows (first 10 rows repeated).
An altered scale for Petal.Width (values multiplied by 10).
iris_var4iris_var4
A data.frame with 160 rows and 5 variables:
Numeric, length in cm.
Numeric, width in cm.
Numeric, length in cm.
Numeric, width in cm, values scaled by a factor of 10.
Factor with levels modified to uppercase: "SETOSA", "VERSICOLOR", "VIRGINICA".
Designed to test handling of categorical variable level modifications, duplicate rows, and numeric scale adjustments.
Modified iris dataset.
This dataset variation includes:
Column with different type: Sepal.Length (character).
Column with different values: Sepal.Length (1 modified value).
iris_var5iris_var5
A data.frame with 160 rows and 5 variables:
Charactert, length in cm.
Numeric, width in cm.
Numeric, length in cm.
Numeric, Petal width in cm.
Factor with levels: "setosa","versicolor","virginica".
Modified iris dataset.
Iris Dataset Variation 6
iris_var6iris_var6
A data.frame with 146 rows and 5 variables:
Numeric, Sepal length in cm.
Numeric, Sepal width in cm.
Numeric, Petal length in cm.
Numeric, Petal width in cm.
Factor with levels: "setosa","versicolor","virginica".
Modified iris dataset.
Iris Dataset Variation 7
iris_var7iris_var7
A data.frame with 146 rows and 5 variables:
Numeric, Sepal length in cm.
Numeric, Sepal width in cm.
Numeric, Petal length in cm.
Numeric, Petal width in cm.
Factor with levels: "setosa","versicolor","virginica".
Modified iris dataset.
myrror provides tools for comparing data frames, identifying differences,
and extracting summary tables or lists of differences.
myrror( dfx, dfy, by = NULL, by.x = NULL, by.y = NULL, compare_type = TRUE, compare_values = TRUE, extract_diff_values = TRUE, factor_to_char = TRUE, interactive = getOption("myrror.interactive"), verbose = getOption("myrror.verbose"), tolerance = getOption("myrror.tolerance") )myrror( dfx, dfy, by = NULL, by.x = NULL, by.y = NULL, compare_type = TRUE, compare_values = TRUE, extract_diff_values = TRUE, factor_to_char = TRUE, interactive = getOption("myrror.interactive"), verbose = getOption("myrror.verbose"), tolerance = getOption("myrror.tolerance") )
dfx |
a non-empty data.frame. |
dfy |
a non-empty data.frame. |
by |
character, key to be used for dfx and dfy. |
by.x |
character, key to be used for dfx. |
by.y |
character, key to be used for dfy. |
compare_type |
TRUE or FALSE, default to TRUE. |
compare_values |
TRUE or FALSE, default to TRUE. |
extract_diff_values |
TRUE or FALSE, default to TRUE. |
factor_to_char |
TRUE or FALSE, default to TRUE. |
interactive |
logical: If |
verbose |
logical: If |
tolerance |
numeric, default to 1e-7. |
Object of class "myrror" containing:
name_dfx, name_dfy: Names of input data frames
prepared_dfx, prepared_dfy: Prepared versions of input data frames
set_by.x, set_by.y: Keys used for comparison
datasets_report: Characteristics of input datasets (rows, columns)
match_type: Type of join relationship ("1:1", "1:m", "m:1")
merged_data_report: Information about matched and unmatched data
pairs: Column pairing information
compare_type: Results from type comparison (if enabled)
compare_values: Results from value comparison (if enabled)
extract_diff_values: Extracted differences (if enabled)
interactive: Whether interactive mode is enabled
Returns NULL invisibly if the two datasets are identical.
Maintainer: R.Andres Castaneda [email protected]
Authors:
Giorgia Cecchinato [email protected]
Rossana Tatulli [email protected]
Other contributors:
Global Poverty and Inequality Data Team World Bank [copyright holder]
https://pip-technical-team.github.io/myrror/
Useful links:
Report bugs at https://github.com/PIP-Technical-Team/myrror/issues
# 1. Specifying by, by.x or by.y: myrror(survey_data, survey_data_2, by=c('country', 'year')) ## These are equivalent: myrror(survey_data, survey_data_2_cap, by.x=c('country', 'year'), by.y = c('COUNTRY', 'YEAR')) myrror(survey_data, survey_data_2_cap, by=c('country' = 'COUNTRY', 'year' = 'YEAR')) # 2. Turn off interactivity: myrror(survey_data, survey_data_2, by=c('country', 'year'), interactive = FALSE) # 3. Turn off factor_to_char (it will treat factors as factors): myrror(survey_data, survey_data_2, by=c('country', 'year'), factor_to_char = FALSE) # 4. Turn off compare_type: myrror(survey_data, survey_data_2, by=c('country', 'year'), compare_type = FALSE) ## Same can be done for compare_values and extract_diff_values. # 5. Set tolerance: myrror(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)# 1. Specifying by, by.x or by.y: myrror(survey_data, survey_data_2, by=c('country', 'year')) ## These are equivalent: myrror(survey_data, survey_data_2_cap, by.x=c('country', 'year'), by.y = c('COUNTRY', 'YEAR')) myrror(survey_data, survey_data_2_cap, by=c('country' = 'COUNTRY', 'year' = 'YEAR')) # 2. Turn off interactivity: myrror(survey_data, survey_data_2, by=c('country', 'year'), interactive = FALSE) # 3. Turn off factor_to_char (it will treat factors as factors): myrror(survey_data, survey_data_2, by=c('country', 'year'), factor_to_char = FALSE) # 4. Turn off compare_type: myrror(survey_data, survey_data_2, by=c('country', 'year'), compare_type = FALSE) ## Same can be done for compare_values and extract_diff_values. # 5. Set tolerance: myrror(survey_data, survey_data_2, by=c('country', 'year'), tolerance = 1e-5)
Print method for Myrror object.
## S3 method for class 'myrror' print(x, ...)## S3 method for class 'myrror' print(x, ...)
x |
an object of class 'myrror_object' |
... |
additional arguments |
Invisibly returns the myrror object x. Called for side effects (printing comparison report to console).
# Create example datasets dfx <- data.frame(id = 1:5, name = c("A", "B", "C", "D", "E"), value = c(10, 20, 30, 40, 50)) dfy <- data.frame(id = 1:6, name = c("A", "B", "C", "D", "E", "F"), value = c(10, 20, 35, 40, 50, 60)) # Create a myrror object library(myrror) m <- myrror(dfx, dfy, by.x = "id", by.y = "id") # Print the myrror object (happens automatically) m # Create object with different print settings # With interactive mode disabled m2 <- myrror(dfx, dfy, by.x = "id", by.y = "id", interactive = FALSE) print(m2)# Create example datasets dfx <- data.frame(id = 1:5, name = c("A", "B", "C", "D", "E"), value = c(10, 20, 30, 40, 50)) dfy <- data.frame(id = 1:6, name = c("A", "B", "C", "D", "E", "F"), value = c(10, 20, 35, 40, 50, 60)) # Create a myrror object library(myrror) m <- myrror(dfx, dfy, by.x = "id", by.y = "id") # Print the myrror object (happens automatically) m # Create object with different print settings # With interactive mode disabled m2 <- myrror(dfx, dfy, by.x = "id", by.y = "id", interactive = FALSE) print(m2)
Survey Data A country-year level dataset with 15 rows and 6 variables. 2 countries, 4 years, and 4 additional variables.
survey_datasurvey_data
A data.table with 16 rows and 4 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010, 2011, 2012, 2013.
Numeric.
Numeric.
Numeric.
Numeric.
@source Simulated data.
Survey Data 1:m Variation 1
survey_data_1msurvey_data_1m
A data.table with 36 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Numeric.
Variation of survey_data with non-unique ids and a 1:m relationship between ids and values.
Survey Data 1:m Variation 2
survey_data_1m_2survey_data_1m_2
A data.table with 36 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Numeric.
Variation of survey_data with non-unique ids and a 1:m relationship between ids and values.
Survey Data Variation 2
survey_data_2survey_data_2
A data.table with 15 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010, 2011, 2012, 2013.
Numeric.
Numeric. Modified variable values.
Numeric.
Numeric.
Simulated data.
Survey Data Variation 2 with Cap Keys
survey_data_2_capsurvey_data_2_cap
A data.table with 15 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010, 2011, 2012, 2013.
Numeric.
Numeric. Modified variable values.
Numeric.
Numeric.
Simulated data.
Survey Data Variation 3
survey_data_3survey_data_3
A data.table with 15 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Character. Modified variable class.
Numeric.
Numeric.
Numeric.
Simulated data.
Survey Data Variation 4
survey_data_4survey_data_4
A data.table with 12 rows (4 missing) and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Numeric.
Simulated data.
Survey Data Variation 5
survey_data_5survey_data_5
A data.table with 15 rows and 4 variables (2 missing):
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Numeric.
Simulated data.
Survey Data Variation 6
survey_data_6survey_data_6
A data.table with 15+15 (duplicated) rows and 4 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Numeric.
Simulated data.
Survey Data Variation All
survey_data_allsurvey_data_all
A data.table with 12 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Simulated data.
Survey Data m:1
survey_data_m1survey_data_m1
A data.table with 15 rows and 6 variables:
Factor with levels: "A", "B".
Numeric, with values: 2010-2017.
Numeric.
Numeric.
Numeric.
Numeric.
Variation of survey_data with non-unique ids and a m:1 relationship between ids and values.