right
control which side of the interval is closed;
cut(x$s2, breaks = c(0, 1, 5, 10, 20, Inf), right = F)
dput(x1)
structure(c(1.88888888888889, 1.3425, 0.859756097560976, 0.596026490066225
), class = "table", .Dim = 4L, .Dimnames = structure(list(c("1",
"2", "3", "4")), .Names = ""))
as cbind and rbind can take multiple arguments, using do.call
would be more efficients;
length(ll)
f <- function(x, y, z)
# 3
do.call(f, ll) == f(ll[[1]], [[2]], [[3]])
library(BiocInstaller)
chooseCRANmirror()
for (obj in ls()) { message(obj); print(object.size(get(obj)), units='auto') }
export R_LIBS="/home/your_username/R_libs"
R CMD INSTALL -l /home/your_username/R_libs pkg_version.tar.gz
> NA > 0.5 & F
[1] FALSE
> NA > 0.5 & T
[1] NA
plot(0)
for(i in 1:4)
text(1, 0.2*i, bquote( x[.(i)] == .(pnorm(i)) %*% 10^2 ))
for a list of plotmatch syntax: https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/plotmath.html
# view all attributes of a data.frame:
names(attributes(x))
# keep only first 3 attributes (first 3 are usually name, row.names, class)
attributes(x) <- attributes(x)[1:3]
niceprint <- function(x) cat(paste0('# ', capture.output(x)), sep = '\n')