How to create diagonal and unequal matrix in R? -


i need create diagonal (6,6) matrix in r using valuse 1.2, 12.1, 6.5, 9.4, 4.9, 2.4. how should r code?

use diag:

diag(c(1.2, 12.1, 6.5, 9.4, 4.9, 2.4)) 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

c# - How do I debug "System.DllNotFoundException: The specified procedure could not be found"? -

python - How to read gradle build progress from it's output? -