updated quantile_cut adds na.rm=TRUE to min() and max() 2022-08-26 15:07:49

This commit is contained in:
AG Damsbo 2022-08-26 15:07:49 +02:00
parent 9e7560c562
commit a0c4b3f9c3
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
Package: daDoctoR
Title: Functions For Health Research
Version: 0.22.7
Version: 0.22.8
Year: 2021
Author: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>

View File

@ -21,8 +21,8 @@ quantile_cut<-function (x, groups,y=NULL, na.rm = TRUE, group.names = NULL, orde
if (!is.null(y)){
q<-quantile(y, probs = seq(0, 1, 1/groups), na.rm = na.rm, names = TRUE, type = 7)
if (inc.outs){ # Setting cut boardes to include outliers in x compared to y.
q[1]<-min(x)
q[length(q)]<-max(x)
q[1]<-min(x,na.rm = TRUE)
q[length(q)]<-max(x,na.rm = TRUE)
}
}
if (is.null(y)){

View File

@ -16,7 +16,7 @@ devtools::document()
# Commit and push
commit_message<-"updated quantile_cut to add flags for including outliers when y!=NULL and flag to give result as detailed list (previous standard)"
commit_message<-"updated quantile_cut adds na.rm=TRUE to min() and max()"
library(git2r)
library(lubridate)