Quarto error with r code chunk

Hello

I got an error with r code chunk in quarto.

just

```{r}

```

makes error below.

Error in source(file.path(res_dir, "hooks.R"), local = TRUE) :
C:\Users\cmc\AppData\Local\Programs\Quarto\share/rmd/hooks.R:787:3: unexpected symbol
786: comment_chars <- knitr_engine_comment_chars[[engine]] %||% "#"
787: comment_start
^
Calls: .main -> source
Execution halted

Many thanks.

SessionInfo
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=Korean_Korea.949 LC_CTYPE=Korean_Korea.949 LC_MONETARY=Korean_Korea.949
[4] LC_NUMERIC=C LC_TIME=Korean_Korea.949

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

loaded via a namespace (and not attached):
[1] nlme_3.1-159 matrixStats_0.62.0 lubridate_1.8.0 webshot_0.5.4
[5] httr_1.4.4 doParallel_1.0.17 RColorBrewer_1.1-3 rprojroot_2.0.3
[9] tools_4.2.0 utf8_1.2.2 R6_2.5.1 rpart_4.1.16
[13] DBI_1.1.3 BiocGenerics_0.42.0 colorspace_2.0-3 nnet_7.3-17
[17] GetoptLong_1.0.5 withr_2.5.0 tidyselect_1.1.2 gridExtra_2.3
[21] compiler_4.2.0 tidyHeatmap_1.8.1 rvest_1.0.3 cli_3.4.1
[25] gt_0.7.0 xml2_1.3.3 scales_1.2.1 systemfonts_1.0.4
[29] stringr_1.4.1 digest_0.6.29 svglite_2.1.0 rmarkdown_2.16
[33] pkgconfig_2.0.3 htmltools_0.5.3 parallelly_1.32.1 fastmap_1.1.0
[37] rlang_1.0.6 GlobalOptions_0.1.2 readxl_1.4.1 rstudioapi_0.14
[41] shape_1.4.6 generics_0.1.3 ModelMetrics_1.2.2.2 dendextend_1.16.0
[45] dplyr_1.0.10 magrittr_2.0.3 kableExtra_1.3.4 patchwork_1.1.2
[49] Matrix_1.5-1 Rcpp_1.0.9 munsell_0.5.0 S4Vectors_0.34.0
[53] fansi_1.0.3 viridis_0.6.2 lifecycle_1.0.2 pROC_1.18.0
[57] stringi_1.7.8 snakecase_0.11.0 gtsummary_1.6.1 MASS_7.3-58.1
[61] plyr_1.8.7 recipes_1.0.1 grid_4.2.0 parallel_4.2.0
[65] listenv_0.8.0 crayon_1.5.1 lattice_0.20-45 splines_4.2.0
[69] circlize_0.4.15 knitr_1.40 ComplexHeatmap_2.12.1 pillar_1.8.1
[73] rjson_0.2.21 reshape2_1.4.4 future.apply_1.9.1 codetools_0.2-18
[77] stats4_4.2.0 glue_1.6.2 evaluate_0.16 data.table_1.14.2
[81] broom.helpers_1.9.0 png_0.1-7 vctrs_0.4.1 foreach_1.5.2
[85] cellranger_1.1.0 gtable_0.3.1 purrr_0.3.4 tidyr_1.2.1
[89] clue_0.3-61 future_1.28.0 assertthat_0.2.1 ggplot2_3.3.6
[93] xfun_0.33 gower_1.0.0 janitor_2.1.0 prodlim_2019.11.13
[97] class_7.3-20 survival_3.4-0 viridisLite_0.4.1 timeDate_4021.104
[101] tibble_3.1.8 iterators_1.0.14 IRanges_2.30.1 hardhat_1.2.0
[105] cluster_2.1.4 lava_1.6.10 globals_0.16.1 caret_6.0-93
[109] ipred_0.9-13 here_1.0.1

You have mixed slashes in this sentence. Therefore I wonder if your quarto installation is correct.
Do you get any errors when enter the following statement in the terminal panel:

$ quarto.cmd check

?

Did you have any luck with other quarto files or is it just an empty r chunk that fails?

1 Like

Dear Han

Thank you for your reply.

The problem has been solved by quarto version 1.2 https://quarto.org/docs/download/prerelease.html\

quarto.cmd check

results in everything "OK".

But quarto 1.2 works now for me.

Many Thanks.

This topic was automatically closed 7 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.