= R
{disambiguate=programming language}
{c}
{wiki}
<R (programming language)> is a <programming language> and environment for <statistics>, data analysis and graphics. For <matrix> algorithms, `drop = FALSE` preserves dimensions when extracting submatrices. To choose an element uniformly from a possibly singleton numeric vector `indices`, use `indices[sample.int(length(indices), 1L)]`: `sample(indices, 1L)` has a special interpretation when its first argument is a single positive number. Official documentation: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Extract.html[Extraction and the drop argument] and https://stat.ethz.ch/R-manual/R-devel/library/base/html/sample.html[Sampling, including the singleton numeric argument rule].
Back to article page