How to declare a vector of zeros in R
You have several options
integer(3)
numeric(3)
rep(0, 3)
rep(0L, 3)
You can also use the matrix
command, to create a matrix with n lines and m columns, filled with zeros.
matrix(0, n, m)
You have several options
integer(3)
numeric(3)
rep(0, 3)
rep(0L, 3)
You can also use the matrix
command, to create a matrix with n lines and m columns, filled with zeros.
matrix(0, n, m)