ez.pasteattr: paste attr to a df or vector, from a list of list, or list...

View source: R/frame.R

ez.pasteattrR Documentation

paste attr to a df or vector, from a list of list, or list respectively

Description

paste attr to a df or vector, from a list of list, or list respectively

Usage

ez.pasteattr(x, col = NULL, attrs = NULL, ...)

Arguments

x

a data frame or a vector

col

evaluated by ez.selcol(x,col). Or, NULL=all cols.

attrs

a list of list ($sex $sex$label $sex$labels for df) or list ($label $labels for vector). Works fine even if the list or list of list is empty, or if list has $sex $race but df has 'sex', no 'race'
when only two parameters passed in, will be interpreted as (x,attrs) with col=NULL

Value

returns a new data frame or vector


jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.