View source: R/subset_interchange_col.R
subset_interchange_col | R Documentation |
For any two columns specified in the data frame (say column A and B), if the combination of column A and B is the same even if they are swapped, it will return it as a data frame or a row number. For example, if column A has "TOM" and "BOB", and the same respective row in column B has "BOB" and "TOM", the row will be extracted as interchangeable. Also, when there is a row with the same value in column A and B, it is also determined to be interchangeable and extracted.
subset_interchange_col(data, x, y, out.put = c("dataframe", "num"))
data |
frame to examine. |
x |
The column name to look up. The column name should be enclosed in double quotation marks. |
y |
The column name to look up. The column name should be enclosed in double quotation marks. |
out.put |
Selects whether to return the resulting output as a dataframe or by row name. The default is to return in a data frame. |
Returns either the extracted data frame or a vector of row counts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.