merge (all=T) error

I have two installations of RStudio with each different updates of the packages. On the recent packages I get two errors that I don't have with the previous packages. Can someone tell me what the problem is?

Error 1:

df_lofreq_3_DEL <- merge(df_lofreq_3_DEL, deletions_VAR_df_sub_freq, by.x="VAR_MUT", by.y="lofreq_del", all=T)

Error in if (all.x) all.x <- (nxx <- length(m$x.alone)) > 0L :  the condition has length > 1

Error 2

write.xlsx(T_dfCOVID_3, paste0(path,"/Results/Tables/",date,"Numbering_WW_fasta.xlsx"), rowNames=T)

Error: rowNames must be a logical vector with NAs

I don't understand what is wrong especially because with the older packages it still works...

UPDATED PACKAGES INSTALLATION:

> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_Belgium.utf8  LC_CTYPE=English_Belgium.utf8    LC_MONETARY=English_Belgium.utf8
[4] LC_NUMERIC=C                     LC_TIME=English_Belgium.utf8    

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

other attached packages:
 [1] sqldf_0.4-11            RSQLite_2.3.0           gsubfn_0.7              proto_1.0.0            
 [5] purrr_1.0.1             rlist_0.4.6.2           ape_5.7-1               gdata_2.18.0.1         
 [9] openxlsx_4.2.5          Biostrings_2.64.1       GenomeInfoDb_1.32.4     XVector_0.36.0         
[13] IRanges_2.30.1          S4Vectors_0.34.0        BiocGenerics_0.42.0     viridis_0.6.2          
[17] viridisLite_0.4.1       cowplot_1.1.1           ggsankey_0.0.99999      RColorBrewer_1.1-3     
[21] rjson_0.2.21            lubridate_1.9.2         stringr_1.5.0           optparse_1.7.3         
[25] rnaturalearthdata_0.1.0 rnaturalearth_0.3.2     sf_1.0-10               ggspatial_1.1.7        
[29] betareg_3.1-4           scales_1.2.1            ggrepel_0.9.3           tmaptools_3.1-1        
[33] ggmap_3.0.2             gamlss_5.4-12           nlme_3.1-162            gamlss.dist_6.0-5      
[37] MASS_7.3-58.3           gamlss.data_6.0-2       data.table_1.14.2       dplyr_1.1.0            
[41] reshape2_1.4.4          ggplot2_3.4.1           tidyr_1.3.0            

loaded via a namespace (and not attached):
 [1] colorspace_2.1-0       class_7.3-21           modeltools_0.2-23      dichromat_2.0-0.1      rstudioapi_0.14       
 [6] proxy_0.4-27           farver_2.1.1           bit64_4.0.5            getopt_1.20.3          flexmix_2.3-18        
[11] fansi_1.0.4            R.methodsS3_1.8.2      cachem_1.0.7           knitr_1.42             Formula_1.2-5         
[16] jsonlite_1.8.4         png_0.1-8              R.oo_1.25.0            compiler_4.2.1         httr_1.4.5            
[21] Matrix_1.5-3           fastmap_1.1.1          cli_3.6.0              htmltools_0.5.4        tools_4.2.1           
[26] gtable_0.3.1           glue_1.6.2             GenomeInfoDbData_1.2.8 Rcpp_1.0.9             cellranger_1.1.0      
[31] vctrs_0.5.2            lmtest_0.9-40          lwgeom_0.2-11          xfun_0.37              timechange_0.2.0      
[36] lifecycle_1.0.3        gtools_3.9.4           XML_3.99-0.13          zlibbioc_1.42.0        zoo_1.8-10            
[41] ragg_1.2.5             sandwich_3.0-2         yaml_2.3.7             memoise_2.0.1          gridExtra_2.3         
[46] stringi_1.7.8          e1071_1.7-13           zip_2.2.1              chron_2.3-60           RgoogleMaps_1.4.5.3   
[51] rlang_1.1.0            pkgconfig_2.0.3        systemfonts_1.0.4      bitops_1.0-7           evaluate_0.20         
[56] lattice_0.20-45        labeling_0.4.2         bit_4.0.5              tidyselect_1.2.0       plyr_1.8.7            
[61] magrittr_2.0.3         R6_2.5.1               generics_0.1.3         DBI_1.1.3              pillar_1.8.1          
[66] withr_2.5.0            units_0.8-1            stars_0.6-0            survival_3.5-5         abind_1.4-5           
[71] RCurl_1.98-1.10        sp_1.6-0               nnet_7.3-18            tibble_3.2.0           crayon_1.5.2          
[76] KernSmooth_2.23-20     utf8_1.2.3             rmarkdown_2.20         jpeg_0.1-10            grid_4.2.1            
[81] readxl_1.4.1           blob_1.2.3             digest_0.6.29          classInt_0.4-9         R.utils_2.12.2        
[86] textshaping_0.3.6      munsell_0.5.0          tcltk_4.2.1       

OLD PACKAGES INSTALLATION:

R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.utf8 
[2] LC_CTYPE=English_United Kingdom.utf8   
[3] LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.utf8    

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

other attached packages:
 [1] reshape2_1.4.4      sqldf_0.4-11       
 [3] RSQLite_2.2.18      gsubfn_0.7         
 [5] proto_1.0.0         purrr_0.3.4        
 [7] rlist_0.4.6.2       ape_5.6-2          
 [9] gdata_2.18.0.1      stringr_1.4.0      
[11] openxlsx_4.2.5      RColorBrewer_1.1-3 
[13] tidyr_1.2.0         dplyr_1.0.9        
[15] ggplot2_3.3.6       Biostrings_2.62.0  
[17] GenomeInfoDb_1.30.1 XVector_0.34.0     
[19] IRanges_2.28.0      S4Vectors_0.32.4   
[21] BiocGenerics_0.40.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9             lattice_0.20-45       
 [3] gtools_3.9.3           assertthat_0.2.1      
 [5] digest_0.6.29          utf8_1.2.2            
 [7] chron_2.3-58           R6_2.5.1              
 [9] plyr_1.8.7             evaluate_0.15         
[11] pillar_1.8.0           zlibbioc_1.40.0       
[13] rlang_1.0.4            rstudioapi_0.13       
[15] data.table_1.14.2      blob_1.2.3            
[17] rmarkdown_2.14         RCurl_1.98-1.7        
[19] bit_4.0.4              munsell_0.5.0         
[21] compiler_4.2.1         xfun_0.31             
[23] pkgconfig_2.0.3        htmltools_0.5.3       
[25] tcltk_4.2.1            tidyselect_1.1.2      
[27] tibble_3.1.8           GenomeInfoDbData_1.2.7
[29] fansi_1.0.3            crayon_1.5.1          
[31] withr_2.5.0            bitops_1.0-7          
[33] grid_4.2.1             nlme_3.1-158          
[35] gtable_0.3.0           lifecycle_1.0.1       
[37] DBI_1.1.3              magrittr_2.0.3        
[39] scales_1.2.0           zip_2.2.0             
[41] cachem_1.0.6           cli_3.3.0             
[43] stringi_1.7.8          generics_0.1.3        
[45] vctrs_0.4.1            tools_4.2.1           
[47] bit64_4.0.5            glue_1.6.2            
[49] parallel_4.2.1         fastmap_1.1.0         
[51] yaml_2.3.5             colorspace_2.0-3      
[53] memoise_2.0.1          knitr_1.39    

The errors are consistent with T no longer having the value TRUE but it being a vector with two or more elements. Try substituting TRUE where you have T.

Thank you! That seems to be doing the trick!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.