Learn R Programming

ecoretriever (version 0.2.1)

install: Install datasets via the EcoData Retriever.

Description

Data is stored in either CSV files or one of the following database management systems: MySQL, PostgreSQL, SQLite, or Microsoft Access.

Usage

install(dataset, connection, db_file = NULL, conn_file = NULL, data_dir = ".", log_dir = NULL)

Arguments

dataset
the name of the dataset that you wish to download
connection
what type of database connection should be used. The options include: mysql, postgres, sqlite, msaccess, or csv'
db_file
the name of the datbase file the dataset should be loaded into
conn_file
the path to the .conn file that contains the connection configuration options for mysql and postgres databases. This defaults to mysql.conn or postgres.conn respectively. The connection file is a comma seperated file with four fields: user, password, host, and port.
data_dir
the location where the dataset should be installed. Only relevant for csv connection types. Defaults to current working directory
log_dir
the location where the retriever log should be stored if the progress is not printed to the console

Examples

Run this code

ecoretriever::install('MCDB', 'csv')

Run the code above in your browser using DataLab