<br><font size=2 face="sans-serif">Dear r-help list:</font>
<br>
<br><font size=2 face="sans-serif">In the following R session, I seem to be somehow breaking the spectrum() function, but I'm not sure how. Could somebody please point out my mistake? My apologies if it's something that should be obvious.</font>
<br>
<br><font size=2 face="sans-serif">The mysterious bit is how spectrum(my.ts) at first works, but then later fails with an error message that I find difficult to interpret.</font>
<br>
<br><font size=2 face="sans-serif">I'm running R 1.3.0 that I compiled myself on what was once Caldera Linux (2.2.14), but I dare say I've deviated somewhat from the original Caldera distribution (added GNOME and generally updated software).</font>
<br>
<br><font size=2 face="sans-serif">Thanks in advance.</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br>
<br><font size=2 face="sans-serif">Mike</font>
<br>
<br><font size=2 face="sans-serif">---- session transcript follows ----</font>
<br>
<br><font size=2 face="sans-serif">R : Copyright 2001, The R Development Core Team<br>
Version 1.3.0 (2001-06-22)</font>
<br>
<br><font size=2 face="sans-serif">R is free software and comes with ABSOLUTELY NO WARRANTY.<br>
You are welcome to redistribute it under certain conditions.<br>
Type `license()' or `licence()' for distribution details.</font>
<br>
<br><font size=2 face="sans-serif">R is a collaborative project with many contributors.<br>
Type `contributors()' for more information.</font>
<br>
<br><font size=2 face="sans-serif">Type `demo()' for some demos, `help()' for on-line help, or<br>
`help.start()' for a HTML browser interface to help.<br>
Type `q()' to quit R.</font>
<br>
<br><font size=2 face="sans-serif">> ls()<br>
character(0)<br>
> library(tseries)</font>
<br>
<br><font size=2 face="sans-serif"> `tseries' version: 0.7-4 <br>
<br>
`tseries' is a package for time series analysis with emphasis<br>
on non-linear modelling.<br>
See `library (help=tseries)' for details.</font>
<br>
<br><font size=2 face="sans-serif">> my.ts<-ts(rnorm(200))<br>
> spectrum(my.ts) # nice graphic display appears<br>
> plot(my.ts) # another nice graphic display appears<br>
> spectrum(my.ts) # As expected, yet another nice graphic display appears<br>
> perf<-read.delim('vmout3.txt')<br>
> attach(perf)<br>
> ls(perf)<br>
[1] "X" "avm" "b" "cs" "cy" "fr" "fre" "idl" "in" "pi" "po" "r" <br>
[13] "re" "sr" "sy" "sys" "t" "usr" "wai"<br>
> idl.ts<-ts(idl)</font>
<br>
<br><font size=2 face="sans-serif">> spectrum(idl.ts) # No graphic appears<br>
Error in "[<-"(*tmp*, , i, value = c(w, rep(1, nr - 2 * m), rev(w)) * : <br>
number of items to replace is not a multiple of replacement length<br>
In addition: Warning messages: <br>
1: longer object length<br>
is not a multiple of shorter object length in: pi * seq(1, 2 * m - 1, by = 2) <br>
2: longer object length<br>
is not a multiple of shorter object length in: c(w, rep(1, nr - 2 * m), rev(w)) * x[, i] </font>
<br>
<br>
<br><font size=2 face="sans-serif">> spectrum(my.ts) # I would have thought this would have worked<br>
Error in "[<-"(*tmp*, , i, value = c(w, rep(1, nr - 2 * m), rev(w)) * : <br>
number of items to replace is not a multiple of replacement length<br>
In addition: Warning messages: <br>
1: longer object length<br>
is not a multiple of shorter object length in: pi * seq(1, 2 * m - 1, by = 2) <br>
2: longer object length<br>
is not a multiple of shorter object length in: c(w, rep(1, nr - 2 * m), rev(w)) * x[, i] <br>
> </font>