check_equal_columncontents_NAomitted {packDAMipd} | R Documentation |
Function to check the equality of column contents between two data sets with omitting NA
Description
Function to check the equality of column contents between two data sets with omitting NA
Usage
check_equal_columncontents_NAomitted(
data1,
data2,
samecol,
column_data1,
column_data2
)
Arguments
data1 |
first data set |
data2 |
second data set |
samecol |
a unique col in both datasets, like tno or id |
column_data1 |
column name in data 1 to be compared |
column_data2 |
column name in data 2 to be compared |
Value
0 if they are equal else error message
Examples
eg_data <- as.data.frame(list(no = c(1, 2, 3, 4),
mark_at_1 = c(12, 7, 23, 45), gender = c("M", "F", "M", "F"),
mark_at_2 = c(12, 34, 89, 45), trialarm = c("1","1","2","2"),
time = c(1,1,2,2), id = c(1, 1, 1, 2)))
eg_data2 <- as.data.frame(list(no = c(1, 2, 3, 4),
mark_at_1 = c(12, 27, 23, 45), gender = c("M", "F", "M", "F"),
mark_at_2 = c(12, 34, 89, 45), trialarm = c("1","1","2","2"),
time = c(1,1,2,2), id = c(1, 1, 1, 2)))
check_equal_columncontents_NAomitted(eg_data, eg_data2, "no",
"mark_at_1","mark_at_2")
[Package packDAMipd version 1.1.0 Index]