Description Usage Arguments Details Value Examples
Find columns in a data frame or matrix that are the products of two or more other columns.
1 2 3 | find_product(data, target)
find_all_products(data, expand = TRUE)
|
data |
The data frame to be searched. |
target |
The column to be checked if it is a product of other columns. |
expand |
Whether the function will attempt to expand a lower order
term to their components. Default is |
This function find probable product terms by comparing its values to the products of other columns. It was developed for identifying columns that are the products of two columns. It may be able to identify columns that are the products of three or more columns but there is no guarantee.
find_all_products returns a named list. For each element, the name is the column name of a product term, and the content is a vector of the names of the columns used for form the product term. If no column is a product of other column, it returns a names list of zero length.
find_product returns a vector of two elements. If the target column is a product
of two other columns, this vector contains the names of these two columsn.
Otherwise, this is a vector of NA
s.
1 2 3 4 | ## Not run:
# To be prepared
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.