R: Miscellaneous Operators

Miscellaneous Operator is used for a specific purpose and not for any general mathematical or logical computation. These perform the printing of sequence and assignment of vectors. 

1. %in% Operator

It is used to return True if an element belongs to that particular list else False.

2. Colon Operator (:)

It is used to print the list of elements present between the element given before the colon and after a colon.

3. %*% Operator

It is used to return the matrix which is the product of transpose and matrix itself.

Examples:

> val<-4
> print(val %in% list_1)
> print(2:4)
> a= matrix(c(1,2,3,4),nrow=2,ncol=2)
> print (a)
> print( t(a))
> b = a %*% t(a)
> print(b)

Output:

[1] FALSE

 [1] 2 3 4

     [,1] [,2]

[1,]    1    3

[2,]    2    4

     [,1] [,2]

[1,]    1    2

[2,]    3    4

     [,1] [,2]

[1,]   10   14

[2,]   14   20