as_tibble | R Documentation |
Function to coerce (convert) an LPJmLData
object into a
tibble (modern data.frame). Read more about
tibbles at https://r4ds.had.co.nz/tibbles.html.
as_tibble(x, subset = NULL, aggregate = NULL, value_name = "value", ...)
x |
LPJmLData object |
subset |
List of array dimension(s) as name/key and
corresponding subset vector as value, e.g.
|
aggregate |
List of array dimension(s) as name/key and
corresponding aggregation function as value, e.g.
|
value_name |
Name of value column in returned |
... |
Arguments passed to the aggregate function(s), e.g.
|
a tibble with columns corresponding to dimension
naming of the LPJmLData$data
array and values in one value column.
## Not run:
vegc <- read_io(filename = "./vegc.bin.json")
# Returns two-dimensional tibble representation of vegc$data.
as_tibble(vegc)
# cell time band value
# <fct> <fct> <fct> <dbl>
# 1 0 1901-12-31 1 13627.
# 2 1 1901-12-31 1 120.
# 3 2 1901-12-31 1 133.
# 4 3 1901-12-31 1 97.4
# 5 4 1901-12-31 1 75.9
# 6 5 1901-12-31 1 11.1
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.