Dear Client,
I am Berk, currently employed in one of the top consultancy firms KPMG. In my team, our work is to create, fix and review R packages and produce solutions for our clients in the banking sector. I use R language and R studio extensively on a daily basis, so I would be more than happy to adress all of your questions and complete your tasks in detail. For a reference, I provide the solution for the a) and b) of the Task 2:
a)
obj <- list(
O = matrix(1:9, nrow = 3, ncol = 3, byrow = TRUE, dimnames = list(c("a", "b", "c"), c("C", "D", "E"))),
P = list(TUD = c("T", "U", "D"), Jahr = 2023),
Q = c(TRUE, FALSE, FALSE, TRUE, TRUE, TRUE),
M = c(Jan = 1, Feb = 2, Mar = 3, Apr = 4, May = 5, Jun = 6)
)
b) This object cannot be an array because it has mixed types of data. It has integers in a matrix in its O component, a list in P, boolean variables in and an integer vector in M. The second reason is that in an array, all dimensions must have the same length, however in our object, every dimension has different lengths. In the O component, we have a 3x3 matrix but in P component, we have a list with 1x3 dimension. In a standard array, every component must have the same dimension
If you would like to receive the solutions in full detail along with the solutions of other problems, feel free to contact me.
Sincerely,
Berk Tezcan