splitQual: Split character qualifiers and numeric values from qualified...

Description Usage Arguments Value Author(s) References Examples

View source: R/All.R

Description

splitQual extracts qualified and unqualified vectors from a character vector containing concatenated numeric and qualifying characters.

Typically used to split “less-thans" in qualifier-numeric concatenations like “<0.5".

Usage

1
 splitQual(v, qual.symbol= "<") 

Arguments

v

A character vector.

qual.symbol

The qualifier symbol to split from the characters in v. Defaults to “<".

Value

splitQual returns a list of three vectors.

qual

A numeric vector of values associated with qualified input.

unqual

A numeric vector of values associated with unqualified input

qual.index

Indexes of qualified values (ie., where qual.symbol was matched)

unqual.index

Indexes of unqualified values (ie., where qual.symbol was not matched)

Author(s)

R. Lopaka Lee <rclee@usgs.gov>

Dennis Helsel <dhelsel@practicalstats.com>

References

Lee and Helsel (2005), Statistical analysis of environmental data containing multiple detection limits: S-language software for regression on order statistics, Computers in Geoscience vol. 31, pp. 1241-1248

Examples

1
2
    v = c('<1', 1, '<1', 1, 2)
    splitQual(v)

Example output

Loading required package: survival

Attaching package: 'NADA'

The following object is masked from 'package:stats':

    cor

$obs
[1] 1 1 1 1 2

$cen
[1]  TRUE FALSE  TRUE FALSE FALSE

NADA documentation built on March 22, 2020, 5:07 p.m.

Related to splitQual in NADA...