ones | R Documentation |
Create a matrix consisting of all ones or zeros.
ones(...)
zeros(...)
... |
numeric dimensions for the result |
Returns matrix consisting only of ones (or zeros). Defaults to square if dimension argument resolves to a single value.
P. Roebuck proebuck1701@gmail.com
eye
ones(3)
ones(c(3, 3)) # same thing
ones(3, 3) # same thing
ones(size(matrix(NA, 3, 3))) # same thing
zeros(3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.