clean.format: Clean Format

Description Usage Arguments Details See Also

View source: R/clean.format.R


Clean by fixing data entry errors, and standardizing value formats


clean.format(X, reg = c("ai", "ebs", "gmex", "goa", "neus", "newf", "ngulf",
  "sa", "sgulf", "shelf", "wcann", "wctri"))



a data.table containing trawl data


a region; should be one of the following: c("ai","ebs","gmex","goa", "neus", "newf", "sa", "sgulf", "shelf", "wcann", "wctri")


It is this function that makes specific corrections for data entry errors. For example, in one region a tow duration of 3 should have been 30. In another region some of the effort values were entered as 0 or NA, but should have had a particular value.

This function also ensures that longitude and latitude are in the same format among regions.

Other data entry errors or necessary corrections are implemented here, too.

Dates are not thoroughly formatted here, except in some cases where getting a year, e.g., requires parsing values out of other columns. POSIX class dates not created.

See Also

clean.names, clean.format, clean.columns, clean.trimRow

rBatt/trawlData documentation built on July 19, 2018, 1:26 a.m.