as.data.frame.quarry: Coerce a Quarry to a Data Frame

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/quarry.R

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

1
2
3
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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"))

quarrint documentation built on May 1, 2019, 10:10 p.m.