Operator biner yang memungkinkan perbandingan nilai vektor atom.
x < y
x > y
x <= y="" x="">= y
x == y
x != y</=>
| Parameter | Deskripsi |
|---|---|
x, y |
atomic vectors, symbols, calls, or other objects for which methods have been written. |
# NOT RUN {
x <- stats::rnorm(20)
x < 1
x[x > 0]
x1 <- 0.5 - 0.3
x2 <- 0.3 - 0.1
x1 == x2 # FALSE on most machines
identical(all.equal(x1, x2), TRUE) # TRUE everywhere
# }
# NOT RUN {
# range of most 8-bit charsets, as well as of Latin-1 in Unicode
z <- c(32:126, 160:255)
x <- if(l10n_info()$MBCS) {
intToUtf8(z, multiple = TRUE)
} else rawToChar(as.raw(z), multiple = TRUE)
## by number
writeLines(strwrap(paste(x, collapse=" "), width = 60))
## by locale collation
writeLines(strwrap(paste(sort(x), collapse=" "), width = 60))
# }