R/sampleUnits.R

Defines functions sampleUnits

sampleUnits = function(data, variables, specs){

  # need a loop to ensure data is updated ahead of each successive variable
  for (var in 1:length(specs$predOrder)){

    data[variables[[specs$predOrder[var]]]$allDrawnVariables] =
      variables[[specs$predOrder[var]]]$sampleUnits(data = data, variables = variables)

  }

  return(data)
}

Try the blatent package in your browser

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

blatent documentation built on May 29, 2024, 5:42 a.m.