setwd('/home/Hornik/tmp/')
NULL
x <- NULL
x
typeof(NULL)
length(NULL)
is.null(NULL)
is.null(1)
TRUE
typeof(TRUE)
length(TRUE)
FALSE
NA
typeof(NA)
length(NA)
x <- c(TRUE, FALSE, NA)
typeof(x)
length(x)
logical(3)
1
as.logical(1)
as.logical(4)
is.logical(4)
is.logical(TRUE)
logical(3)
logical(2)
logical(1)
logical(0)
is.null(logical(0))
typeof(logical(0))
length(logical(0))
x
!x
x
x & TRUE
x & FALSE
x & NA
outer(x, x, `&`)
x
x | TRUE
x | FALSE
x | NA
outer(x, x, `|`)
TRUE == TRUE
TRUE == FALSE
x == TRUE
x == FALSE
x == NA
outer(x, x, `==`)
x
x == NA
!x == NA
is.na(x)
sample(x, 13, replace=TRUE)
s <- sample(x, 13, replace=TRUE)
is.na(s)
sum(is.na(s))
s[is.na(s)]
length(s[is.na(s)])
x
!x
x | FALSE
x | c(FALSE, FALSE)
1
length(1)
typeof(1)
1L
typeof(1L)
0xfL
0xaL
0xcL
0xfL
0xffL
1
1L
1 : 10
length(1 : 10)
typeof(1 : 10)
integer(3)
1
as.integer(1)
typeof(as.integer(1))
floor(3.2)
floor(-3.2)
as.integer(3.2)
as.integer(-3.2)
round(0.5)
round(1.5)
round(2.5)
round(3.5)
1L
.Machine$integer.max
.Machine$integer.max + 1
typeof(.Machine$integer.max)
typeof(.Machine$integer.max + 1)
.Machine$integer.max + 1L
.Machine$integer.max + 1
.Machine$integer.max + 1L
1
1.
typeof(1.)
1.2
typeof(1.2)
-12.3
typeof(-12.3)
1e5
as.integer(1e5)
1.23e4
2e-1
2e-10
0.00000001
0.0001
0xffe4
1
typeof(1)
length(1)
c(1, 2e3, 4e-5)
double(5)
as.double(1L)
typeof(as.double(1L))
1
1 + 2^(-53)
(1 + 2^(-53)) == 1
s <- 2^(-53)
(1 + s + s) == 1
1 + (s + s) == 1
q()
