Do the following calculations
(5*4)**(4*5)-56
## [1] 1.048576e+26
23-1*(8-12)
## [1] 27
56/8*(3+4)
## [1] 49
45-5*8+(8+9)
## [1] 22
a<-c(2,5,6,7)
b<-c(1,0,9,8)
c<-c(6,5,8,3)
Now,rowbinding to form 3X4 matrix
matrix<-rbind(a,b,c)
matrix
## [,1] [,2] [,3] [,4]
## a 2 5 6 7
## b 1 0 9 8
## c 6 5 8 3
Change the column names to (Mon, Tue, Wed, Thu)
colnames(matrix)<-c("Mon","Tue","Wed","Thu")
matrix
## Mon Tue Wed Thu
## a 2 5 6 7
## b 1 0 9 8
## c 6 5 8 3
Change the row names to (Present, Absent, On leave)
rownames(matrix)<-c("Present","Absent","On leave")
matrix
## Mon Tue Wed Thu
## Present 2 5 6 7
## Absent 1 0 9 8
## On leave 6 5 8 3
Rowsums
row<-rowSums(matrix)
row
## Present Absent On leave
## 20 18 22
Columnsums
col<-colSums(matrix)
col
## Mon Tue Wed Thu
## 9 10 23 18
END