R/f_generics_clvdatastaticcov.R

setMethod("clv.data.create.bootstrapping.data", signature = signature(clv.data="clv.data.static.covariates"), definition = function(clv.data, ids){
  clv.data.no.cov <- callNextMethod()

  dt.cov.life <- clv.data.select.customer.data.duplicating.ids(dt.data=clv.data@data.cov.life, ids=ids)
  dt.cov.trans <- clv.data.select.customer.data.duplicating.ids(dt.data=clv.data@data.cov.trans, ids=ids)

  setkeyv(dt.cov.life, cols = "Id")
  setkeyv(dt.cov.trans, cols = "Id")

  return(
    clv.data.static.covariates(
      no.cov.obj = clv.data.no.cov,
      data.cov.life = dt.cov.life,
      data.cov.trans = dt.cov.trans,
      names.cov.data.life = clv.data@names.cov.data.life,
      names.cov.data.trans = clv.data@names.cov.data.trans))
})

Try the CLVTools package in your browser

Any scripts or data that you put into this service are public.

CLVTools documentation built on Oct. 13, 2024, 9:07 a.m.