# Get cell number from row, column or XY

### Description

Get cell number(s) of a Raster*TS object from row and column numbers or X and Y coordinates.

### Usage

1 2 | ```
cellFromRowCol(object, rownr, colnr)
cellFromXY(object, xy)
``` |

### Arguments

`object` |
a raster time series ( |

`colnr` |
column number; or vector of column numbers |

`rownr` |
row number; or vector of row numbers |

`xy` |
matrix of x and y coordinates, or a SpatialPoints or SpatialPointsDataFrame object |

### Details

These functions are essentially a wrapper to `cellFromRowCol`

and `cellFromXY`

in raster package, work with `Raster*TS`

objects.

### Value

row, column or cell number(s). cellFromLine and cellFromPolygon return a list.

### Author(s)

Babak Naimi naimi.b@gmail.com http://r-gis.net

### Examples

1 2 3 4 5 6 7 8 |