Learn R Programming

SpatialFloor (version 1.1.0)

diagonal_check_by_density: Generate a spatial layout of checks by diagonal design

Description

This funciton generates a layout grid with checks on diagonal

Usage

diagonal_check_by_density(n.row, n.col, by.density, spread.scale = 50 *
  max(n.row, n.col))

Arguments

n.row

The row of the retangular grid

n.col

The column of the retangular grid

by.density

The density of the check

spread.scale

The spreading of the check across diagonal, related to the scale parameter in Cauchy distribution, default=50*max(n.row, n.col)

Examples

Run this code
# NOT RUN {
#Creat a 30 by 30 layout with 0.2 density
tmp = diagonal_check_by_density(30, 30, 0.2)
fields::quilt.plot(tmp, nx=30, ny=30)
# }

Run the code above in your browser using DataLab