question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

execute multiline selection in active [radian] terminal fails in vscode

See original GitHub issue

environment:

R 4.1.1 (linux) vscode 1.62.1 vscode settings:

// Use active terminal for all commands, rather than creating a new R terminal.
"r.alwaysUseActiveTerminal": false,

not working:

Selecting the following and hitting <ctrl+enter> tries to execute but fails with error:

library("pasilla")
pasCts <- system.file("extdata",
                      "pasilla_gene_counts.tsv",
                      package="pasilla", mustWork=TRUE)

output:

r$> dds <- DESeqDataSetFromMatrix(countData = cts,)
Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'x' in selecting a method for function 'nrow': argument "colData" is missing, with no default

r$>                               colData = coldata,
Error: unexpected ',' in "                              colData = coldata,"

r$>                               design = ~ condition)
Error: unexpected ')' in "                              design = ~ condition)"

working:

after reformatting the statement as a single line, it succeeds (using same keystrokes as above):

pasCts <- system.file("extdata","pasilla_gene_counts.tsv",package="pasilla", mustWork=TRUE)
file.exists(pasCts)

output:

r$> file.exists(pasCts)                                                                                                                                                                                                                                                                                         
[1] TRUE

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
mkhqcommented, May 12, 2022

@yanhao-wang Try to enable “R: Bracketed Paste”-mode in settings.

1reaction
randy3kcommented, Oct 26, 2022

Long story short, it is not due to the newline char. It is due to the fact that Microsoft terminal didn’t support bracketed paste mode. PS: Not sure the current status.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Terminal launch failures - Visual Studio Code
If your terminal is set to run as administrator only, and you are not launching VS Code as administrator, the terminal will not...
Read more >
Multiline editing in Visual Studio Code - Stack Overflow
I wanted to select multiple lines and hit "something" to have a cursor for each select lines (similar to ...
Read more >
How to integrate Python and R in Visual Studio Code
To do so, press Ctrl + Shift + P to open the command line and type “Python: Select interpreter”. VSCode will show you...
Read more >
Writing R in VSCode: Interacting with an R session - Kun Ren
Looks like you did't enable r.sessionWatcher. You should set "r.sessionWatcher": true in vscode settings and reload vscode, then run command R: ...
Read more >
R and radian on macOS and VSCode - L.
If you want to try out the R extension for VSCode on macOS, ... you try to run radian on your console, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found