swihart / repeated

Non-normal repeated measurements models
GNU General Public License v2.0
0 stars 0 forks source link

hidden.f and hidden examples on Winbuilder #8

Closed swihart closed 7 years ago

swihart commented 7 years ago

Be sure to look at this in concert with chidden(.f)

Removing dontrun in hidden examples was fine on local-mac and Travis. It bombed on Winbuilder:

** running examples for arch 'i386' ... ERROR
Running examples in 'repeated-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hidden
> ### Title: Discrete-time Hidden Markov Chain Models
> ### Aliases: hidden plot.hidden
> ### Keywords: models
> 
> ### ** Examples
> 
> 
> # generate two random Poisson sequences with change-points
> y <- rbind(c(rpois(5,1), rpois(15,5)), c(rpois(15,1), rpois(5,5)))
> print(z <- hidden(y,dist="Poisson", cmu=~1, pcmu=c(1,5),
+   pgamma=matrix(c(0.9,0.2,0.1,0.8),ncol=2)))
At line 344 of file hidden.f
Fortran runtime error: Index '2' of dimension 1 of array 'x' above upper bound of 1
** running examples for arch 'x64' ... ERROR
Running examples in 'repeated-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hidden
> ### Title: Discrete-time Hidden Markov Chain Models
> ### Aliases: hidden plot.hidden
> ### Keywords: models
> 
> ### ** Examples
> 
> 
> # generate two random Poisson sequences with change-points
> y <- rbind(c(rpois(5,1), rpois(15,5)), c(rpois(15,1), rpois(5,5)))
> print(z <- hidden(y,dist="Poisson", cmu=~1, pcmu=c(1,5),
+   pgamma=matrix(c(0.9,0.2,0.1,0.8),ncol=2)))
At line 344 of file hidden.f
Fortran runtime error: Index '2' of dimension 1 of array 'x' above upper bound of 1
* checking PDF version of manual ... OK
* DONE
Status: 2 ERRORs, 1 NOTE
swihart commented 7 years ago

Okay, so we marched on and fixed up some S3 / namespace / dontrun examples of other function and are now cycling back to patch up the hidden.f.

Line 344 has x in it, it is initialized on line 332 as x(1). Can we just put in x(*) and see if it works?

result: a new winbuilder error:

> # generate two random Poisson sequences with change-points
> y <- rbind(c(rpois(5,1), rpois(15,5)), c(rpois(15,1), rpois(5,5)))
> print(z <- hidden(y,dist="Poisson", cmu=~1, pcmu=c(1,5),
+   pgamma=matrix(c(0.9,0.2,0.1,0.8),ncol=2)))
At line 370 of file hidden.f
Fortran runtime error: Index '2' of dimension 1 of array 'rhs' above upper bound of 1
** running examples for arch 'x64' ... ERROR
Running examples in 'repeated-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hidden
> ### Title: Discrete-time Hidden Markov Chain Models
> ### Aliases: hidden plot.hidden
> ### Keywords: models
> 
> ### ** Examples
> 
> 
> # generate two random Poisson sequences with change-points
> y <- rbind(c(rpois(5,1), rpois(15,5)), c(rpois(15,1), rpois(5,5)))
> print(z <- hidden(y,dist="Poisson", cmu=~1, pcmu=c(1,5),
+   pgamma=matrix(c(0.9,0.2,0.1,0.8),ncol=2)))
At line 370 of file hidden.f
Fortran runtime error: Index '2' of dimension 1 of array 'rhs' above upper bound of 1
* checking PDF version of manual ... OK
* DONE
Status: 2 ERRORs, 1 NOTE

rhs in hidden.f is also declared with rhs(1) on line 363. Let's replace all the (1) with (*) and resubmit to winbuilder.

Result: Success! Now go do teh same to chidden.f