File: identical_windows.R

package info (click to toggle)
r-cran-sparr 2.3-16-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 884 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 298 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
identical_windows <- function(w1,w2){
  w1x <- vertices(w1)$x
  w1y <- vertices(w1)$y
  w2x <- vertices(w2)$x
  w2y <- vertices(w2)$y
  
  if(!all(c(length(w1x)==length(w2x),length(w1y)==length(w2y)))) return(FALSE)
  
  if(any(c(sum(w1x!=w2x),sum(w1y!=w2y))>0)) return(FALSE)
  else return(TRUE)
}