Skip to content

Commit

Permalink
Day_1_R_exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
sruthi162114001 committed Feb 10, 2024
1 parent 8dc477a commit db36b57
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
File renamed without changes.
48 changes: 48 additions & 0 deletions Day_1_Installation/day1.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#Defining a variable
a=5
b=8

#Arithematical Operations
a+b
a-b
a*b
a/b
a^b

#Triginometric Operations
d=cos(pi)
e=cos(2*pi)

#Displaying results
d
e
print(d)
print(e)
cat("the value of d is", d ,"\n")

#Vector
Name=c("Ram","Raja","Raji")
std=c(7,6,7)
class(Name)
class(std)
std


#Matrix
A=matrix(c(1,5,3,4,2,9,-2,0,4),nrow=3,ncol=3)
A
C=matrix(c(1,5,3,4,2,9,-2,0,4),nrow=3,ncol=3,byrow=T)
C
B=matrix(c(-1,2,1,3,1,9,4,0,1),nrow=3,ncol=3,byrow=T)
B


A+B
B+C

B*C


B%*%C
dim(A)
t(A)

0 comments on commit db36b57

Please sign in to comment.