Learn R Programming

SpatialFloor (version 1.1.0)

p_rep_check_by_density: Generate a spatial layout of checks by density: p rep design with checks

Description

This function generate a check layout in a retangular grid. the check and partial replicated entries are spread by blocksdesign library

Usage

p_rep_check_by_density(n.row, n.col, check.density = 0.05, by.density)

Arguments

n.row

The row of a retangular grid

n.col

The column of a retangular grid

check.density

The density of the check

by.density

The total density of check and p_rep, MUST be a even decimal number after substract the check.density

Value

A dataframe will return: row.var=row, col.var=col, check=0, single rep; 1, check; else, partial replicated entries

Examples

Run this code
# NOT RUN {
# To produce a 20 by 20 field with check distributed by density=0.35
nr = 20; nc = 20
example.tmp = p_rep_check_by_density(nr, nc, by.density=.35)
fields::quilt.plot(example.tmp, nx=nr, ny=nc)
# }

Run the code above in your browser using DataLab