Learn R Programming

fgeo.tool (version 1.2.9)

read_vft: Import ViewFullTable or ViewTaxonomy data from a .tsv or .csv file.

Description

read_vft() and read_taxa() help you to read ViewFullTable and ViewTaxonomy data from text files delivered by the ForestGEO database. These functions avoid common problems about column separators, missing values, column names, and column types.

Usage

read_vft(file, delim = NULL, na = c("", "NA", "NULL"), ...)

read_taxa(file, delim = NULL, na = c("", "NA", "NULL"), ...)

Value

A tibble.

Arguments

file

A path to a file.

delim

Single character used to separate fields within a record. The default (delim = NULL) is to guess between comma or tab ("," or "\t").

na

Character vector of strings to interpret as missing values. Set this option to character() to indicate no missing values.

...

Other arguments passed to readr::read_delim().

Acknowledgments

Thanks to Shameema Jafferjee Esufali for inspiring the feature that automatically detects delim (issue 65).

See Also

readr::read_delim(), type_vft(), type_taxa().

Other functions to read text files delivered by ForestgGEO's database: type_vft()

Examples

Run this code
assert_is_installed("fgeo.x")
library(fgeo.x)

example_path()

file_vft <- example_path("view/vft_4quad.csv")
read_vft(file_vft)

file_taxa <- example_path("view/taxa.csv")
read_taxa(file_taxa)

Run the code above in your browser using DataLab