xy.grid: Creates a 2-d grid

Description Usage Arguments Value Examples

View source: R/xy.grid.R

Description

Creates a 2-d grid.

Usage

1
xy.grid(rangex, rangey, nx, ny = nx)

Arguments

rangex

A length 2 numeric vector: the range of the x-variable.

rangey

A length 2 numeric vector: the range of the y-variable.

nx

The number of points of the grid in the x-direction.

ny

The number of points of the grid in the y-direction.

Value

A grid of the coordinates of nx*ny points on the x-y plane, expanded in a matrix of nx*ny rows and 2 columns: a row gives the (x,y) coordinates of a point.

Examples

1
xy.grid(c(3,7),c(11,17),nx=5,ny=4)

Example output

Loading required package: mapdata
Loading required package: maps
Loading required package: rgl
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
   Var1 Var2
1     3   11
2     4   11
3     5   11
4     6   11
5     7   11
6     3   13
7     4   13
8     5   13
9     6   13
10    7   13
11    3   15
12    4   15
13    5   15
14    6   15
15    7   15
16    3   17
17    4   17
18    5   17
19    6   17
20    7   17

etasFLP documentation built on May 1, 2019, 6:48 p.m.