db_getLinkIDs: retrieves the IDs from the 'right' table when the IDs from...

View source: R/dbAccess.R

db_getLinkIDsR Documentation

retrieves the IDs from the 'right' table when the IDs from the 'left' table are provided or vice versa. So gets the ID's from the other table that are 'linked'

Description

retrieves the IDs from the 'right' table when the IDs from the 'left' table are provided or vice versa. So gets the ID's from the other table that are 'linked'

Usage

db_getLinkIDs(
  db,
  linkedTableName,
  hasPrimaryKey = FALSE,
  left = TRUE,
  leftID = NA,
  rightID = NA,
  IDs = NA
)

Arguments

db

database access 'handle'

linkedTableName

name of the 'link' table to use

hasPrimaryKey

specifies if the 'link' table has a primary key, default is FALSE

left

if TRUE then the provided ID's are from the 'left' table and the corresponding ID's from the 'right' table are retrieved. If FALSE then it's vice versa

leftID

name of the ID column in the left table to be used, if NA, the column 1 is used

rightID

name of the ID column in the right table to be used, if NA, the column 2 is used

IDs

integer vector specifying the IDs that need to be 'matched'. If an ID is not present, then it will not generate anything

Value

integer vector

Note

if not specified, then leftID is always column 1, rightID is always column 2


BenBruyneel/BBPersonalR documentation built on Aug. 23, 2024, 8:28 p.m.