addChar: addChar

View source: R/addChar.R

addCharR Documentation

addChar

Description

This function adds a water quality characteristic to an existing Site object.

Usage

addChar(
  park,
  site,
  CharacteristicName,
  DisplayName,
  Substrate,
  SampleFraction = NA,
  Category,
  Details,
  Units,
  Data,
  LowerPoint,
  LowerType,
  LowerDescription,
  UpperPoint,
  UpperType,
  UpperDescription,
  AssessmentDetails
)

Arguments

park

A Park object

site

If park is not specified, then a Site object. If park is specified, then the SiteCode corresponding to a site object conatined in the park object.

CharacteristicName

The name of the water quality characteristic. Stored as a length 1 character vector.

DisplayName

A name for the characteristic suitable for display on graphs, tables etc. Stored as a length 1 character vector.

Substrate

The substrate of the characteristic, stored as a length 1 character vector.

SampleFraction

The sample fraction of the characteristic. Stored as a length 1 character vector.

Category

The category for the characteristic. Stored as a length 1 character vector.

Details

A description of the characteristic as needed. Stored as a length 1 character vector.

Units

The units of measurement of the characteristic. Stored as a length 1 character vector.

Data

A data.frame containing the water quality data. Should have columns representing the date, measurement, any QAQC flags etc. for each measurement.

LowerPoint, UpperPoint

Indicates the assessment points. Values lower than the lower point are considered to have failed the assessment, whereas values higher than the higher point are considered failures. Can either be a length 1 numerical vector, or a data.frame giving the lower assessment value for each measurement. The vector method should be used for assessments that do not change, whereas the data.frame is for assmesent that change based on the time of the year or other factors.

LowerType, UpperType

The type of assessment indicated by the lower and upper points. A length 1 character vector.

LowerDescription, UpperDescription

A description of the lower and upper assessments point. Stored as a length 1 character vector.

AssessmentDetails

Additional description of the assessment point. Stored as a length 1 character vector.

Details

This command can be used to add a Characteristic object to the list of existing characteristics in an existing Site object. The CharacteristicName will be used to name the characteristeic in the list. If a park object is provided addCharacteristic will look for the site in that park.

Value

If no park is specified,returns the site object with the characteristic added. If a park is specified, returns the park object with the characteristic added to the site.


NCRN/NCRNWater documentation built on May 15, 2023, 9:50 p.m.