33 lines
568 B
R
Executable File
33 lines
568 B
R
Executable File
# Gerar gráfico
|
|
|
|
args <- commandArgs(TRUE)
|
|
diretorio=args[1]
|
|
titulo=args[2]
|
|
|
|
|
|
endereco=paste("arquivospredicao/", diretorio,"/notasreaispreditas.csv",sep="");
|
|
matriz <- read.table(endereco, header=T, sep=";")
|
|
|
|
grafico = paste("arquivospredicao/", diretorio,"/graficoresiduos.jpg",sep="")
|
|
jpeg(grafico)
|
|
y=matriz[,4]
|
|
x=matriz[,3]
|
|
|
|
erro= y-x
|
|
|
|
yzero=y - y
|
|
|
|
plot(erro~y, pch=20, xlab="Ŷ", ylab="Resíduo", main=titulo)
|
|
abline(lm(yzero~y))
|
|
|
|
#abline(lm(erro~y),col=2)
|
|
|
|
dev.off()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|