Description Usage Arguments Value Author(s) Examples
This function use the periods as used in the pollen file names and use the directory to look for the files.
1 | loadPollen(period, indir)
|
period |
Should be a vector with the values of the periods for which the pollen data should be loaded. |
indir |
Should be a directory with the path to look for the pollen files (.csv). |
This function return a list in which each element is a dataframe with the pollen data (rows are pollen sites and columns are pollen taxon).
Diego Nieto Lugilde
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (period, indir)
{
pSites <- read.csv(paste(indir, "Pollen/All.site.data-withagemodel-finalv2.txt", sep = ""), sep = "\t")
colnames(pSites)[3] <- "sites"
pSites <- pSites[, c("sites", "Longitude", "Latitude")]
fName <- paste(indir, "Pollen/all data by time/PollenAbund_Q_", period, "bp.csv", sep = "")
pConc <- read.csv(fName)
pConc <- pConc[complete.cases(pConc), ]
pData <- merge(pConc, pSites, by = "sites")
return(pData)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.