Write a R program to create an array with three columns, three rows, and two "tables", taking two vectors as input to the array. Print the array
- برمجة R
- 2021-09-04
- adonis77j
الأجوبة
v1 = c(1, 3, 5, 7)
v2 = c(2, 4, 6, 8, 10)
arra1 = array(c(v1, v2),dim = c(3,3,2))
print(arra1)
Sample Output:
, , 1
[,1] [,2] [,3]
[1,] 1 7 6
[2,] 3 2 8
[3,] 5 4 10
, , 2
[,1] [,2] [,3]
[1,] 1 7 6
[2,] 3 2 8
[3,] 5 4 10أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
معلومات ذات صلة