Helpfulbox Now Offers Free POS Software for restaurants, kiosk, and any other retails business completely free used windows cashier system or as full blown POS. You will able to print to kitchen, display orders on the kitchen screen, manage inventory, employee, report, customer loyalty offers, employee management, delivery address track and much more, al for free.

How to find row standard deviation and column standard deviation for a given matrix in R?

Date: Fri-Jun-17-2016-
Response
0

If A and B are the two matrices

(A+B) >>Addition of A and B matrices.

(A-B)>>Subtraction of A and  B matrices.

(A*B)>> Element by element product of A and B

matrices.

(A%*%B)>> Product of A and B matrices

t(A)>> Transpose of matrix A.

solve(A)>> Inverse of matrix A.

 

Examples:

> x<-c(1,2,3,4,5,6,7,8,8)

> A<-matrix(x,nrow=3)

> A

     [,1] [,2]

[,3]

[1,]    1    4   

7

[2,]    2    5   

8

[3,]    3    6   

8

> B<-matrix(10:18,nrow=3)

> B

     [,1] [,2]

[,3]

[1,]   10   13  

16

[2,]   11   14  

17

[3,]   12   15  

18

> A+B                     # addition of A and B

matrices

     [,1] [,2]

[,3]

[1,]   11   17  

23

[2,]   13   19  

25

[3,]   15   21  

26

> A-B                    # subtraction of A and B

matrices

     [,1] [,2]

[,3]

[1,]   -9   -9  

-9

[2,]   -9   -9  

-9

[3,]   -9   -9 

-10

> A*B                    # element by element

product of A and B matrices

     [,1] [,2]

[,3]

[1,]   10   52 

112

[2,]   22   70 

136

[3,]   36   90 

144

 

> A%*%B              # Product of A and B matrices

     [,1] [,2]

[,3]

[1,]  138  174 

210

[2,]  171  216 

261

[3,]  192  243 

294

> t(A)                     # transpose of a matrix A

     [,1] [,2]

[,3]

[1,]    1    2   

3

[2,]    4    5   

6

[3,]    7    8   

8

> solve(A)              # Inverse of a matrix A

         

[,1]      [,2] [,3]

[1,] -2.666667 

3.333333   -1

[2,]  2.666667

-4.333333    2

[3,] -1.000000 

2.000000   -1

 

> cor(A)

         

[,1]      [,2]      [,3]

[1,] 1.0000000 1.0000000 0.8660254

[2,] 1.0000000 1.0000000 0.8660254

[3,] 0.8660254 0.8660254 1.0000000

> cov(A)

     [,1]

[,2]      [,3]

[1,]  1.0  1.0 0.5000000

[2,]  1.0  1.0 0.5000000

[3,]  0.5  0.5 0.3333333

> apply(A,1,sum)                 # Row sum

[1] 12 15 17

> apply(A,2,sum)                 # column sum

[1]  6 15 23

> apply(A,1,sd)                    # row standard deviation

[1] 3.000000 3.000000 2.516611

> apply(A,2,sd)                    #column standard deviation

[1] 1.0000000 1.0000000 0.5773503.

Date: Sat-Jun-18-2016
Response
What is 1 + 100



Helpfulbox Now Offers Free POS Software

for restaurants, kiosk, and any other retails business completely free. It can be used as windows cashier system or as full blown POS. You will able to print to kitchen, display orders on the kitchen screen, manage inventory, employee, report, customer loyalty offers, employee management, delivery address track and much more, all for free.

Just Updated::