Learn R Programming

plumbr (version 0.6.10)

$.mutaframe: Extraction and Replacement

Description

These functions extract, subset and replace data in a mutaframe. For the most part, these behave much like those for data.frame.

Arguments

x

A mutaframe

name

Name of the column to extract

i

The row indices

j

The column indices

...

Arguments passed to methods

value

The replacement column

drop

If TRUE and the result of subsetting is a single column or row, that column or row is extracted as the result. By default, this is TRUE if the result has one column.

Value

The selected column

The selected column

A dynamic, filtering mutaframe

Details

The subset function, [, does not copy the data; it establishes a dynamic filter.

Replacing an existing variable will pass the replacement data up the reverse pipeline, towards the root. When defining a new variable, the variable is stored in the current mutaframe; not at the root.