dot-mergeIdAspect: Merge two aspects (data.frames)

.mergeIdAspectR Documentation

Merge two aspects (data.frames)

Description

Merges two aspects, that are both data.frames and of the same aspect class. If the idCol contains duplicates new ids (for secondAspect) are created (ids of firstAspect are kept), unless it is spezified otherwise by saveOldIds.

Usage

.mergeIdAspect(
  firstAspect,
  secondAspect,
  idCol,
  uniqCols,
  stopOnDuplicates = FALSE,
  saveOldIds = TRUE,
  .log = c()
)

Arguments

firstAspect

data.frame; first aspect.

secondAspect

data.frame; second aspect.

idCol

character; name of the column to merge on.

uniqCols

character; name of the column to be checked for uniqueness.

stopOnDuplicates

boolean (default=FALSE); whether to stop, if duplicates in uniqCols column are found.

saveOldIds

boolean (default=TRUE); whether to keep the IDs from secondAspect, if duplicates in uniqCols column are found.

.log

character (optional); name of the calling function used in logging

Value

data.frame of the merged aspects.

Note

The two aspects must be the same type of aspect (same aspect class)!

Internal function only for convenience

See Also

.mergeAttributesAspect, .createAttributeAspect

Examples

NULL

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.