R/plot.scair.R

Defines functions plot.scair

Documented in plot.scair

plot.scair <- function(x, whichplot = 1:m, addp = TRUE, ...){
	n=nrow(x$x)
	m=length(x$shape)
	par(ask=TRUE)
	for(j in whichplot){
		xy=matrix(c((x$x %*% x$index)[,j],(x$componentfit)[,j]),nrow=n, ncol=2)
		sortxy=xy[order(xy[,1]),]
		plot(sortxy[,1],sortxy[,2],type="l",xlab=paste("A^T x",j, sep = ""), ylab="y", main=paste("Index ",j), ...)
		if (addp==TRUE) points(sortxy[,1],sortxy[,2])
	}
	par(ask=FALSE)
}

Try the scar package in your browser

Any scripts or data that you put into this service are public.

scar documentation built on May 28, 2022, 1:22 a.m.