If we start up a vanilla session of R with no packages loaded and type the single line of code below as the first line entered then we get the output shown below. The NA in the output and the length of 7 indicate that as.ts dispatched as.ts.zoo since as.ts.default would have resulted in a length of 6 with no NA's. It should not have known about as.ts.zoo since we never explicitly loaded the zoo package using library or require. zoo:: was only used to refer to read.zoo. This seems to be a bug in the way R is currently working.
as.ts(zoo::read.zoo(BOD)) ## Time Series: ## Start = 1 ## End = 7 ## Frequency = 1 ## [1] 8.3 10.3 19.0 16.0 15.6 NA 19.8 R.version.string ## [1] "R version 4.1.0 RC (2021-05-16 r80303)" -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel