Learn R Programming

fixedTimeEvents (version 1.0.1)

NA2NaN: Translation of values from NA (not available) to NaN (not a number)

Description

Exchanges all occurrences of NA in a vector with NaN. A warning is issued when NAs or NaNs are found.

Usage

NA2NaN(k)

Arguments

k

numerical vector possibly containig NAs.

Value

Returns a vector where possible NAs have been changed to NaNs.

See Also

dLiland, Liland, Liland.test, simLiland

Examples

Run this code
# NOT RUN {
NA2NaN( c(0, 1, NA, NaN))
NA2NaN( c(0, 1, 2, NaN))
NA2NaN( c(0, 1, NA, 100))
NA2NaN( c(0, 1, 2, 100))
# }

Run the code above in your browser using DataLab