RStudio takes up 100% CPU even when it does nothing.

For a couple of weeks now I had this problem: I work in an R Markdown (Rmd) file within a project, with the APA template (papaja package). When I knit the file to pdf, everything is fine. When I run some chunks in the file, though, my laptop starts ventilating to the max, CPU goes up to 100% and stays there thereafter, even when RStudio does nothing. It doesn't freeze, but it slows down everything; the only way to stop it is to close the session. Today, however, I was able to track down this behavior to the kable_styling() function in the package kableExtra. My laptop now stays quiet as long as I avoid running that function, but still running the other chunks. Funny, though, I was not able to reproduce the same behavior in another project. I thought someone might have a similar problem.

R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

other attached packages:
[1] Rcpp_1.0.4.6 naniar_0.5.1 semTools_0.5-2
[4] lavaan_0.6-5 broom_0.5.6 FactoMineR_2.3
[7] rpart.plot_3.0.8 rattle_5.3.0 rpart_4.1-15
[10] factoextra_1.0.7 cluster_2.1.0 readr_1.3.1
[13] semPlot_1.1.2 ggplot2_3.3.0 kableExtra_1.1.0
[16] tidyr_1.0.2 MVN_5.8 dplyr_0.8.5
[19] VIM_5.1.1 data.table_1.12.8 colorspace_1.4-1
[22] pls_2.7-2 Rgraphviz_2.32.0 graph_1.66.0
[25] BiocGenerics_0.34.0

loaded via a namespace (and not attached):
[1] tidyselect_1.0.0 lme4_1.1-23 htmlwidgets_1.5.1
[4] ranger_0.12.1 munsell_0.5.0 papaja_0.1.0.9942
[7] statmod_1.4.34 Amelia_1.7.6 sROC_0.1-2
[10] withr_2.2.0 energy_1.7-7 highr_0.8
[13] OpenMx_2.17.3 knitr_1.28 rstudioapi_0.11
[16] leaps_3.1 stats4_4.0.0 robustbase_0.93-6
[19] ggsignif_0.6.0 vcd_1.4-7 huge_1.3.4.1
[22] labeling_0.3 mi_1.0 cvTools_0.3.2
[25] mnormt_1.5-7 farver_2.0.3 coda_0.19-3
[28] vctrs_0.2.4 generics_0.0.2 xfun_0.13
[31] diptest_0.75-7 R6_2.4.1 robCompositions_2.2.1
[34] arm_1.11-1 mvoutlier_2.0.9 flexmix_2.3-15
[37] reshape_0.8.8 assertthat_0.2.1 scales_1.1.0
[40] nnet_7.3-13 gtable_0.3.0 rlang_0.4.5
[43] scatterplot3d_0.3-41 splines_4.0.0 acepack_1.4.1
[46] checkmate_2.0.0 yaml_2.2.1 reshape2_1.4.4
[49] abind_1.4-5 d3Network_0.5.2.1 backports_1.1.6
[52] Hmisc_4.4-0 tools_4.0.0 psych_1.9.12.31
[55] zCompositions_1.3.4 ellipsis_0.3.0 RColorBrewer_1.1-2
[58] Rsolnp_1.16 plyr_1.8.6 base64enc_0.1-3
[61] purrr_0.3.4 rockchalk_1.8.144 ggpubr_0.2.5
[64] pbapply_1.4-2 zoo_1.8-8 qgraph_1.6.5
[67] haven_2.2.0 ggrepel_0.8.2 magrittr_1.5
[70] openxlsx_4.1.4 lmtest_0.9-37 truncnorm_1.0-8
[73] mvtnorm_1.1-0 matrixcalc_1.0-3 whisker_0.4
[76] hms_0.5.3 evaluate_0.14 xtable_1.8-4
[79] XML_3.99-0.3 rio_0.5.16 jpeg_0.1-8.1
[82] mclust_5.4.6 readxl_1.3.1 gridExtra_2.3
[85] compiler_4.0.0 tibble_3.0.1 crayon_1.3.4
[88] minqa_1.2.4 htmltools_0.4.0 corpcor_1.6.9
[91] pcaPP_1.9-73 Formula_1.2-3 visdat_0.5.3
[94] rrcov_1.5-2 kutils_1.70 MASS_7.3-51.5
[97] fpc_2.2-5 boot_1.3-25 Matrix_1.2-18
[100] car_3.0-7 cli_2.0.2 sgeostat_1.0-27
[103] igraph_1.2.5 BDgraph_2.62 forcats_0.5.0
[106] pkgconfig_2.0.3 sem_3.1-9 flashClust_1.01-2
[109] foreign_0.8-78 laeken_0.5.1 sp_1.4-1
[112] xml2_1.3.2 pbivnorm_0.6.0 webshot_0.5.2
[115] rvest_0.3.5 NADA_1.6-1.1 stringr_1.4.0
[118] digest_0.6.25 rmarkdown_2.1 cellranger_1.1.0
[121] htmlTable_1.13.3 nortest_1.0-4 lisrelToR_0.1.4
[124] curl_4.3 kernlab_0.9-29 gtools_3.8.2
[127] modeltools_0.2-23 rjson_0.2.20 nloptr_1.2.2.1
[130] lifecycle_0.2.0 nlme_3.1-147 glasso_1.11
[133] carData_3.0-3 viridisLite_0.3.0 fansi_0.4.1
[136] pillar_1.4.3 lattice_0.20-41 GGally_1.5.0
[139] httr_1.4.1 DEoptimR_1.0-8 survival_3.1-12
[142] glue_1.4.0 zip_2.0.4 fdrtool_1.2.15
[145] png_0.1-7 prabclus_2.3-2 class_7.3-16
[148] stringi_1.4.6 regsem_1.5.2 moments_0.14
[151] latticeExtra_0.6-29 e1071_1.7-3

Update: The problem disappeared after installing the RStudio Preview version 1.3.957 RStudio Preview - RStudio

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