LG_select_points: Select points for the local Gaussian inspections.

Description Usage Arguments Value

View source: R/LG_select_points.R

Description

The purpose of this function is to create the "points to inspect"-argument needed for the local Gaussian investigation.

Usage

1
LG_select_points(.P1, .P2, .shape)

Arguments

.P1

A bivariate vector, with values in the range (0,1), that gives the first endpoint. A single number will be accepted, in which case it will be registered as a diagonal point. The values will be converted by qnorm to get points in the plane.

.P2

A bivariate vector, with values in the range (0,1), that gives the second endpoint. A single number will be accepted, in which case it will be registered as a diagonal point. The values will be converted by qnorm to get points in the plane. Note that .P2 can coincide with .P1 in which case the values given to '.shape' will be ignored.

.shape

A bivariate vector of integers, that describes the shape of the resulting "grid". Note that it is required that the first component of .shape must be a positive integer and the second a non-negative integer. This argument will, when .P1 and .P2 are different, either specify a rectangular/quadratic with the points .P1 and .P2 as opposite corners, or it will specify points upon a line with .P1 and .P2 as endpoints if the second component is negative. A single positive integer will be accepted, and it will be interpreted as if the missing number should be zero. This argument will be ignored if .P1 and .P2 coincide completely. If .P1 and .P2 coincide at one of the components, and a bivariate vector with to positive integers is given to .shape, then shape will be adjusted to produce a line instead in order to avoid redundant computations. The values given in .P1 and .P2 must be contained in the grid, so the value 1 can only be used in .shape when .P1 and .P2 have a common component. If the components differ, the value will be corrected to 2, which is the smallest integer that gives a reasonable result.

Value

An array containing points computed according to the rules specified under the description of the shape-argument. The three arguments .P1, .P2 and .shape will be stored as attributes, together with three additional attrubes Shape, Horizontal and Vertical, of wich the last two will specify the points at the corner of the grid, whereas Shape will contain the value "point" if .P1 and .P2 are equal, the value "rectangle" if .shape contains two positive integers, or else it will contain the value "line.". The result will in addition have the class-attribute "LG_points"


LAJordanger/localgaussSpec documentation built on July 28, 2017, 12:15 a.m.