inst/doc/Anx2.R

### R code from vignette source 'Anx2.Rnw'

###################################################
### code chunk number 1: Anx2.Rnw:140-144
###################################################
owidth <- getOption("width") # largeur des sorties
options(width=60, continue="+ ","warn"=-1 )
.PngNo <- 0
nom.fich = "./Figures/anx2-bitmap-"


###################################################
### code chunk number 2: bfig (eval = FALSE)
###################################################
## .PngNo <- .PngNo + 1; file = paste(nom.fich, .PngNo, sep="")
## pdf(file=paste(file,".pdf",sep=""), width = 7, height = 7, pointsize = 12, bg = "white")


###################################################
### code chunk number 3: bfigps (eval = FALSE)
###################################################
## postscript(file=paste(file,".ps",sep=""), width = 7, height = 7, pointsize = 12, bg = "white",horizontal= FALSE,paper="special")


###################################################
### code chunk number 4: bfig1 (eval = FALSE)
###################################################
## .PngNo <- .PngNo + 1; file = paste(nom.fich, .PngNo, sep="")
## pdf(file=paste(file,".pdf",sep=""), width = 5, height = 2, pointsize = 10, bg = "white")


###################################################
### code chunk number 5: bfigps1 (eval = FALSE)
###################################################
## postscript(file=paste(file,".ps",sep=""),  width = 5, height =2, pointsize = 10, bg = "white",horizontal= FALSE,paper="special")


###################################################
### code chunk number 6: bfig2 (eval = FALSE)
###################################################
## .PngNo <- .PngNo + 1; file = paste(nom.fich, .PngNo, sep="")
## pdf(file=paste(file,".pdf",sep=""), width = 3.9, height = 3.1, pointsize = 10, bg = "white")


###################################################
### code chunk number 7: bfigps2 (eval = FALSE)
###################################################
## postscript(file=paste(file,".ps",sep=""), width = 3.9, height = 3.1,   pointsize = 10, bg = "white",horizontal= FALSE,paper="special")


###################################################
### code chunk number 8: bfig3 (eval = FALSE)
###################################################
## .PngNo <- .PngNo + 1; file = paste(nom.fich, .PngNo, sep="")
## pdf(file=paste(file,".pdf",sep=""), width = 5.92, height = 6.74, pointsize = 10, bg = "white")


###################################################
### code chunk number 9: bfigps3 (eval = FALSE)
###################################################
## postscript(file=paste(file,".ps",sep=""), width = 5.92, height = 6.74, pointsize = 10, bg = "white",horizontal= FALSE,paper="special")


###################################################
### code chunk number 10: bfig4 (eval = FALSE)
###################################################
## .PngNo <- .PngNo + 1; file = paste(nom.fich, .PngNo, sep="")
## pdf(file=paste(file,".pdf",sep=""), width = 6, height = 6, pointsize = 10, bg = "white")


###################################################
### code chunk number 11: bfigps4 (eval = FALSE)
###################################################
## postscript(file=paste(file,".ps",sep=""), width = 6, height = 6, pointsize = 10, bg = "white",horizontal= FALSE,paper="special")


###################################################
### code chunk number 12: zfig2 (eval = FALSE)
###################################################
## dev.null <- dev.off()


###################################################
### code chunk number 13: zfiginclude (eval = FALSE)
###################################################
## cat("\\includegraphics[width=0.9\\textwidth]{", file, "}\n\n", sep="")


###################################################
### code chunk number 14: Anx2.Rnw:218-220 (eval = FALSE)
###################################################
## ?aggregate
## help(aggregate)


###################################################
### code chunk number 15: Anx2.Rnw:230-233 (eval = FALSE)
###################################################
## help.search("date")
## # ou
## ??date


###################################################
### code chunk number 16: Anx2.Rnw:244-245 (eval = FALSE)
###################################################
## RSiteSearch("gini")


###################################################
### code chunk number 17: Anx2.Rnw:309-312 (eval = FALSE)
###################################################
## x <- rnorm(10)
## xmat <- as.matrix(x, ncol = 1)
## y <- as.vector(xmat[, 1])


###################################################
### code chunk number 18: r_st.huron
###################################################
require("forecast")
temps <- time(LakeHuron)
mod.lac <- Arima(LakeHuron, order = c(1, 0, 0), 
                 xreg = temps, method = "ML")


###################################################
### code chunk number 19: r_st.huron.struc
###################################################
str(mod.lac, width = 60, strict.width = "cut")


###################################################
### code chunk number 20: r_st.huron.coef
###################################################
residus <- mod.lac$residuals
(coeftemps <- mod.lac$coef[names(mod.lac$coef) == "temps"])

Try the caschrono package in your browser

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

caschrono documentation built on Nov. 2, 2023, 5:16 p.m.