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.

Newlines when sending code to Radian

See original GitHub issue

See https://github.com/randy3k/radian/issues/102

When using Radian with vscode-R, R: Run Selection/Line results in whitespace-only lines before the block of code sent being sent as well. I think this is probably due to vscode-R rather than Radian, although it is interesting that it doesn’t happen with the normal R console.

Currently, comment lines are filtered out before being sent to the console; it should be straightforward to filter out whitespace-only lines too.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andycraigcommented, Sep 12, 2019

Reopening as the issue is fixed on Linux but not on Windows.

Changing line endings from ‘CRLF’ to ‘LF’ (bottom right of the VSCode window) results in the newlines being filtered out as desired, so it looks like the problem is that the ‘\r’ in the ‘\r\n’ Windows line ending is being incorrectly counted as non-whitespace.

I should be able to fix this next week.

1reaction
nlneas1commented, Sep 11, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Newlines when sending code to Radian · Issue #114
When using Radian with vscode-R, R: Run Selection/Line results in whitespace-only lines before the block of code sent being sent as well.
Read more >
R - do I need to add explicit new line character with print()?
The nature of R means that you're never going to have a newline in a character vector when you simply print it out....
Read more >
radian: a modern console for R
Written by Randy Lai, radian is a cross-platform console for R that provides code completion, syntax highlighting, etc in a neat little ...
Read more >
Why won't \n give me a new line? - MATLAB Answers
You will need \r\n for producing a carriage return and a new line. This is a well documented issue between UNIX-based and Windows...
Read more >
Using R in VS Code
With R opened in this way, you can send code to it from a VS Code editor, ... Many folks who use VS...
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