jonesor / compadreDB

Code and data for the COMPADRE Plant Matrix Database and COMADRE Animal Matrix Database
GNU General Public License v2.0
35 stars 20 forks source link

Add db type ('COMADRE' or 'COMPADRE') to version slot? #23

Closed patrickbarks closed 5 years ago

patrickbarks commented 5 years ago

Suggest adding db type to version info when the db is initially compiled, so that Rcompadre methods (e.g. show and fetchDB) know for sure which database it is and can print messages accordingly, without having to resort to 'tricks' like looking at db$Kingdom or other columns that may be removed by the user.

Could combine with the $Version element, e.g. "COMPADRE 4.0.1", but I think I'd prefer a separate element e.g.

$Database
$Version
$DateCreated
$Agreement
jonesor commented 5 years ago

That's an easy one. I have now implemented it within the compile code. Version is now a list with elements as you suggest producing the following:

> compadre$version
$Database
[1] "COMPADRE"

$Version
[1] "X.X.X"

$DateCreated
[1] "Nov_27_2018"

$Agreement
[1] "https://www.compadre-db.org/Page/UserAgreement"