Learn R Programming

wakefield (version 0.3.9)

seriesname: Add Internal Name to Data Frame

Description

Adds attributes(x)[["seriesname"]] attribute to a data.frame.

Usage

seriesname(x, name)

Value

Returns a data.frame with a attributes(x)[["seriesname"]] assigned.

Arguments

x

A data.frame to add a seriesname attribute (i.e., attributes(x)[["seriesname"]])

name

A name to assign to attributes(x)[["seriesname"]].

Examples

Run this code
seriesname(mtcars, "Cars")
attributes(seriesname(mtcars, "Cars"))

Run the code above in your browser using DataLab