Learn R Programming

pim (version 2.0.2)

as.data.frame: Convert a pim.environment to a data frame

Description

This function extracts all data from a pim.environment and returns it as a data frame. Note that this is the original data frame, not the one with pseudo observations.

Usage

as.data.frame(x, row.names = NULL, optional = FALSE, ...)

# S4 method for pim.environment as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

a pim.environment object

row.names

NULL or a character vector giving the row names for the data frame. Missing values are not allowed.

optional

logical. if TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional

...

additional arguments to be passed to or from methods, including stringsAsFactors. For more information, see the function as.data.frame from the base package.

Value

a data frame.

Details

TO DO: Insert link to how to get pseudo observations out.

Examples

Run this code
# NOT RUN {
# Create a pim environment
data("DysData")
Dys <- new.pim.env(DysData)
str(as.data.frame(Dys))

# }

Run the code above in your browser using DataLab