BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Date format check #11

Closed AugustT closed 11 years ago

AugustT commented 11 years ago

There is no check to ensure that date columns are in fact in date format when a dataframe is passed to sparta or frescalo. Since internal processes require dates to be dates this will lead to issues. Add a few lines that catch this (and any other) potential column class issues.

drnickisaac commented 11 years ago

It would be worth clarifying whether it needs to be of Date class or POSIXct.

AugustT commented 11 years ago

This error check is now in place and if the column is not in date format the following error is returned: column Date is not in a date format. This should be of class "Date" or "POSIXct"