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

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -