SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to initialize a vector with numeric values other than zero, use rep
rep
n <- 10 v <- rep(0.05, n) v
which will give you:
[1] 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05