Last data update: 2014.03.03

R: Plot Autocorrelation Bars From a Data Frame, Matrix, or...
plotACFR Documentation

Plot Autocorrelation Bars From a Data Frame, Matrix, or Vector

Description

Plot autocorrelation bars (ACF) from a data frame, matrix, or vector.

Usage

plotACF(file, lags=20, 
    clrs=c("blue","red","green","magenta","navy"), ...)

Arguments

file

data frame, matrix, or vector of numeric values.

lags

maximum number of lags to use in the ACF calculation.

clrs

vector of colours. Patterns are repeated if the number of fields exceed the length of clrs.

...

additional arguments for plot or lines.

Details

This function is designed primarily to give greater flexibility when viewing results from the R-package BRugs. Use plotACF in conjunction with samplesHistory("*",beg=0,plot=FALSE) rather than samplesAutoC which calls plotAutoC.

Author(s)

Rowan Haigh, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC

Examples

local(envir=.PBSmodEnv,expr={
  oldpar = par(no.readonly=TRUE)
  resetGraph(); plotACF(trees,lwd=2,lags=30)
  par(oldpar)
})

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PBSmodelling)
Error in library(PBSmodelling) : 
  there is no package called 'PBSmodelling'
Execution halted