Description Usage Arguments Details Value Examples
Creates an uninitialized numeric vector (that is, assigns values according to what was allocated in the memory)
1 | emptyNumeric(n)
|
n |
Number of elements |
The calculation time is O(1) + time(memory allocation), which is handled internally by R.
For small values of n, numeric
is faster, but for large values of n, emptyNumeric
is much faster.
A numeric vector of length n
1 | vals <- numeric(1e7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.