Description Usage Arguments Details Value Author(s) See Also Examples
looks in the columns of a dataset (dataframe) for a column with coordinates and transforms them a standardized decimal format (see details).
1 2 | dataQC.LatitudeLongitudeCheck(dataset,
latlon.colnames=list(c("lat_lon"),c("latitude"), c("longitude")))
|
dataset |
dataframe. The dataset where the date column should be found |
latlon.colnames |
a list of length 3 with character vectors. Three vectors of potential names for the columns with the latitude-longidude values. The first vector in the list are names if latitude and longitude were to be in the same column (e.g. the MIxS lat_lon format), the second and third are for when latitude and longitude, respectively, are in seperate columns. Example: list(c("lat_lon"), c("latitude"), c("longitude")) |
The date column is found based on a user-provided list of possible names to look for (latlon.colnames argument). First, a single column is searched where latitude and longitude are noted in a single field, if this returns no result, latitude and longitude are looked for in seperate fields. When found, the coordinates are transformed to decimals and returned as a single field, with values separated by a single space That is: (X Y), with X a numeric decimal latitude value and Y a numeric decimal longitude value.
a list of length 2, with "$values" a vector of same length as the number of rows in the dataset argument, and "$warningmessages" a vector with potential warning messages as character strings.
Maxime Sweetlove CC-0 2019
Other quality control functions:
dataQC.TaxonListFromData()
,
dataQC.TermsCheck()
,
dataQC.completeTaxaNamesFromRegistery()
,
dataQC.dateCheck()
,
dataQC.eventStructure()
,
dataQC.findNames()
,
dataQC.generate.footprintWKT()
,
dataQC.guess.env_package.from.data()
,
dataQC.taxaNames()
1 2 3 4 5 6 7 8 9 10 11 12 | test_metadata <- data.frame(sample_name=paste("sample", 1:5, sep="_"),
collection_date=c("2020-09-23", "2020",
"16 Jan. 2020",
"November 1998",
"12/01/1999"),
latitude=c(23, 45, -56.44, "47.5", "-88° 4\' 5\""),
longitude=c(24, -57, -107.55, "33.5", "-130° 26\' 9\""),
row.names=paste("sample", 1:5, sep="_"))
dataQC.LatitudeLongitudeCheck(dataset=test_metadata,
latlon.colnames=list(c("lat_lon"),
c("latitude"),
c("longitude")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.