You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
join_keys is an S3 class extending a "list". I've heard voices concerned about unintuitive usage of [[ when setting and getting join-key-columnames of i and j. Below two equivalent examples showing current and desired look.
jk[["ADTTE"]][["ADRS"]] signals that it is a list so methods like c(...) or modifyList are more natural.
what about jk$ADTTE$ADRS?
jk["ADSL", "ADRS"] is visibly easier, even more than a jk$ADSL$ADRS.
jk["ADTTE", "ADRS", ...] allows for more arguments like infer_parent_keys - if keys keys between "ADTTE" and "ADRS" are not specified, than they are given (optionally) based on the common relationship with "ADSL"
jk["ADTTE", "ADRS"] returns a vector and as opposed to scalar in case of an array (matrix)
[.join_keys <- function(i, j) restricts visibly that object is two dimensional (not more). With a list it is not so strict, as one might try jk[[1]][[1]][[1]].
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
follow up to: #78
join_keys
is an S3 class extending a "list". I've heard voices concerned about unintuitive usage of[[
when setting and getting join-key-columnames ofi
andj
. Below two equivalent examples showing current and desired look.Things to consider:
jk[["ADTTE"]][["ADRS"]]
signals that it is a list so methods likec(...)
ormodifyList
are more natural.jk$ADTTE$ADRS
?jk["ADSL", "ADRS"]
is visibly easier, even more than ajk$ADSL$ADRS
.jk["ADTTE", "ADRS", ...]
allows for more arguments likeinfer_parent_keys
- if keys keys between "ADTTE" and "ADRS" are not specified, than they are given (optionally) based on the common relationship with "ADSL"jk["ADTTE", "ADRS"]
returns a vector and as opposed to scalar in case of an array (matrix)[.join_keys <- function(i, j)
restricts visibly that object is two dimensional (not more). With a list it is not so strict, as one might tryjk[[1]][[1]][[1]]
.0 votes ·
Beta Was this translation helpful? Give feedback.
All reactions