LG_select_points: Select points for the local Gaussian inspections.

View source: R/LG_select_points.R

LG_select_pointsR Documentation

Select points for the local Gaussian inspections.

Description

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

Usage

LG_select_points(.P1, .P2, .shape)

Arguments

.P1

A bivariate vector, with values in the range (0,1), that gives the percentiles of 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 a point in the plane with the corresponding percentiles of the standard normal distribution.

.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 a point in the plane with the corresponding percentiles of the standard normal distribution. 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 region of points, with the points .P1 and .P2 as opposite corners. The result will be points on a line, with .P1 and .P2 as endpoints, if the second component is zero. 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 two positive integers is given to .shape, then shape will be adjusted to produce a line 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 attributes Shape, Horizontal and Vertical, of which 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 May 6, 2023, 4:31 a.m.