In the R Programming course Module 7 (Matrices and Data Frames), 44% of the way through the module, I'm asked to make a 4 x 5 matrix filled with 1:20 by passing three arguments to matrix(). However, my answer was only accepted when I submitted my_matrix2 <- matrix(1:20, nrow = 4) and not when I submitted my_matrix2 <- matrix(1:20, nrow = 4, ncol = 5) even though those are identical matrices. I had submitted an incorrect answer before this.
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
In the R Programming course Module 7 (Matrices and Data Frames), 44% of the way through the module, I'm asked to make a 4 x 5 matrix filled with 1:20 by passing three arguments to matrix(). However, my answer was only accepted when I submitted my_matrix2 <- matrix(1:20, nrow = 4) and not when I submitted my_matrix2 <- matrix(1:20, nrow = 4, ncol = 5) even though those are identical matrices. I had submitted an incorrect answer before this.
Matrix products: default
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] swirl_2.4.5
loaded via a namespace (and not attached): [1] httr_1.4.2 compiler_4.1.1 magrittr_2.0.1 R6_2.5.1 cli_3.1.0
[6] tools_4.1.1 rstudioapi_0.13 RCurl_1.98-1.5 curl_4.3.2 yaml_2.2.1
[11] stringi_1.7.5 stringr_1.4.0 digest_0.6.28 testthat_3.1.0 rlang_0.4.12
[16] bitops_1.0-7