Hey there,
Thanks for your kind reply.
First, when you ran it, did you get the following error:
Error in rcpp_bcpM(as.matrix(y), as.integer(id), as.integer(return.mcmc), :
function 'Rcpp_precious_remove' not provided by package 'Rcpp'
What I tried to do to overcome this issue is opening 'Rcpp'
So it looks like:
> library(bcp)
Loading required package: grid
Warning message:
package ‘bcp’ was built under R version 4.0.5
> ##### univariate sequential data #####
> # an easy problem with 2 true change points
> set.seed(5)
> x <- c(rnorm(50), rnorm(50, 5, 1), rnorm(50))
> bcp.1a <- bcp(x)
Error in rcpp_bcpM(as.matrix(y), as.integer(id), as.integer(return.mcmc), :
function 'Rcpp_precious_remove' not provided by package 'Rcpp'
> plot(bcp.1a, main="Univariate Change Point Example")
Error in plot(bcp.1a, main = "Univariate Change Point Example") :
object 'bcp.1a' not found
> legacyplot(bcp.1a)
Error in legacyplot(bcp.1a) : object 'bcp.1a' not found
#HERE I AM IMPORTING 'Rccp'
> library(Rcpp)
Warning message:
package ‘Rcpp’ was built under R version 4.0.3
>
then i run this bit of code again:
set.seed(5)
x <- c(rnorm(50), rnorm(50, 5, 1), rnorm(50))
bcp.1a <- bcp(x)
plot(bcp.1a, main="Univariate Change Point Example")
legacyplot(bcp.1a)
and it freezes completely, I have to close it from the task manager as R doesn't respond:
Any ideas why that may be?