data(ts1,ts2,ts3,ts4,ts5)
input.path <- paste(file.path(tempdir()),"/input",sep="")
dir.create(input.path)
output.path <- paste(file.path(tempdir()),"/output",sep="")
dir.create(output.path)
write.table(ts1,paste(input.path,"/ts1.txt",sep=""),col.names=FALSE,row.names=FALSE)
write.table(ts2,paste(input.path,"/ts2.txt",sep=""),col.names=FALSE,row.names=FALSE)
write.table(ts3,paste(input.path,"/ts3.txt",sep=""),col.names=FALSE,row.names=FALSE)
write.table(ts4,paste(input.path,"/ts4.txt",sep=""),col.names=FALSE,row.names=FALSE)
write.table(ts5,paste(input.path,"/ts5.txt",sep=""),col.names=FALSE,row.names=FALSE)
aggregate.out <- aggregate(data = input.path,
sep = "",
header = FALSE,
out = output.path,
ar = TRUE,
plot = TRUE)
Run the code above in your browser using DataLab