load_datafile: read in a raw datafile from the downloaded data or the GitHub...

Description Usage Arguments Examples

View source: R/load_ete.R

Description

does checking for whether a particular datafile exists and then reads it in, using na_strings to determine what gets converted to NA. It can also download the dataset if it's missing locally.

Usage

1
2
3
4
5
6
7
load_datafile(
  datafile,
  na.strings = "",
  path = get_default_data_path(),
  download_if_missing = TRUE,
  quiet = TRUE
)

Arguments

datafile

the path to the datafile within the folder for Portal data

na.strings

a character vector of strings which are to be interpreted as NA values. Blank fields are also considered to be missing values in logical, integer, numeric and complex fields. Note that the test happens after white space is stripped from the input, so na.strings values may need their own white space stripped in advance.

quiet

logical, whether to perform operations silently

Examples

1
species_df <- load_datafile("ETE/species.csv")

Smithsonian/ETERnity documentation built on March 1, 2020, 5:45 a.m.