R/new_contact_survey.R

Defines functions new_contact_survey

Documented in new_contact_survey

#' @title Contact survey
#' @description Deprecated. A `survey` object contains the results
#'   of a contact survey. In particular, it contains two data
#'   frames called `participants` and `contacts` that are linked
#'   by a column specified as `id.column`
#' @param participants a `data.frame` containing information on participants
#' @param contacts a `data.frame` containing information on contacts
#' @param reference a `list` containing information needed to
#'   reference the survey, in particular it can contain a "title",
#'   "bibtype", "author", "doi", "publisher", "note", "year"
#' @return a new survey object
#' @author Sebastian Funk
#' @keywords internal
new_contact_survey <- function(participants, contacts, reference = NULL) {
  structure(
    list(
      participants = data.table(participants),
      contacts = data.table(contacts),
      reference = reference
    ),
    class = "contact_survey"
  )
}

Try the socialmixr package in your browser

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

socialmixr documentation built on April 29, 2026, 9:07 a.m.