edit.data.frame {base}R Documentation

Edit data frames

Description

Use data editor on data frame contents.

Usage

edit.data.frame(name, factor.mode=c("numeric", "character"))

Arguments

name A data frame.
factor.mode How to handle factors (as integers or using character levels).

Details

At present, this only works on simple data frames containing numeric or character vectors and factors. Factors are represented in the spreadsheet as either numeric vectors (which is more suitable for data entry) or character vectors (better for browsing). After editing, vectors are padded with NA to have the same length and factor attributes are restored. The set of factor levels can not be changed by the editing; invalid levels are changed to NA and a warning is issued.

Value

The edited data frame.

Note

fix(dataframe) works for in-place editing by calling this function.

If the data editor is not available, a dump of the object is presented for editing using the default method of edit.

Author(s)

Peter Dalgaard

See Also

data.entry, edit

Examples


data(airquality)
edit(airquality)
edit(airquality, factor.mode="character")


[Package Contents]