Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

naLast

Sort key so that non missing values are first in the value vector.


Description

Sort key so that non missing values are first in the value vector.

Usage

naLast(key, byvar = "name_new", valvar = "value_new",
  na.strings = c("\\.", "", "\\s+", "N/A"))

Arguments

key

key, long or wide

byvar

Default is "name_new", the column for sorting into blocks.

valvar

The value variable on which sorting is to be done, "value_new".

na.strings

vector of characters to be treated as NA

Value

sorted key, with blocks that have the missings last


kutils

Project Management Tools

v1.70
GPL-2
Authors
Paul Johnson [aut, cre], Benjamin Kite [aut], Charles Redmon [aut], Jared Harpole [ctb], Kenna Whitley [ctb], Po-Yi Chen [ctb], Shadi Pirhosseinloo [ctb]
Initial release
2020-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.