This package enables automated processing of fisheries data into suitable forms for running ecosystem models against it, e.g. GADGET.
This package contains several distinct sets of functions:
mfdb
function)mfdb_import_*
functions)mfdb_*
functions)gadget_*
functions)Using this, you can install have a script automating the process of:
Also, this libary can be used to connect to a remote database and generate model files from that data.
This work is based on it’s predecessor, DST^2.
If connecting to a PostgreSQL database, you will also need RPostgres, and PostgreSQL installed if you want to run the database locally too.
Installation of RPostgres will happen automatically, however you need some PostgreSQL libraries before it will work:
Also, you can install the postgresql
package using:
Some additional instructions are available here: https://wiki.debian.org/PostgreSql
Now, create an mf
database that the user on your computer owns:
Installation of RPostgres will happen automatically, however you need some PostgreSQL libraries before it will work:
Also, you can install the postgresql
package using:
Some additional instructions are available here: https://fedoraproject.org/wiki/PostgreSQL and some tips when troubleshooting CentOS installations can be found at: http://stackoverflow.com/questions/17633422/psql-fatal-database-user-does-not-exist
Now, create an mf
database that the user on your computer owns:
To install PostgreSQL, download version 9.5 of the database installer from here:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
Find the psql shell (SQL shell) in the start menu, and create both an mf
database and user:
For an introduction to the package, read the package?mfdb
help file in R. This is also available online.
There are a selection of example scripts in the demo/
folder. The example-*
scripts show the full process of importing data from specified sources into the database, then querying this to aggregate into various gadget model files. The inttest-*
scripts demonstrate other aspects, and also function as tests to ensure that the library works correctly (thus the ok()
function calls).
Finally, there is documentation on the database schema.