pd_meta: Metadata repoter

Description Usage Arguments Value Examples

View source: R/pd_meta.R

Description

Metadata repoter

Usage

1

Arguments

x

an object of class 'phylodiv'. defaults to using the last phylodiv object in the R session

file

if 'NULL', metadata report returned. if a file given we write the metadata summary to the file path as JSON

Value

- 'pd_meta': a named list of class phylodiv_meta if 'is.null(file) == TRUE', or 'NULL' if 'is.null(file) != TRUE' - 'last_obj': get the last phylodiv object in the session

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
library(ape)
data(chiroptera)
st <- ape::subtrees(chiroptera)[[393]]
x <- pd_read(tree = st)
x
pd_meta()
pd_meta(file = (f <- tempfile()))
readLines(f)
jsonlite::fromJSON(f, FALSE)

# get last phylodiv object
last_obj()

## End(Not run)

ropensci/phylodiv documentation built on March 13, 2020, 3:14 p.m.