Description Usage Arguments Details Examples

View source: R/plot.princals.R

Various plotting options for objects of class `"princals"`

.

1 2 3 4 5 | ```
## S3 method for class 'princals'
plot(x, plot.type = "loadplot", plot.dim = c(1, 2), var.subset = "all",
col.scores = "black", col.loadings = "black", col.lines = "black", cex.scores = 0.8,
cex.loadings = 0.8, stepvec = NA, max.plot.array = c(2, 2), expand = 1,
asp = 1, main, xlab, ylab, xlim, ylim, ...)
``` |

`x` |
Object of class |

`plot.type` |
String indicating which type of plot to be produced: |

`plot.dim` |
Vector with dimensions to be plotted. |

`var.subset` |
Numeric vector for subsetting variables to be plotted. If missing, all variables are taken into account. Ignored for non separate variable plots. |

`col.scores` |
Color object scores. |

`col.loadings` |
Color loading vectors. |

`col.lines` |
Line colors for transformation and scree plot. |

`cex.scores` |
Size object scores. |

`cex.loadings` |
Size loading labels. |

`asp` |
Aspect ratio |

`stepvec` |
Vector whether step function should be plotted (see details). |

`max.plot.array` |
Number of panels in transformation plot. |

`expand` |
Expansion factor for loadings in biplot. |

`main` |
Plot title. |

`type` |
Type of points/lines to be plotted. |

`xlab` |
Label of x-axis. |

`ylab` |
Label of y-axis. |

`xlim` |
Limits for x-axis. |

`ylim` |
Limits for y-axis. |

`...` |
Further plot arguments passed: see |

Plot description:

- Biplot (`plot.type = "biplot"`

): Biplot with the object scores and the loadings. It uses `biplot.default`

from `stats`

internally (see corresponding help file for additional arguments)

- Transformation plot (`plot.type = "transplot"`

): Plots the original scale against the
transformed scale (first dimension) for each variable separately.

- Loadings plot (`plot.type = "loadplot"`

): Plots the loadings of the variables and connects them with the origin.

- Scree plot (`plot.type = "screeplot"`

): Produces a scree plot based on the eigenvalues.

For transformation plots only: If `stepvec = NA`

, the function tries to figure out which variable should be plotted as step function. Alternatively, a boolean vector (with length number of variables) can be specified (`TRUE`

step function, `FALSE`

smooth function).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
ABC6 <- ABC[,6:11]
fitord <- princals(ABC6, ndim = 3) ## 3D princals solution
## transformation plot
plot(fitord, plot.type = "transplot", var.subset = 1:4, lwd = 2, col.lines = "coral")
## loadings plot
plot(fitord, "loadplot", main = "Loadings Plot ABC Data")
## biplot
plot(fitord, "biplot", labels.scores = TRUE, main = "Biplot ABC Data", cex.scores = 0.5)
plot(fitord, "biplot", main = "Biplot ABC Data")
plot(fitord, "biplot", main = "Biplot ABC Data", plot.dim = c(2,3))
## scree plot
plot(fitord, "screeplot")
``` |

Gifi documentation built on May 31, 2017, 4:34 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.