Description Usage Arguments Value Examples
View source: R/missingValuesColCompare.R
missingValuesColCompare takes as input a data.frame object (searchDf
), the column number (searchDfColIndex
) of a column in this data.frame object, column numbers (dfColIndex1
and dfColIndex2
) of two columns from two different data.frame objects (dfData1
and dfData2
) from which the missing values (i.e. values present in dfColIndex1
of dfData1
but not in dfColIndex2
of dfData2
) have to be identified, and a vector of column names from searchDf
which are to be displayed in the output. The output is the data.frame object searchDf
with rows given by row locations of the of the missing values in searchDf
and columns specified by outputColNameVec
. If outputColNameVec
empty, all columns of searchDf
will be displayed in the data.frame object returned. If outputColNameVec
contains only one column, then the output is a vector of class gievn by the class of this one column.
1 2 3 4 5 6 7 8 9 | missingValuesColCompare(
searchDf,
searchDfColIndex,
dfData1,
dfColIndex1,
dfData2,
dfColIndex2,
outputColNameVec
)
|
searchDf |
a data.frame object which is to be searched for the missing values. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" "). |
searchDfColIndex |
an integer indicating the column number of the column in |
dfData1 |
the first data.frame object. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" "). |
dfColIndex1 |
an integer indicating the column number of |
dfData2 |
the second data.frame object. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" "). |
dfColIndex2 |
an integer indicating the column number of |
outputColNameVec |
a string or a vector of class character containing the column names from |
missingValuesColCompare returns the data.frame object searchDf
with columns specified by outputColNameVec
and rows corresponding to the locations of the missing values (i.e. values present in dfColIndex1
of dfData1
but not in dfColIndex2
of dfData2
) in column with number searchDfColIndex
in searchDf
1 2 3 4 | employees_short <- employees[c(2,3,5),]
missingValuesColCompare(employees,4,employees,4,employees_short,4,c("start_date","salary"))
iris_short <- iris[c(50:75),]
missingValuesColCompare(iris,2,iris,2,iris_short,2,"Species")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.