绘制马尔可夫收敛图时出错

问题描述

在我自己的数据集上遵循CARBayes vignette并应用S.CARleroux模型。按照本教程进行操作,但是当我尝试绘制Markov收敛图时(从第22页的图3)从笔记本电脑切换到台式机时,我收到一条奇怪的错误消息:

plot(beta.samples[,2:4])

Error in xy.coords(x,y,xlabel,ylabel,log) : 
  'x' is a list,but does not have components 'x' and 'y'

我敢肯定有一个简单的解决方案,但是我绝对很沮丧。有什么想法吗?

R信息:

R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] CARBayes_5.2     coda_0.19-3      CARBayesdata_2.1 CARBayesST_3.1   Rcpp_1.0.5       MASS_7.3-51.6    forcats_0.5.0    stringr_1.4.0    dplyr_1.0.1     
[10] purrr_0.3.4      readr_1.3.1      tidyr_1.1.1      tibble_3.0.3     ggplot2_3.3.2    tidyverse_1.3.0  tmap_3.1         spdep_1.1-5      sf_0.9-5        
[19] spData_0.3.8     sp_1.4-2        

loaded via a namespace (and not attached):
  [1] readxl_1.3.1       uuid_0.1-4         backports_1.1.8    spam_2.5-1         lwgeom_0.2-5       plyr_1.8.6         splines_3.6.0      crosstalk_1.1.0.1 
  [9] leaflet_2.0.3      digest_0.6.25      htmltools_0.5.0    matrixcalc_1.0-3   gdata_2.18.0       fansi_0.4.1        magrittr_1.5       truncdist_1.0-2   
 [17] openxlsx_4.1.5     modelr_0.1.8       matrixStats_0.56.0 gmodels_2.18.1     MCMCpack_1.4-9     colorspace_1.4-1   blob_1.2.1         rvest_0.3.6       
 [25] rappdirs_0.3.1     haven_2.3.1        rgdal_1.5-12       leafem_0.1.3       crayon_1.3.4       jsonlite_1.7.0     tigris_1.0         ape_5.4           
 [33] glue_1.4.1         stars_0.4-3        gtable_0.3.0       MatrixModels_0.4-1 car_3.0-8          evd_2.3-3          SparseM_1.78       abind_1.4-5       
 [41] scales_1.1.1       GGally_2.0.0       DBI_1.1.0          shapefiles_0.7     viridisLite_0.3.0  tmvnsim_1.0-2      units_0.6-7        foreign_0.8-71    
 [49] dotCall64_1.0-0    stats4_3.6.0       truncnorm_1.0-8    htmlwidgets_1.5.1  httr_1.4.2         gplots_3.0.4       RColorBrewer_1.1-2 ellipsis_0.3.1    
 [57] reshape_0.8.8      pkgconfig_2.0.3    XML_3.99-0.5       dbplyr_1.4.4       deldir_0.1-28      tidyselect_1.1.0   rlang_0.4.7        tmaptools_3.1     
 [65] munsell_0.5.0      cellranger_1.1.0   tools_3.6.0        cli_2.0.2          generics_0.0.2     broom_0.7.0        mcmc_0.9-7         leafsync_0.1.0    
 [73] fs_1.5.0           zip_2.0.4          caTools_1.18.0     nlme_3.1-139       quantreg_5.61      xml2_1.3.2         tidycensus_0.9.9.5 compiler_3.6.0    
 [81] rstudioapi_0.11    curl_4.3           png_0.1-7          e1071_1.7-3        testthat_2.3.2     reprex_0.3.0       stringi_1.4.6      rgeos_0.5-3       
 [89] lattice_0.20-41    Matrix_1.2-17      classInt_0.4-3     psych_2.0.7        vctrs_0.3.2        pillar_1.4.6       LearnBayes_2.15.1  lifecycle_0.2.0   
 [97] conquer_1.0.1      data.table_1.13.0  bitops_1.0-6       maptools_1.0-1     raster_3.3-13      R6_2.4.1           gridExtra_2.3      BAMMtools_2.1.7   
[105] KernSmooth_2.23-15 rio_0.5.16         spDataLarge_0.3.1  codetools_0.2-16   dichromat_2.0-0    boot_1.3-22        gtools_3.8.2       assertthat_0.2.1  
[113] withr_2.2.0        mnormt_2.0.1       expm_0.999-5       parallel_3.6.0     hms_0.5.3          grid_3.6.0         class_7.3-15       carData_3.0-4     
[121] lubridate_1.7.9    base64enc_0.1-3  

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...