- 1

Help me pls : R

I was stuck in this code Coach for days/months please help me My code : data <- c(1, 2, 3, 4, 5, 6, 7, 8, 9,10) A <- matrix(data, nrow = 3, ncol = 4) A_T <- t(A) print("transpose of A") print(A_T) Question: matrix operations are often used in data manipulation and processing. to solve this task, you need to define a matrix with the given number of rows and fill it with the numbers 1 to 10. after that, output the transpose of the resulting matrix. sample input 3 sample output [,1] [,2] [,3] [1,] 1 2 3 [2,] 4 5 6 [3,] 7 8 9 [4,] 10 1 2

27th Jun 2022, 11:47 AM
Hrithika Reddy
Hrithika Reddy - avatar
6 Answers
+ 2
READ the task description carefully: * Only output the result, not "transpose of A" * Only specify the number of rows using the ā­ā­ā­inputā­ā­ā­, do not hard-code nrow and do not specify ncol
27th Jun 2022, 12:24 PM
Lisa
Lisa - avatar
+ 1
You asked for help. I helped you by hinting at the issues. Please read my reply carefully and try to implement it in your code. Then show us your new code.
27th Jun 2022, 2:33 PM
Lisa
Lisa - avatar
+ 1
Hrithika Reddy So redo the lesson. You should get able to correct code. Try. Then tell us where you got stuck. This teaches you a lot more than asking others to solve it for you.
27th Jun 2022, 5:28 PM
Emerson Prado
Emerson Prado - avatar
- 1
I'm not able to correct them , don't misunderstand me, if u give me the code I can understand my mistakes .
27th Jun 2022, 2:44 PM
Hrithika Reddy
Hrithika Reddy - avatar
- 2
Can u please send me the correct code
27th Jun 2022, 2:24 PM
Hrithika Reddy
Hrithika Reddy - avatar
- 2
Sure . But it doesn't matter how I redo I can't figure out the mistake. I know the concept if u can do it , I will check my mistakes and give it a try . please don't comment in my question if u have no answer and don't waste my time don't take it personally
28th Jun 2022, 12:51 PM
Hrithika Reddy
Hrithika Reddy - avatar