mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2025-01-18 03:16:34 +01:00
updated quantile_cut adds na.rm=TRUE to min() and max() 2022-08-26 15:07:49
This commit is contained in:
parent
9e7560c562
commit
a0c4b3f9c3
@ -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>
|
||||
|
@ -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)){
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user