Learn R Programming

tofsims (version 1.0.2)

subset: Generic method for subset

Description

Generic method for subset

Subset method for objects of class MassImage

Usage

subset(x, ...)

## S3 method for class 'MassImage': subset(x, ..., xyUpperLeft = NULL, xyLowerRight = NULL)

Arguments

x
object of class MassImage
...
additional args
xyUpperLeft
vector of length two with x and y for the upper left subset corner
xyLowerRight
vector of length two with x and y for the lower right subset corner

Value

  • object of class MassImage a subest of the in-object

    object of class MassImage

Examples

Run this code
library(tofsimsData)
data(tofsimsData)
subsetTestImage<-subset(testImage, xyUpperLeft = c(1,1), xyLowerRight = c(50,50))
image(subsetTestImage)

Run the code above in your browser using DataLab