coalesce.na-deprecated

0th

Percentile

Replaces NA values

This (vectorized) function returns the first non-NA argument, similar to the SQL function COALESCE. If a vector or matrix is passed as first argument, the remaining arguments are recycled to generate a vector/matrix of the same dimension, and coalescing is done element by element.

Usage
coalesce.na(x, ...)
Arguments
x

The first value to coalesce.

...

Other values to coalesce.

Value

A vector of the same length as x.

See Also

Other deprecated functions: df_to_list-deprecated, hms.to.seconds-deprecated, kimisc-deprecated, list_to_df-deprecated, nc-deprecated, nlist-deprecated, ofactor-deprecated, sample.rows-deprecated, seconds.to.hms-deprecated, thisfile-deprecated, tll-deprecated, vswitch-deprecated

Aliases
  • coalesce.na-deprecated
  • coalesce.na
Examples
# NOT RUN {
coalesce.na(NA, -1)
coalesce.na(5, 3)
coalesce.na(c(1,NA,NA), c(NA,2))
coalesce.na(matrix(c(NA, 1:3), nrow=2))
coalesce.na(NA)
# }
Documentation reproduced from package kimisc, version 0.4, License: GPL-3

Community examples

Looks like there are no examples yet.