ida.data.frame).
idaMerge(x, y, by=intersect(x@cols, y@cols), by.x=by, by.y=by, all=FALSE, all.x=all, all.y=all, sort=TRUE, suffixes=c("_x", "_y"), table=NULL)ida.data.frame object to be merged.ida.data.frame object to be merged.x and y are to be appended to the result.
If set to FALSE, only columns common to both x and y are included in the output.
This parameter overrides the all.x and all.y parameters.
In SQL database terminology, specifying all=FALSE results in
an inner join that is equivalent to a natural join, and specifying
all=TRUE results in a full outer join.
In a full outer join, the columns that
are common to both x and y are followed by the remaining
columns in x, which are followed by the remaining columns in y.
all.x=TRUE and all.y=FALSE results in a left outer join,
and specifying all.x=FALSE and all.y=TRUE results in a right outer join. if TRUE, then extra rows are added to the
output, one for each row in x that has no matching row in
y. These rows have a value of NA in those columns
that are typically filled with values from y. The default is
FALSE, so that only rows with data from both x and
y are included in the output.
If all.x is true, all the non matching cases of x are
also appended to the result, with a value of NA filled in the
corresponding columns of y
all.xx or y.
Note that a dot (.) is not a valid character for a column name.ida.data.frame object.
This function merges two IDA data frames on the columns that they have in common. The rows in the two data frames that match on the specified columns are extracted, and joined together. If there is more than one match, all possible matches contribute one row each. For the precise meaning of match.
If by or both by.x and by.y are of length 0 (a
length zero vector or NULL), the result, r, is the
Cartesian product of x and y, that is, a cross join.
If non-merged columns of the data frames have identical names and are to be included in the output, suffixes are appended to the names of the corresponding columns in the output to make their names.
Note that this function creates, in the current database, a view that corresponds to the output object. Within the current session, this view can be accessed using the same IDA data frame object. However, it is persistent and, after it is no longer needed, it must be dropped manually.
ida.data.frame
## Not run:
#
# idf <- ida.data.frame('IRIS')
#
# #Perform a self-join
# idf2 <- idaMerge(idf,idf,by="ID")
#
# ## End(Not run)
Run the code above in your browser using DataLab