Maximum Column String Width

DESCRIPTION:

Get the maximum number of characters that can be stored in a big data string column.

This function requires the bigdata library section to be loaded.

USAGE:

bd.string.column.width(x, columns=NULL)

REQUIRED ARGUMENTS:

x
a bdFrame.

OPTIONAL ARGUMENTS:

columns
names or numbers of the data set columns to be processed. If NULL, this specifies all of the data set columns.

VALUE:

A named numeric vector containing the maximum numbers of characters that can be stored in a string column for the specified columns. The names are those of the selected columns. The values are undefined for non string columns, or if x is not a bdFrame.

DETAILS:

Each bdFrame string column is created with a set maximum string width. Attempting to store a longer string within such a column will generate a warning, and truncate the string. New data columns can be created with a specified string column width by specifying the string.column.width argument to bd.create.columns. The default string width for newly-created columns is determined by the "string.column.width" option to bd.options.

SEE ALSO:

, .

EXAMPLES:

## Get maximum string width for character columns.  Note this is the
## maximum number of characters possible, not the maximum present.
df <- as.bdFrame(state.x77)
df <- bd.create.columns(df, "'Population: ' + asString(Population) +
    ', Income: ' + asString(Income) + ', Area: ' + asString(Area)", 
  name="Message", 
  type="character", string.column.width=60) 
bd.string.column.width(df, "Message")
table(nchar(df$Message))