Join yspec objects together

ys_join(left, right, ...)

Arguments

left

A yspec object.

right

A yspec object.

...

More yspec objects.

Value

A single yspec object with left, right and ... all joined together.

Details

All inputs must be yspec objects. When the right spec (or specs passed under ...) is joined to the left spec, columns that exist in both left and right are removed from right before joining.

Examples


spec <- ys_help$spec()

l <- ys_select(spec, WT, BMI)
r <- ys_select(spec, TIME, TAD)
rr <- ys_select(spec, EVID, MDV, CMT, BMI)

ys_join(l, r)
#>  name info unit  short           source       
#>  WT   ---  kg    weight          ysdb_internal
#>  BMI  ---  m2/kg BMI             ysdb_internal
#>  TIME ---  hour  TIME            look         
#>  TAD  ---  hours time after dose .            

ys_join(l, r, rr)
#>  name info unit  short              source       
#>  WT   ---  kg    weight             ysdb_internal
#>  BMI  ---  m2/kg BMI                ysdb_internal
#>  TIME ---  hour  TIME               look         
#>  TAD  ---  hours time after dose    .            
#>  EVID -d-  .     event ID           ysdb_internal
#>  MDV  -d-  .     MDV                ysdb_internal
#>  CMT  ---  .     compartment number ysdb_internal