addSiteName: Create an extra column in a data frame with the name of the...

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.r View source: R/addSiteName.r

Description

Adds an extra column with the given string for each row in the data frame

Usage

1

Arguments

data

The data frame

name

A string to write in the extra column, usually the name of the site e.g., "Harwood"

Details

The function is useful if you need an identifier when combine data with different characteristics

Value

Returns a column with character elements

Author(s)

Georgios Xenakis

Examples

1
2
3
4
5
6
7
8
9
##Load the data
data(fluxes)

## Clean data
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,timesList=3,distCor=TRUE,
                   thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))

## Add the name of the site
fluxes=addSiteName(fluxes,"Harwood")

Example output



FREddyPro documentation built on May 29, 2017, 7:22 p.m.