as.data.frame.quarry {quarrint}R Documentation

Coerce a Quarry to a Data Frame

Description

Coerce an object of type quarry to a data.frame. The attributes to be stored in the data frame can be specified (default: keeping every attributes).

Usage

## S3 method for class 'quarry'
as.data.frame(x, row.names = NULL, optional = NULL, 
              attr = "all", ...)

Arguments

x

An object of type quarry.

row.names

Not used.

optional

Not used.

attr

A vector listing the dummy variables to be retained in the data frame.

...

Further arguments passed to or from other methods.

Value

A data frame with the columns listed in attr.

Note

The data frame will only stores the dummy variables of the quarry.

Author(s)

Johan Barthelemy.

Maintainer: Johan Barthelemy johan@uow.edu.au.

See Also

as.data.frame for the generic method.

Examples

# creating a quarry
q <- quarry(geological.context = 2, hydrogeological.context = 4,
            piezometric.context = 1, quarry.position = 4,
            production.catchment = 4, quality.catchment = 3)

# coercing to a data frame
q.df <- as.data.frame(q)

# coercing to a data frame, keeping only "H1", "Z1" and "C2"
q.df.subset <- as.data.frame(q, attr = c("H1","Z1","C2"))

[Package quarrint version 1.0.0 Index]