Clear the current output from entire RMarkdown (Rmd) document in RStudio? - r

Especially when working with long RMarkdowns (e.g. 2-3000+ lines), it is desirable to completely clear all rendering and output (i.e. to get back to the same state as though none of the code in the RMarkdown had ever been executed), except without necessarily clearing the environment.
Is there a way to do this?
Note: in case someone wonders why, here are a couple of reasons:
occasionally (especially with javascript-heavy renderings, e.g. plotly, wordcloud etc) there can occasionally be bugs which not only affect the rendering that contains the bug, but all other renderings in the document, and
particularly in long Rmd files, it is sometimes simply easier to scroll through a doc which hasn't got renderings in it.

Click on the gear icon to the right of the "Knit" button at the top of your R Studio dashboard.
The very last option is "Clear All Output".
This should be what you are looking for.

Related

Is there a way to keep editing cell and rendered cell open at the same time in a Jupyter Notebook?

I.e. for one cell in the notebook, the editing version and rendered version are presented side-by-side so you don't lose your place between editing and checking the rendered version. Particularly for Markdown cells.
Are there any plugins or add-ons which achieve this? Perhaps there is a hacky way to have two browser windows where one updates rendered cells in real time and the other is used for editing. I guess even something as simple as the "render cell" command being piped to a different window would do the trick.

RMarkdown in RStudio - is it possible to completely hide LaTeX preview

I'm starting to use RMarkdown for documents with a lot of equations. RStudio has a nice feature of previewing latex when I'm writing it which I like, however after I've written the equation I don't need it taking up space in my text editor area, see image:
There is the option to "hide it" by clicking the two arrows in the corner of the preview but even after this it still takes up loads of space and clutters my text editor area, especially since my text is filled with many equations. So my questions is first if it's possible to keep the live preview when I'm writing the equation and then completely hide it or if that's not possible, completely disable this feature of latex preview?

Efficiently get rid of all or some objects in RStudio Script pane

I open dataframes all the time in RStudio using View(df) or View(list) which pops open a window in my RStudio script pane as with MASTERstat1 MASTERextract and MASTERbackout1 in the image below:
Is there a way to close all the windows that are NOT SCRIPTS? I inevitably forget to close them and get a ton of them, and stuff gets cluttered.
It looks like it's not currently possible in RStudio, at least as of a month ago.
One sub-optimal workaround mentioned in this answer is to make sure your script tabs are saved and then to close all tabs using Ctrl+Shift+W.
My personal preferred method for closing a lot of unwanted tabs quickly is to use Ctrl+Tab/Ctrl+Shift+Tab for navigating between tabs and Ctrl+W for closing the current tab.
Edit: also potentially useful is Shift+Ctrl+Alt+W, which closes all but the current tab.

Exporting Visual Studio 2010 .rdlc report to PDF renders the font too large

I have a report that renders perfectly fine on screen, but when I export it to PDF one section is rendering the font HUGE, making it unreadable. The part that is getting rendered so big is a field I have set up to store rich text, which then gets converting to html. I did not roll this solution myself, but from what I understand it runs an rtftohtml method to render to the screen, and then it runs through the same method again to re-render it to a PDF, which is why I am confused. The first rendering (to the screen) looks perfect, and then the second rendering (to pdf) looks like garbage. I have seen a few threads on this topic in some other forums but not a single one has a response, so I am hoping the SO community has a possible work around or fix for this!

Issues with Exported Crystal Report to Word Document

I am having a minor issue playing with my exported Crystal Report, I can generate the reports just fine on our website, however when I attempt to export them to Word documents I don't quite get a document I can do much with.
i.e.:
I can't position the generated text anywhere in the document, it is almost 'frozen' in place. I would expect if I moved the cursor above the report text and pressed Enter a bunch of times I could remove the report down the page, however it just won't budge
All the text seems to be in its own box and I can't move it around or do anything with it.
Any thoughts? My expectation would be once it is exported to Word I could play with it like a Word document, move the text down the page, edit the document, do something with it.
Thanks!
btw, this question is similar to the one posted here, but this one wasn't tagged properly and I don't have enough karma to fix it:
https://stackoverflow.com/questions/434381/word-formatting-not-intact-when-exported-from-crystal-reoport
I'm afraid that you can't do much about it. Crystal Reports is very much orientated towards putting data in fixed positions on pages, so when it exports to Word it puts its data into text boxes because that's a similar thing that Word offers. You could make the Crystal Report page consists of a giant text field and using spaces and newlines to get the data into the right place, which will probably then give you a giant textbox in Word.

Resources