{formatR} is not working. I got it to work once using Yihui's first example from formatR but since then I am getting an error.
> library(formatR)
> tidy_source()
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : clipboard cannot be opened or contains no text
I have tried restarting R and RStudio I have no clue what that error message is trying to tell me. There is definitely something on the clipboard. Oh well, if nothing else I can clean up code in Quarto as the option
>| tidp: true
works there.
> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8
[4] LC_COLLATE=en_CA.UTF-8 LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8
[7] LC_PAPER=en_CA.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
time zone: America/New_York
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] formatR_1.14
loaded via a namespace (and not attached):
[1] compiler_4.3.2 pryr_0.1.6 magrittr_2.0.3 lobstr_1.1.2 cli_3.6.2
[6] tools_4.3.2 glue_1.6.2 rstudioapi_0.15.0 Rcpp_1.0.11 stringi_1.8.3
[11] codetools_0