NewDataframe

The NewDataframe command copies or creates a new dataframe. It can be used in two ways.

An existing dataframe can be copied to a new dataframe by using the consumesDataframe and producesDataframe properties of NewDataframe. The new dataframe will be a “deep” copy in the sense used in R and Python.

NewDataframe can also be used to create an empty dataframe of a specific size. In Stata, the “set obs #” command will create a dataframe with a user-defined number of rows. All values are assumed to be missing. This may be used in simulations to preset a number of simulated observations, which are then filled with randomly generated data.

Properties

Name

Type

Description

NumberOfRows

int

0..1

Number of rows in new dataframe

NumberOfColumns

int

0..1

Number of columns in new dataframe

Properties Inherited from TransformBase

Name

Type

Description

ProducesDataframe

DataframeDescription

0..n

Signify the dataframe which this transform produces.

ConsumesDataframe

DataframeDescription

0..n

Signify the dataframe which this transform acts upon.

Properties Inherited from CommandBase

Name

Type

Description

Command

string

1..1

The type of command

SourceInformation

SourceInformation

0..n

Information about the source of the command.

MessageText

string

0..n

Adds a message that can be displayed with the command.

Item Type Hierarchy

Relationships

The following identified item types reference this type.

stub