coerce_ccmpp_input_df: Coerce to a 'ccmpp_input_df'

coerce_ccmpp_input_dfR Documentation

Coerce to a ccmpp_input_df

Description

These functions coerce an object to a ccmpp_input_df if possible, or check if it is one.

Usage

as_ccmpp_input_df(x, ...)

## Default S3 method:
as_ccmpp_input_df(x, ...)

## S3 method for class 'data.frame'
as_ccmpp_input_df(
  x,
  value_type = attr(x, "value_type"),
  value_scale = attr(x, "value_scale"),
  ...
)

## S3 method for class 'matrix'
as_ccmpp_input_df(
  x,
  value_type = attr(x, "value_type"),
  value_scale = attr(x, "value_scale"),
  ...
)

## S3 method for class 'ccmpp_input_df'
as_ccmpp_input_df(x, ...)

is_ccmpp_input_df(x)

Arguments

x

An object to coerce or check.

...

Further arguments passed to specific methods.

value_type

Scalar indicating the type of the “value” column (e.g., “count”, “rate”, etc.).

value_scale

Numeric scalar indicating the value_scale of the counts, e.g., 1, 1000, 1e6, etc.

Value

A coerced object in the case of the as_... functions; a logical for the is_... functions.

Author(s)

Mark Wheldon

See Also

coerce_demog_change_component_df


markalava/ccmppWPP documentation built on April 21, 2022, 12:36 a.m.