dot-convert_to_data.frame: (Internal) Ensures replacement column for...

.convert_to_data.frameR Documentation

(Internal) Ensures replacement column for StudySpecification is a data.frame.

Description

Helper function for StudySpecification replacers to ensure replacement is a properly named data.frame

Usage

.convert_to_data.frame(value, specification, type)

Arguments

value

A vector or data.frame containing a replacement.

specification

A StudySpecification

type

One of "t", "f", "u" or "b"

Details

When given a replacement set of values (e.g vector or matrix), this ensures that the replacement is a named data.frame.

Input vector: Since it cannot be named, a vector can only be used to replace an existing component. If the existing component has more than 1 column, uses the name of the first column.

Input matrix or data.frame: If unnamed and replacing existing component, must have no more columns than original component. (If less columns, uses the name of the first few columns.) If named, can replace any number of columns.

Value

data.frame containing named column(s)


propertee documentation built on Aug. 22, 2025, 1:09 a.m.