Skip to contents

This class represents a survey object with various attributes and methods to manage survey data, design, steps, recipes, and workflows.

Public fields

data

The survey data.

edition

The edition of the survey.

type

The type´ of the survey.

periodicity

The periodicity of the survey.

default_engine

The default engine used for the survey.

weight

The weight(s) associated with the survey.

steps

A list of steps applied to the survey.

recipes

A list of recipes associated with the survey.

workflows

A list of workflows associated with the survey.

design

The survey design object(s).

active

A list of active bindings for dynamic properties of the survey.

Methods


Method new()

Initialize a new Survey object.

Usage

Survey$new(
  data,
  edition,
  type,
  psu,
  engine,
  weight,
  design = NULL,
  steps = NULL,
  recipes = list()
)

Arguments

data

The survey data.

edition

The edition of the survey.

type

The type of the survey.

psu

Primary sampling unit (PSU).

engine

The engine used for the survey.

weight

The weight(s) for the survey.

design

Optional survey design.

steps

Optional list of steps.

recipes

Optional list of recipes.


Method get_data()

Get the survey data.

Usage

Survey$get_data()

Returns

The survey data.


Method get_edition()

Get the edition of the survey.

Usage

Survey$get_edition()

Returns

The survey edition.


Method get_type()

Get the type of the survey.

Usage

Survey$get_type()

Returns

The survey type.


Method set_data()

Set the survey data.

Usage

Survey$set_data(data)

Arguments

data

The new survey data.


Method set_edition()

Set the edition of the survey.

Usage

Survey$set_edition(edition)

Arguments

edition

The new survey edition.


Method set_type()

Set the type of the survey.

Usage

Survey$set_type(type)

Arguments

type

The new survey type.


Method set_weight()

Set the weight(s) for the survey.

Usage

Survey$set_weight(weight)

Arguments

weight

The new weight(s).


Method print()

Print metadata of the survey.

Usage

Survey$print()


Method add_step()

Add a step to the survey.

Usage

Survey$add_step(step)

Arguments

step

The step to add.


Method add_recipe()

Add a recipe to the survey.

Usage

Survey$add_recipe(recipe, bake = lazy_default())

Arguments

recipe

The recipe to add.

bake

Whether to bake the recipe immediately.


Method add_workflow()

Add a workflow to the survey.

Usage

Survey$add_workflow(workflow)

Arguments

workflow

The workflow to add.


Method bake()

Bake all recipes in the survey.

Usage

Survey$bake()


Method head()

Display the first few rows of the survey data.

Usage

Survey$head()


Method str()

Display the structure of the survey data.

Usage

Survey$str()


Method set_design()

Set the survey design.

Usage

Survey$set_design(design)

Arguments

design

The new survey design.


Method update_design()

Update the survey design based on the current data and weights.

Usage

Survey$update_design()


Method clone()

The objects of this class are cloneable with this method.

Usage

Survey$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.