ccmpp_input_list_replace: Replace Parts of a 'ccmpp_input_list'

ccmpp_input_list_replaceR Documentation

Replace Parts of a ccmpp_input_list

Description

These are methods for the subset-replacement functions for objects of class ccmpp_input_list. The return values differ and, importantly, are not objects of class ccmpp_input_list (see “Details”).

Usage

## S3 replacement method for class 'ccmpp_input_list'
x$name <- value

## S3 replacement method for class 'ccmpp_input_list'
x[[i, j]] <- value

Arguments

x

data frame.

name

A literal character string or a name (possibly backtick quoted).

value

A suitable replacement value: it will be repeated a whole number of times if necessary and it may be coerced: see the Coercion section. If NULL, deletes the column if a single column is selected.

i

elements to extract or replace. For [ and [[, these are numeric or character or, for [ only, empty or logical. Numeric values are coerced to integer as if by as.integer. For replacement by [, a logical matrix is allowed.

j

elements to extract or replace. For [ and [[, these are numeric or character or, for [ only, empty or logical. Numeric values are coerced to integer as if by as.integer. For replacement by [, a logical matrix is allowed.

Details

Arbitrary modifications of ccmpp_input_lists may not be valid members of the class. Therefore, the object resulting from a subset operation via `[`, or a replacement via `[<-`, and similar, will no longer inherit from class ccmpp_input_list (or subclasses) and the attributes specific to those classes will be lost.

Value

A list.

Author(s)

Mark Wheldon

See Also

ccmpp_input_list for class definitions, link{subset_time} and friends, and [.demog_change_component_df for similar functions for the constituent data frame objects.


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