Learn R Programming

IceCast (version 2.1.0)

get_ind: Find indices in matrix

Description

Function to find to which matrix indices coordinates correspond (on a 304 x 448 grid)

Usage

get_ind(coords, xmn = -3850, ymn = -5350)

Arguments

coords

coordinates of interest

xmn

min x (defaults to value for Northern Polar stereographic grid: -3850)

ymn

min y (defaults to value for Northern Polar stereographic grid: -5350)

Value

n x 2 matrix of coordinates on a 304 x 448 grid

Examples

Run this code
# NOT RUN {
dat <- matrix(nrow = 2, ncol = 2, data = c(-2000, 0, 300, 1000))
get_ind(dat)
# }

Run the code above in your browser using DataLab