rotate270.matrix {Thermimage}R Documentation

Rotate a matrix by 270 degrees counterclockwise (or 90 degree clockwise). Used for adjusting image plotting in R.

Description

Rotate a matrix by 270 degrees counterclockwise (or 90 degree clockwise). Used for adjusting image plotting in R.

Usage

rotate270.matrix(x)

Arguments

x

A matrix corresponding to raster or image data.

Value

Returns a matrix

Author(s)

Glenn J Tattersall

References

1. http://www.inside-r.org/packages/cran/RSEIS/docs/mirror.matrix

2. Based on similar code in package <RSEIS>

See Also

flip.matrix mirror.matrix rotate90.matrix rotate180.matrix

Examples


## The function is currently defined as
function (x) 
{
    mirror.matrix(t(x))
  }
  
  

 set.seed(5)
 par(mfrow=c(1,2),mar=c(1,1,1,1))
 r<-c(1:100,rnorm(1:100)*10,1:100)
 m<-matrix(r,50)
 image(m, axes=FALSE)
 box()
 text(.5,.5,"Matrix",col="white")
 mf<-rotate270.matrix(m)
 image(mf,axes=FALSE)
 box()
 text(.5,.5,"Rotate270",col="white")
  

[Package Thermimage version 4.1.3 Index]