Running examples in ‘bayesdfa-Ex.R’ failed
The error most likely occurred in:

> ### Name: find_inverted_chains
> ### Title: Find which chains to invert
> ### Aliases: find_inverted_chains
> 
> ### ** Examples
> 
> set.seed(2)
> s <- sim_dfa(num_trends = 2)
> set.seed(1)
> m <- fit_dfa(y = s$y_sim, num_trends = 1, iter = 500, chains = 2)
trying deprecated constructor; please alert package maintainer

SAMPLING FOR MODEL 'dfa' NOW (CHAIN 1).
Chain 1: 
Chain 1: Gradient evaluation took 0.000141 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 1.41 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1: 
Chain 1: 
Chain 1: Iteration:   1 / 500 [  0%]  (Warmup)
Chain 1: Iteration:  50 / 500 [ 10%]  (Warmup)
Chain 1: Iteration: 100 / 500 [ 20%]  (Warmup)
Chain 1: Iteration: 150 / 500 [ 30%]  (Warmup)
Chain 1: Iteration: 200 / 500 [ 40%]  (Warmup)
Chain 1: Iteration: 250 / 500 [ 50%]  (Warmup)
Chain 1: Iteration: 251 / 500 [ 50%]  (Sampling)
Chain 1: Iteration: 300 / 500 [ 60%]  (Sampling)
Chain 1: Iteration: 350 / 500 [ 70%]  (Sampling)
Chain 1: Iteration: 400 / 500 [ 80%]  (Sampling)
Chain 1: Iteration: 450 / 500 [ 90%]  (Sampling)
Chain 1: Iteration: 500 / 500 [100%]  (Sampling)
Chain 1: 
Chain 1:  Elapsed Time: 1.38371 seconds (Warm-up)
Chain 1:                1.00462 seconds (Sampling)
Chain 1:                2.38833 seconds (Total)
Chain 1: 

SAMPLING FOR MODEL 'dfa' NOW (CHAIN 2).
Chain 2: 
Chain 2: Gradient evaluation took 3.7e-05 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.37 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2: 
Chain 2: 
Chain 2: Iteration:   1 / 500 [  0%]  (Warmup)
[1] "Error in sampler$call_sampler(args_list[[i]]) : "
[2] "  c++ exception (unknown reason)"                
error occurred during calling the sampler; sampling not done
Stan model 'dfa' does not contain samples.
Stan model 'dfa' does not contain samples.
Stan model 'dfa' does not contain samples.
Error in names(object) <- nm : 
  'names' attribute [1] must be the same length as the vector [0]
Calls: fit_dfa ... find_inverted_chains -> <Anonymous> -> melt.default -> setNames
Execution halted