loadPollen: Load pollen data.

Description Usage Arguments Value Author(s) Examples

Description

This function use the periods as used in the pollen file names and use the directory to look for the files.

Usage

1
loadPollen(period, indir)

Arguments

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).

Value

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).

Author(s)

Diego Nieto Lugilde

Examples

 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)
  }

dinilu/paleoCLMs-package documentation built on May 15, 2019, 8:46 a.m.