EX: Want to create a 2x2 table with the following data: Column A value (336 and 955) and Column B value (355 and 947)
Note from R-tutorial: "When we construct a matrix directly with data elements, the matrix content is filled along the column orientation by default"
Code:
> B = matrix (c(336, 955, 355, 947), nrow=2, ncol=2)
Check:
> B
Should see output:
[,1] [,2]
[1,] 336 355
[2,] 955 947
No comments:
Post a Comment