Create New File Source
createNewFileSource.Rd
Creates a script for a new data source from a local or remote file. Only "csv" or "xlsx" files are supported.
Usage
createNewFileSource(
dataSourceName,
datingType,
coordType,
mappingName,
locationType,
fileName,
remotePath = NULL,
sheetNumber = 1,
sep = ";",
dec = ",",
scriptFolder = "R",
isTest = FALSE
)
Arguments
- dataSourceName
(character) name of the new data source, something like "xyDBname", "14CSea", "CIMA", "IntChron", "LiVES". The name of the source must be contained exactly as a column name in the mapping file.
- datingType
(character) dating type for the database, e.g. "radiocarbon" or "expert"
- coordType
(character) coordinate type of latitude and longitude columns; one of "decimal degrees" (e.g. 40.446 or 79.982), "degrees decimal minutes" ("40° 26.767' N" or "79° 58.933' W"), "degrees minutes seconds" ("40° 26' 46” N" or "79° 58' 56” W")
- mappingName
(character) name of the mapping without file extension, e.g. "IsoMemo". The mapping (a .csv file) must be available under "inst/mapping/".
- locationType
type of location, any of "local" or "remote". OPTION 1: "local" (the file must be available under inst/extdata/). OPTION 2: "remote" (load data from remote path).
- fileName
name of file, e.g. "data.csv", "14SEA_Full_Dataset_2017-01-29.xlsx"
- remotePath
path to remote file, if locationType == "remote", e.g. "http://www.14sea.org/img/"
- sheetNumber
(integer) number of the table sheet for xlsx files, e.g. "14C Dates"
- sep
(character) field separator character
- dec
(character) the character used in the file for decimal points
- scriptFolder
(character) place to store the scripts.
- isTest
(logical) TRUE if automatic testing