melt_vector {baizer}R Documentation

melt a vector into single value

Description

melt a vector into single value

Usage

melt_vector(x, method = "first", invalid = NA)

Arguments

x

vector

method

how to melt, should be one of first|last, or one of sum|mean|median for numeric vector, or some characters (e.g. ⁠,|.| |;⁠) for character vector

invalid

invalid value to ignore, NA as default

Value

melted single value

Examples


melt_vector(c(NA, 2, 3), method = "first")

melt_vector(c(NA, 2, 3), method = "sum")

melt_vector(c(NA, 2, 3), method = ",")

melt_vector(c(NA, 2, Inf), invalid = c(NA, Inf))


[Package baizer version 0.8.0 Index]