initDataFrameWithColnames: Initialize a DataFrame with Column Names

View source: R/dataInitialization.R

initDataFrameWithColnamesR Documentation

Initialize a DataFrame with Column Names

Description

This function creates an empty data frame and assigns the specified column names with zero rows.

Usage

initDataFrameWithColnames(colnames = NULL)

Arguments

colnames

A character vector specifying the names of the columns for the data frame. This vector will be attempted to be coerced to a character.

Value

A data frame with the specified column names. Non unique names will be handled by the conventions of data.frame(). prefixes.

Examples

# Create a data frame with specified column names initialized with NA
initDataFrameWithColnames(c("Name", "Age", "Gender"))


FastUtils documentation built on Sept. 11, 2024, 5:13 p.m.