Learn R Programming

fuj (version 0.2.1)

quick_df: Quick DF

Description

This is a speedier implementation of as.data.frame() but does not provide the same sort of checks. It should be used with caution.

Usage

quick_df(x = NULL)

empty_df()

quick_dfl(...)

Value

A data.frame; if x is NULL a data.frame with 0 rows and 0

columns is returned (similar to calling data.frame() but faster). empty_df() returns a data.frame with 0 rows and 0 columns.

Arguments

x

A list or NULL (see return)

...

Columns as tag = value (passed to list())

Examples

Run this code
# unnamed will use make.names()
x <- list(1:10, letters[1:10])
quick_df(x)

# named is preferred
names(x) <- c("numbers", "letters")
quick_df(x)

# empty data.frame
empty_df() # or quick_df(NULL)

Run the code above in your browser using DataLab