[Rd] R CMD INSTALL warning for S4 replacement functions on R 4.1.0-alpha

2021-04-23 Thread Felix Ernst
Hi all,

Since R 4.1, R CMD INSTALL throws warning during building the man pages, when 
installing from source.

We noticed this first on Windows for man pages involving S4 replacement 
function:

  *   
http://bioconductor.org/checkResults/devel/bioc-LATEST/Modstrings/riesling1-checksrc.html
  *   
http://bioconductor.org/checkResults/devel/bioc-LATEST/GenomicAlignments/riesling1-checksrc.html

However, it's also showing up on linux with a slight twist (file not found 
instead of invalid argument) for other functions:

  *   https://cran.r-project.org/web/checks/check_results_Matrix.html (right at 
the end)

>From the messages and the involved offending filenames, we hypothesize that 
>this is triggered by invalid filenames specific to the OS.
Please note, that the warning is not issued during R CMD CHECK for a given 
package.

Can anyone comment on this? Is more information needed? If it is a bug, I am 
happy to post on the bug tracker.

Thanks for any advice.

Best regards,
Felix

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] compairing doubles

2018-08-31 Thread Felix Ernst
Dear all,

I a bit unsure, whether this qualifies as a bug, but it is definitly a strange 
behaviour. That why I wanted to discuss it.

With the following function, I want to test for evenly space numbers, starting 
from anywhere.

.is_continous_evenly_spaced <- function(n){
  if(length(n) < 2) return(FALSE)
  n <- n[order(n)]
  n <- n - min(n)
  step <- n[2] - n[1]
  test <- seq(from = min(n), to = max(n), by = step)
  if(length(n) == length(test) &&
 all(n == test)){
return(TRUE)
  }
  return(FALSE)
}

> .is_continous_evenly_spaced(c(1,2,3,4))
[1] TRUE
> .is_continous_evenly_spaced(c(1,3,4,5))
[1] FALSE
> .is_continous_evenly_spaced(c(1,1.1,1.2,1.3))
[1] FALSE

I expect the result for 1 and 2, but not for 3. Upon Investigation it turns 
out, that n == test is TRUE for every pair, but not for the pair of 0.2.

The types reported are always double, however n[2] == 0.1 reports FALSE as well.

The whole problem is solved by switching from all(n == test) to 
all(as.character(n) == as.character(test)). However that is weird, isn�t it?

Does this work as intended? Thanks for any help, advise and suggestions in 
advance.

Best regards,
Felix


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel