db_getLinkColumns | R Documentation |
retrieves the specified columns from the 'right' table when the IDs from the 'left' table are provided or vice versa. So gets the columns from the other table that where the ID's are linked/matched
db_getLinkColumns(
db,
linkedTableName,
hasPrimaryKey = FALSE,
tableName,
columns = NA,
primaryKey = defaultPrimaryKey(),
left = TRUE,
leftID = NA,
rightID = NA,
IDs = NA
)
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 |
tableName |
specfies the name of the table from where to get the columns via the ID's specified by the 'link' table |
columns |
specifies which columns to retrieve from the table specified by tableName |
primaryKey |
specifies the name of the primary key of the table specified by tableName. These will be used to retrieve the right rows from the table |
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 |
integer vector
if not specified, then leftID is always column 1, rightID is always column 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.