29399/simple-matrix-logic-in-r

A program that asks the user for the 8 values of a 2, 2x2 mathematical matrix. Another words, there are 4 values in one 2x2 matrix and another 4 values for the second matrix. And It should prompt a message to the user asking what operation they want to do with it like addition, subtraction, division, multiplication etc.

In R, if you have a matrix:

m1 <- matrix(c(2,2,2,2), ncol = 2) m2 <- matrix(c(4,4,4,4), ncol = 2)

and you want to add/subtract/divide/multiple the two you simply:

m1 + m2 [,1] [,2] [1,] 6 6 [2,] 6 6

If you store the inputted values in a list, you can refer to it inside the matrix function as above:

matrix(user_input, ncol = 2) #or matrix(c(ui1, ui2, ui3, ui4), ncol = 2)

A confusion matrix can be used to ...READ MORE

This caused non-logical data or missing values passed ...READ MORE

This is caused by trying to access ...READ MORE

On a given matrix, a, the first way ...READ MORE

Basically here we are making an equation ...READ MORE

By assuming that all the values are ...READ MORE

For avoiding rowwise(), I prefer to use ...READ MORE

Basically all we have to do is ...READ MORE

R Programming gives a broad variety of ...READ MORE

Hey @Ali, as.factor is a wrapper for ...READ MORE

OR

At least 1 upper-case and 1 lower-case letter

Minimum 8 characters and Maximum 50 characters

Already have an account? Sign in.