Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 204742

Why rstudioapi::insertText don't write the text to the addressed place

$
0
0

I wanted to display characters on the r-console of rstudio at a certain point. However, the text is always output in the following empty line and not where it was addressed. When the output is repeated, the text is appended to the already issued characters. I want to know how to place the text exactly.

cat("\014")
   (context <-   rstudioapi :: getConsoleEditorContext ())

    (id <-   context $ id ) # send some R code to the console
    (ranges <-  rstudioapi::document_range(c(9,20),c(19, 20)))
    rstudioapi :: insertText (ranges, text = ">*<" , id = id) 

Viewing all articles
Browse latest Browse all 204742

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>