This is because only 60 frames are generated with this guided tour configeration while 70 frames are asked to be rendered. This can be validated by usingtourr::render():
library(tourr)
set.seed(123)
png_files <- file.path(tempdir(), "test-%03d.png")
tourr::render(
data = flea[,1:6],
tour_path = guided_tour(holes()),
display = display_xy(),
frames = 100, "png",
png_files)
#> Converting input data to the required matrix format.
#> Value 0.538 43.4 % better - NEW BASIS
#> Using half_range 0.98
#> Value 0.730 35.6 % better - NEW BASIS
#> Value 0.780 6.8 % better - NEW BASIS
#> Value 0.846 8.5 % better - NEW BASIS
#> Value 0.872 3.2 % better - NEW BASIS
#> Value 0.883 1.3 % better - NEW BASIS
#> Value 0.887 0.4 % better - NEW BASIS
#> Value 0.891 0.5 % better - NEW BASIS
#> Value 0.897 0.7 % better - NEW BASIS
#> Value 0.903 0.7 % better - NEW BASIS
#> Value 0.906 0.3 % better - NEW BASIS
#> Value 0.906 0.0 % better
#> Value 0.910 0.5 % better - NEW BASIS
#> Value 0.910 0.0 % better
#> Value 0.912 0.3 % better - NEW BASIS
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.1 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.1 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.1 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.1 % better
#> Value 0.913 0.0 % better
#> Value 0.913 0.0 % better
#> No better bases found after 25 tries. Giving up.
#> Final projection:
#> 0.333 0.486
#> 0.338 -0.344
#> 0.412 -0.189
#> 0.381 -0.337
#> 0.467 0.644
#> 0.492 -0.285
length(list.files(tempdir()))
#> [1] 60
An error with render_gif():
Created on 2022-10-06 by the reprex package (v2.0.1)
This is because only 60 frames are generated with this guided tour configeration while 70 frames are asked to be rendered. This can be validated by using
tourr::render()
:Created on 2022-10-06 by the reprex package (v2.0.1)