View source: R/fjoin_functions.R
| fjoin_cross | R Documentation |
Cross join of x and y
fjoin_cross(
x = NULL,
y = NULL,
order = "left",
select = NULL,
select.x = NULL,
select.y = NULL,
prefix.y = "R.",
do = !(is.null(x) && is.null(y)),
show = !do
)
x, y |
|
order |
Whether the row order of the result should reflect |
select, select.x, select.y |
Character vectors of columns to be selected
from either input if present ( |
prefix.y |
A prefix to attach to column names in |
do |
Whether to execute the join. If |
show |
Whether to print the data.table code for the join to the
console. Default is the opposite of |
Details are as for e.g. fjoin_inner except for remarks
about join columns and matching logic, which do not apply.
A data.frame, data.table, (grouped) tibble, sf,
or sf-tibble, or else NULL if do is FALSE. See
Details.
See the package-level documentation fjoin for related
functions.
# data frames
df1 <- data.table::fread(data.table = FALSE, input = "
bread kcal
Brown 150
White 180
Baguette 250
")
df2 <- data.table::fread(data.table = FALSE, input = "
filling kcal
Cheese 200
Pâté 160
")
fjoin_cross(df1, df2)
fjoin_cross(df1, df2, order = "right")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.