coalesce_rows {manydata}R Documentation

Get first non-missing

Description

For use with dplyr::summarise, for example

Usage

coalesce_rows(x)

Arguments

x

A vector

Details

This function operates similarly to coalesce for columns, that is picking the first non-missing observation, but on observations rather than variables.

Value

A single value

Source

https://stackoverflow.com/questions/40515180/dplyr-how-to-find-the-first-non-missing-string-by-groups

Examples


dplyr::reframe(emperors$wikipedia, coalesce_rows(emperors$wikipedia))
coalesce_rows(emperors$wikipedia$Begin)


[Package manydata version 0.9.3 Index]