How do you see your viewer items in R studio? - r

How can I see previous tables that I generated in the viewer instead of only the most recent thing that I ran? For example if I've run several tables and changed one or two things and I wanted to be able to compare them side by side, how do I see them both? I'm thinking about how I can scroll through an SPSS output file.
I'm not sure if this is a code thing or a settings thing. Opening a new window doesn't seem to do anything. Refreshing the viewer doesn't seem to change anything.
I can put things in the viewer no problem using view() or expss_output_viewer or out="viewer".
I can only seem to get it to display the most recent table I ran.

Click the arrows in the upper left of the viewer pane to see previously plotted tables.
Image of viewer pane with arrows highlighted
Using flextable
flextable(mtcars)
Using expss
expss_output_viewer()
as.etable(mtcars)

Related

Show presentation slide in RStudio

In an upcoming project I'd like to guide my audience through a presentation as well as showing some code in RStudio. To use the screen space optimally I'd like to show the presentation (a PDF) in the environment area of RStudio (top right corner). This way I could display some code on the left, the presentation in the top right and plots in the bottom right corner.
Does an RStudio plugin exist to accomplish this?
File > New File > R Markdown
New your file
Select PDF from the Default Output format
A minimal working example will be populated with the Motor Trend Cars data frame.
Run any single 'Chunk' with the tiny green arrow to make your plots generate under the code
Additional viewing options in preview pane

Pane layout in R studio : showing fully all four panes fully

Good afternoon
I am struggling getting my default pane layout i am used to in R studio (Version 1.3.1073) and view -> panes -> show all panes does not work.
The issue is, I can see all pane (source, console, environment and files) like on the image below. But Environment and File pane cannot be opened simultaneously (in red), i always have to expand one then the other hides . Clicking on the expand button (in green) just expands the other one but it is not possible to see both pane at the same time.
Clicking on the separation bar and get this symbol to shift the pane works only for the console and source pane, but not the environment and file pane, nor show all panes command works.
Does anyone know what i can get to what use to be the default in rstudio pane layout (where content of all panels can be seen without expanding), namely looking like this
Sounds like something pretty basic but i seem to be unable to fix it myself. Thanks a lot for your support.

RStudio - Scrolling in output of str_view_all

I recently started using the stringr-package in RStudio. I really like the str_view_all function. Currently I'm working with a large dataset of strings and like to look at the matches. str_view_all works alright, but sadly I'm not able to scroll through the output (on the right). When extending the viewport for the output more lines are shown.
Is there a way to scroll through this output (I can't further extend the viewport at some point)?
There is no way to scroll through the output in RStudio's Viewer tab: https://github.com/tidyverse/stringr/issues/127
Try the "View in new window" shortcut on top of the Viewer, it allows you to see the full output in a web browser.

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.

Altering The Sorting Arrows In an R Shiny tabPanel

I didn't see anything here or in http://shiny.rstudio.com/reference/shiny that seems to hit on this problem.
In an R Shiny tabPanel output, the sorting arrows align with the right side of the search fields at the bottom of the page.
Here's a pretty good example:
http://shiny.rstudio.com/gallery/datatables-options.html
Is there a way to make them align just to the right of the column name text up top?
Alternatively (or possibly both), is there a way to change the color of the arrows?
The default greyish doesn't really stand out. Bonus points to make the up and down arrows different colors.
Doing it directly in RShiny is best, but I could muddle my way through .js or .css if needed.
I'm trying to head off imminent support requests of "the column is sorting wrong" and "I can't see the arrows" before I push into production.
At the bottom of that shiny example you showed they show that you can pass in through the options parameter options to the rendering for the DataTable table, via the shiny::renderDataTable() function.
Hopefully the http://datatables.net/ site has documentation on what you want if it's indeed possible
If you look at Developer Tools on the http://shiny.rstudio.com/gallery/datatables-options.html page maybe you can see what element would need to be changed.

Resources