GRID_MGSR: Subspatial Grid

Description Usage Arguments Details Value Author(s) Examples

Description

Function to build a suitable suitable subspatial grid.

Usage

1
GRID_MGSR(DAT, lag = 0.25, x1 = 0, x2 = 0, y1 = 0, y2 = 0)

Arguments

DAT

Dataframe containing the coordinates from factorial techniques.

lag

Distance between grid points.

x1

supplementary extension on the left.

x2

supplementary extension on the right.

y1

supplementary extension upwards.

y2

supplementary extension downwards.

Details

Extensions can be useful if one or several variables want to be evaluated outside the subspatial distribution generated by the factorial technique.

Value

Dataframe containing coordinate points of the generated grid.

Author(s)

Victor Vicente Palacios

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data("iris")
Versicolor <- iris[which(iris$Species=='versicolor'),-5]
##Data Standarization
means_vers <- apply(Versicolor,2,mean)
sd_vers <- apply(Versicolor,2,sd)
Versicolor_st <- Versicolor

for (i in 1:length(Versicolor[1,]))
{Versicolor_st[,i] <- (Versicolor[,i]-means_vers[i])/sd_vers[i]}

##PrComp
PC_train <- princomp(Versicolor_st)

#Grid
xygrid <- GRID_MGSR(as.data.frame(PC_train$scores[,1:2]),0.05)

victorvicpal/MGSR documentation built on May 3, 2019, 6:11 p.m.