Currently sampleData takes the number of posterior samples reported by blavInspect(_, 'options') , but the actual number of available samples might be lower if the user also requested thinning via bcontrol.
For consistency, I took the approach that blavPredict uses to obtain the number of samples.
As an interesting fact, the reason this was not producing any errors is that this line, when given thin > nsamps, produces a vector with non-integer indices, which R just silently rounds down during subsetting.
Currently
sampleData
takes the number of posterior samples reported byblavInspect(_, 'options')
, but the actual number of available samples might be lower if the user also requested thinning viabcontrol
.For consistency, I took the approach that blavPredict uses to obtain the number of samples.
As an interesting fact, the reason this was not producing any errors is that this line, when given
thin
>nsamps
, produces a vector with non-integer indices, which R just silently rounds down during subsetting.