Left join that keeps the rows and row order of data and adds selected
columns of other, matched on key columns. Keys of other must be
unique.
See also
Other plot-data builders:
PlotDataBindRows(),
PlotDataConstant(),
PlotDataCount(),
PlotDataCrossShares(),
PlotDataDirection(),
PlotDataDominant(),
PlotDataFromArrays(),
PlotDataKeyColours(),
PlotDataLabels(),
PlotDataLonger(),
PlotDataMembership(),
PlotDataPairRatio(),
PlotDataProduct(),
PlotDataQuantiles(),
PlotDataRankRows(),
PlotDataRatio(),
PlotDataRecode(),
PlotDataRelative(),
PlotDataSelect(),
PlotDataShares(),
PlotDataSummarise(),
PlotDataUnite()
Examples
a <- data.frame(id = c("p2", "p1", "p3"), v = 1:3)
b <- data.frame(key = c("p1", "p2"), group = c("A", "B"))
PlotDataJoin(a, b, by = "id", by_other = "key", columns = "group")
#> id v group
#> 1 p2 1 B
#> 2 p1 2 A
#> 3 p3 3 <NA>