as_tibble.krig_lst: Coerce objects of class "krig_lst" to dataframe or tbl...

Description Usage Arguments Value See Also Examples

Description

This method creates a dataframe from the output of fgeo.krig::krig() (which is a list of class "krig_lst").

Usage

1
2
3
4
5
6
## S3 method for class 'krig_lst'
as_tibble(x, .id = "var", item = "df", ...)

## S3 method for class 'krig_lst'
as.data.frame(x, row.names = NULL, optional = FALSE,
  .id = "var", item = "df", ...)

Arguments

x

The output of fgeo.krig::krig().'

.id

Name for the column to hold soil variable-names.

item

Character string; either "df" or "df.poly".

...

Arguments passed to the base::as.data.frame() (not used in as_tibble.krig_lst()).

row.names

NULL or a character vector giving the row names for the data frame. Missing values are not allowed.

optional

logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional. Note that all of R's base package as.data.frame() methods use optional only for column names treatment, basically with the meaning of data.frame(*, check.names = !optional). See also the make.names argument of the matrix method.

Value

A dataframe.

See Also

base::as.data.frame(), tibble::as_tibble().

Examples

1
2
3
4
5
6
vars <- c("c", "p")
krig <- krig(soil_fake, vars, quiet = TRUE)

as_tibble(krig)

head(as.data.frame(krig, stringsAsFactors = FALSE))

forestgeo/fgeo.krig documentation built on June 26, 2019, 8:09 p.m.