下面哪两个是等价的( )。
A: matrix(c(2, 4, 6, 8, 10, 12), nrow = 1, ncol = 6)
B: matrix(c(2, 4, 6, 8, 10, 12), nrow = 6, ncol = 1)
C: rep(2:12, times = 1)
D: seq(2, 16, by = 2)
A: matrix(c(2, 4, 6, 8, 10, 12), nrow = 1, ncol = 6)
B: matrix(c(2, 4, 6, 8, 10, 12), nrow = 6, ncol = 1)
C: rep(2:12, times = 1)
D: seq(2, 16, by = 2)
举一反三
- 【多选题】执行下列哪些选项中的语句后能得到如下矩阵? 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 A. > matrix(c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4), nrow=4, ncol=5) B. > matrix(rep(1:4, 5), nrow=4) C. > matrix(rep(1:4, each=5), nrow=4, byrow=TRUE) D. > matrix(1:4, nrow=4, ncol=5)
- 用R语言创建一个两行三列,1到6共6个数值的矩阵,正确的代码为( ) A: matrix(1:6,<br/>ncol=3, nrow=2) B: matrix(2,<br/>3,1:6 ) C: matrix(1:6,<br/>col=3, row=2) D: matrix(1:6,<br/>3:2)
- 如下代码的运行结果为:( ) A: array([[-10, -8, -6, -4, -2],[ 0, 2, 4, 6, 8]]) B: array([[ 1, 2, 3, 4, 5],[ 6, 7, 8, 9, 10]]) C: array([[-11, -10, -9, -8, -7],[ -6, -5, -4, -3, -2]]) D: array([[12, 12, 12, 12, 12],[12, 12, 12, 12, 12]])
- 下面是图的拓扑排序的是? (多选)[img=388x253]17de9252a2ceeb2.jpg[/img] A: 12 13 1 4 2 3 9 10 5 8 6 7 11 B: 1 12 4 13 2 3 9 10 11 7 6 8 5 C: 12 1 4 13 2 3 5 6 8 9 10 11 7 D: 1 12 4 2 13 3 9 5 8 6 7 10 11
- 下面是图的拓扑排序的是?(多选)[img=340x240]1802faef6ebcc2a.png[/img] A: 2 8 0 7 1 3 5 6 4 9 10 11 12 B: 2 8 7 0 6 9 11 12 10 1 3 5 4 C: 8 2 7 3 0 6 1 5 4 9 10 11 12 D: 8 2 7 0 6 9 10 11 12 1 3 5 4