I have Hygdrogen installed for my Atom editor. It was working fine till yesterday.
When I run using shift+enter, the output window displays the result as per normal:
However, when I close the output window, the window closes, leaving behind a huge space between code line 1 & code line 2:
After that, all my coding lines are disrupted. Any help is highly appreciated.
This behavior is due to a bug in Atom 1.19.6 and 1.20.0-beta6.
Upgrading to Atom 1.19.7 or 1.20.0 will fix your issue.
Related
I have just switched from windows 7 to windows 10 on my pc.
When I was still using windows 7, using the combination CTRL+R or CTRL+ENTER would run the line of code that I was in. Moreover, if the code continued on one or more lines below or started above my current line, it would run the entire section without me having to select it.
After switching to windows 10, the same combinations will only run the line of code that I am currently in, or the piece of code that is selected by me. To give an example:
#Tryout
for(i in 1:3){
print(i)
}
This code would normally run at once without having to select it, even when I would start in the first line (#Tryout). Now, if I don't select, I will need to use CTRL+R or CTRL+ENTER three times to go through this code and I have to start in the correct line. Starting in the line #Tryout will not run any part of the code but will only result in the line #Tryout being shown in the console.
I'm not good with computers (in your answers please pretend to be adressing a five-year-old) so I had one of my colleagues look at it who's our expert on R. Here are the findings:
The problem occurs in both RStudio as the standalone version of R.
I'm using R version 3.3.2, the same as before the windows update. Switching to version 3.5 didn't solve the problem.
I have other colleagues also using R 3.3 in combination with windows 10 for whom this problem does not occur.
Going to Tools-Global Options-Code and checking the box of 'Focus console after executing from source' doesn't help
When we went to 'Modify Keyboard Shortcuts', the name attached to the shortcut (CTRL+R or CTRL+ENTER) was the same as it was for other colleagues for which the function does run all lines in a command: 'Run Current Line or Selection'
The problem is not preventing me from using R, but it is tedious and I hope someone can help me to solve it.
Thanks so much for reading!
Click on header Tools, then Global Options..., then Code, then Ctrl + Enter Executes and choose Multi-line R statement
#M Waz & #Just Burfi: I know I can select the code and then run it, that works fine. But I don't want to have to manually select the code all the time.
#Clemsang: your answer puzzled me for a moment because I didn't have the CTRL + Enter Executes that you were referring to. I went back to my colleague who had the bright idea to check the version of RStudio that I was using.
As it turns out, I was using an old version (0.99.903). Now that I've installed a newer version (1.1.463), running the code works as before! I also have the CTRL + Enter Executes now.
I'm using tqdm_notebook to show progress bars for training loops and long calculations in a pytorch program. It was working fine until it wasn't. Only thing I can think of that may have messed with it is trying to install jupyter-nbextensions for code folding. I couldn't get the nbextensions or the code folding to work properly, so I have removed it.
But now tqdm_notebook progress bar no longer functions correctly. This is the output I get when trying to use it.
Any ideas on what's going wrong? I've looked all over the place and couldn't find any answers.
I had similar problem and have been struggling for days. Finally I found jupyter nbextension enable --py widgetsnbextension which saves my day and makes tqdm_notebook to show the progress bar as normal.
I ran into a very weird problem: my R code for generating a plot only works if I type it into the console but not when I ran it inside the script (with Ctrl+Enter command)... It's the same problem with all plots (regular plots or ggplots). Also I tried it on two different computers and the same thing happened. Anyone have any idea why this is happening?
One possible reason: I installed the newest version of Rstudio on both computers so it might be an issue with the version. The exact same code worked before on an older version of rstudio...Could this be it? If so, how can I fix it?
I think I figured out what the problem was: the setting in the new version of Rstudio has a default option of outputting the plots inside the Rmarkdown script (at the very end of the script). And that's why I wasn't seeing them. You could change the setting such that it outputs in the console.
Try dev.off() to reset the graphics device.
This helps with a lot of weird graphics behaviour.
Probably too late for the original poster... However, I just ran into the same problem after installing an R update. The way I fixed it was to go to preferences, R markdown, and turn off "show inline output". For me, it was just coming out at the bottom of the chunk instead of in the plot window like I wanted. Hope that helps someone!
I just ran into this problem. I mistakenly put my plot() command inside the r markdown setup chunk. I moved it to its own code chunk and it ran as expected.
This question appears to be mentioned briefly here - Permanent Code Folding in RStudio - however for windows and a bit outdated. I am on OS X with RStudio version 0.99.891.
I use command-alt-L to fold code in R-studio, and would prefer if the code remains folded when I both (1) save/close/reopen the file, and (2) run the folded code. Currently, doing both (1) and (2) unfolds the code, which is slightly frustrating.
Anyone know if this is avoidable, or something I should learn to live with?
Thanks!
If you put # #### around every bit you want to fold and then when you open the script Alt+O (Cmd+Option+O on Mac) that will fold everything. Then highlighting the line and running it keeps it folded.
What steps will reproduce the problem?
1. wkhtmltopdf.exe --disable-smart-shrinking --print-media-type --page-size A4 --dpi 96 --margin-top 25 --margin-bottom 25 file:///.../debug.html mytest.pdf
What is the expected output?
I expect to see the non-shrinked content in result pdf-file
What do you see instead?
Shrinked content in the result pdf-file
What version of wkhtmltopdf are you using?
0.11.0 rc2
On what operating system?
Windows 7 64-bit
The problem is a little bit wider. I need to insert page breaks before some divs depending on their height. I wrote the appropriate script. But the thing is in "shrinked world" the coordinates analyzed by the script change and it the result is ugly. So I need to disable shrinking to make it work correctly.
On the other hand the documentation says '--disable-smart-shrinking' is "only available using patched QT". Does my version of 'wkhtmltopdf' implement this stuff? How can I find it out? Should I install QT or even rebuild the wkhtmltopdf?