Closed sandrinecharles closed 3 years ago
It's a warning from approx
function not linked to dplyr
.
When doing this (morse
version 3.2.7):
library(morse)
data("propiconazole")
survData_PRZ = survData(propiconazole)
fit_cstSD = survFit(survData_PRZ, model_type = "SD")
LCx(fit_cstSD, X = 50)
I get the same warning message:
Warning messages:
1: Problem with `mutate()` input `concentration`.
i collapsing to unique 'x' values
i Input `concentration` is `zoo::na.approx(concentration, q50, na.rm = FALSE)`.
2: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
3: Problem with `mutate()` input `concentration`.
i collapsing to unique 'x' values
i Input `concentration` is `na.approx(concentration, qinf95, na.rm = FALSE)`.
4: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
5: Problem with `mutate()` input `concentration`.
i collapsing to unique 'x' values
i Input `concentration` is `na.approx(concentration, qsup95, na.rm = FALSE)`.
6: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
It comes from our function pointsLCx
used in LCx.survFit.R
which call na.approx()
function itself calling approx()
function.
For instance here, every thing is fine:
But when looking in more tricky part like here, results are harder to deal with:
The problem is that warning is everywhere because of the 2nd situation!
It is solved now!
La fonction LCx renvoie des warnings sans doute liés au package
dplyr
:Warning messages: 1: Problem with
mutate()input
concentration. ℹ collapsing to unique 'x' values ℹ Input
concentrationis
zoo::na.approx(concentration, q50, na.rm = FALSE). 2: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) : collapsing to unique 'x' values 3: Problem with
mutate()input
concentration. ℹ collapsing to unique 'x' values ℹ Input
concentrationis
na.approx(concentration, qinf95, na.rm = FALSE). 4: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) : collapsing to unique 'x' values 5: Problem with
mutate()input
concentration. ℹ collapsing to unique 'x' values ℹ Input
concentrationis
na.approx(concentration, qsup95, na.rm = FALSE). 6: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) : collapsing to unique 'x' values