1

当我尝试使用gganimate包中的示例如下(复制自help("transition_manual"))</p>

anim <- ggplot(mtcars, aes(factor(gear), mpg)) +geom_boxplot() +transition_manual(gear)

我收到以下错误:

magick::image_animate(anim, fps, loop = if (loop) 0 else 1) 中的错误:参数 'fps' 必须是 100 的因子

我的包是通过以下方式安装的: install.packages("gganimate"); 然后我从 github 下载:https://github.com/thomasp85/gganimate 并重复,但它仍然存在。

版本magick

sessionInfo("magick")
#
#R version 3.6.1 (2019-07-05)
#Platform: x86_64-w64-mingw32/x64 (64-bit)
#Running under: Windows 10 x64 (build 16299)
#
#Matrix products: default
#
#locale:
#[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936    LC_MONETARY=Chinese (Simplified)_China.936
#[4] LC_NUMERIC=C                               LC_TIME=Chinese (Simplified)_China.936    
#
#attached base packages:
#character(0)
#
#other attached packages:
#[1] magick_2.2
#
#loaded via a namespace (and not attached):
# [1] Rcpp_1.0.3        plyr_1.8.5        pillar_1.4.3      compiler_3.6.1    progress_1.2.2    prettyunits_1.1.0 methods_3.6.1    
# [8] remotes_2.1.0     utils_3.6.1       tools_3.6.1       grDevices_3.6.1   testthat_2.3.1    digest_0.6.23     pkgbuild_1.0.6   
#[15] pkgload_1.0.2     gganimate_1.0.4   memoise_1.1.0     lifecycle_0.1.0   tibble_2.1.3      gtable_0.3.0      pkgconfig_2.0.3  
#[22] rlang_0.4.3       cli_2.0.1         rstudioapi_0.10   curl_4.3          dplyr_0.8.3       withr_2.1.2       vctrs_0.2.2      
#[29] hms_0.5.3         desc_1.2.0        fs_1.3.1          graphics_3.6.1    datasets_3.6.1    stats_3.6.1       devtools_2.2.1   
#[36] tidyselect_0.2.5  rprojroot_1.3-2   grid_3.6.1        glue_1.3.1        base_3.6.1        R6_2.4.1          processx_3.4.1   
#[43] fansi_0.4.1       sessioninfo_1.1.1 farver_2.0.3      tweenr_1.0.1      purrr_0.3.3       callr_3.4.0       ggplot2_3.2.1    
#[50] magrittr_1.5      backports_1.1.5   scales_1.1.0      ps_1.3.0          ellipsis_0.3.0    usethis_1.5.1     assertthat_0.2.1 
#[57] colorspace_1.4-1  labeling_0.3      stringi_1.4.4     lazyeval_0.2.2    munsell_0.5.0     crayon_1.3.4 

版本gganimate

sessionInfo("gganimate")
#
#R version 3.6.1 (2019-07-05)
#Platform: x86_64-w64-mingw32/x64 (64-bit)
#Running under: Windows 10 x64 (build 16299)
#
#Matrix products: default
#
#locale:
#[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936    LC_MONETARY=Chinese (Simplified)_China.936
#[4] LC_NUMERIC=C                               LC_TIME=Chinese (Simplified)_China.936    
#
#attached base packages:
#character(0)
#
#other attached packages:
#[1] gganimate_1.0.4
#
#loaded via a namespace (and not attached):
# [1] Rcpp_1.0.3        plyr_1.8.5        pillar_1.4.3      compiler_3.6.1    progress_1.2.2    prettyunits_1.1.0 methods_3.6.1    
# [8] remotes_2.1.0     utils_3.6.1       tools_3.6.1       grDevices_3.6.1   testthat_2.3.1    digest_0.6.23     pkgbuild_1.0.6   
#[15] pkgload_1.0.2     memoise_1.1.0     lifecycle_0.1.0   tibble_2.1.3      gtable_0.3.0      pkgconfig_2.0.3   rlang_0.4.3      
#[22] cli_2.0.1         rstudioapi_0.10   magick_2.2        curl_4.3          dplyr_0.8.3       withr_2.1.2       vctrs_0.2.2      
#[29] hms_0.5.3         desc_1.2.0        fs_1.3.1          graphics_3.6.1    datasets_3.6.1    stats_3.6.1       devtools_2.2.1   
#[36] tidyselect_0.2.5  rprojroot_1.3-2   grid_3.6.1        glue_1.3.1        base_3.6.1        R6_2.4.1          processx_3.4.1   
#[43] fansi_0.4.1       sessioninfo_1.1.1 farver_2.0.3      tweenr_1.0.1      purrr_0.3.3       callr_3.4.0       ggplot2_3.2.1    
#[50] magrittr_1.5      backports_1.1.5   scales_1.1.0      ps_1.3.0          ellipsis_0.3.0    usethis_1.5.1     assertthat_0.2.1 
#[57] colorspace_1.4-1  labeling_0.3      stringi_1.4.4     lazyeval_0.2.2    munsell_0.5.0     crayon_1.3.4     

感谢帮助。

4

0 回答 0