Questions tagged [rstudio]

RStudio is an IDE for the R statistical programming language. DO NOT use this tag for general R programming problems, just use the R tag. ONLY use for RStudio-specific questions.

RStudio is a free and integrated development environment () for and . It includes a console, syntax-highlighting ACE-based editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.

RStudio is available in open source and commercial editions and runs on the desktop (, , and ) or in a browser connected to RStudio Server or RStudio Server Pro (Debian/Ubuntu, Red Hat Linux/CentOS, and SUSE Linux).

RStudio PBC, the organization behind RStudio IDE, is now officially named Posit PBC, rebranding some of its corporate products, notably Connect, Workbench and Package Manager.

Tag Usage

Only use this tag for specific RStudio issues such as GUI features, bugs, installation. Always make sure your questions are suited for Stack Overflow.

Related tags

Resources

7871 questions
36
votes
4 answers

TODO comments in rStudio

is there a way to list ToDo comments in rstudio? Before I used eclipse and really loved to put some # TODO I definitely need more unit tests here! comments in my source code. I could not find this feature in rStudio so far and I was wondering, if…
drmariod
  • 11,106
  • 16
  • 64
  • 110
36
votes
5 answers

Run multiple R-scripts simultaneously

In my thesis I need to perform a lot of simulation studies, which all takes quite a while. My computer has 4 cores, so I have been wondering if it is possible to run for example two R-scripts in Rstudio at the same time, by letting them use two…
Acarbalacar
  • 714
  • 2
  • 7
  • 19
35
votes
3 answers

How to fast insert new 'pipe operator' in Rstudio?

I have been using the ctrl + shift + m shortcut to insert well known %>% pipe operator. Since the release of R version 4.1.0 and adding a new |> to base, I wonder is the corresponding shortcut available in Rstudio?
dy_by
  • 1,061
  • 1
  • 4
  • 13
35
votes
2 answers

Phantom RStudio Errors

I'm encountering some really odd behavior with rstudio version 1.0.136 and r version 3.3.2, which unfortunately does not lend itself to a reproducible example. Whenever I force quit an rstudio project, I start getting these weird phantom error…
Shorpy
  • 1,549
  • 13
  • 28
35
votes
10 answers

RStudio suddenly stopped showing plots in the plot pane

RStudio is not showing the generated plots in the plot pane anymore. Instead they open in a separate file with the name "Quartz". Here's my session info.: > sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0…
Doug Fir
  • 19,971
  • 47
  • 169
  • 299
35
votes
3 answers

How to specify lib directory when installing development version R Packages from github repository

In Ubuntu, I am installing all the R packages in the directory, /usr/lib/R/site-library by specifying lib option in install.packages(). But when I try to install the development version of the R packages using, install_github(), it always installs…
Manoj G
  • 1,776
  • 2
  • 24
  • 29
35
votes
5 answers

%>% key binding / keyboard shortcut in Rstudio

I've been experimenting quite a bit with the increasingly popular %>% operator from the magrittr package. I've used it enough that I've set a keyboard shortcut to save me typing: shift+command+. instead of space, shift+5, shift+., shift+5,…
npjc
  • 4,134
  • 1
  • 22
  • 34
35
votes
2 answers

What are productive ways to debug Rcpp compiled code loaded in R (on OS X Mavericks)?

What is the most productive and quickest way to debug shared objects that are loaded into R, in particular on OS X Mavericks? I'm primarily interested in debugging compiled Rcpp code. I have read the R externals on debugging compiled code…
FXQuantTrader
  • 6,821
  • 3
  • 36
  • 67
35
votes
9 answers

Automatically adjust LaTeX table width to fit pdf using knitr and Rstudio

Using Rstudio and knitr to produce latex-tables in pdf, how do I make wide tables fit the page? I'm basically looking for at way to shrink the tables. With figures, it is really easy in Knitr using out.width=, but with tables I can't seem find a way…
Rene Bern
  • 545
  • 3
  • 10
  • 18
34
votes
8 answers

cursor sometimes changes from a vertical line to an underscore in Rstudio

I am using R-studio 3.3.3 on a 64 bit windows 10 Acer laptop. I am new to programming in R and I just discovered that my cursor sometimes changes from a vertical line to an underscore in R-studio. Could someone help tell me why?
Samuel Nde
  • 2,565
  • 2
  • 23
  • 23
34
votes
2 answers

How to split Shiny app code over multiple files in RStudio?

I tried to split code for a shiny application over different files, but can't get this to work decently in Shiny. My attempt can be found in this demo How can I split up my code over different files, but still keep the 'Run App button ' and have…
Magdy
  • 345
  • 1
  • 3
  • 9
34
votes
2 answers

How to prevent objects from automatically loading when I open Rstudio

Everytime I open Rstudio I find some variables in my environment. How can I remove these once for all? Currently, whenever I open Rstudio I run rm(list=ls()) to clear the environment first and then I run the necessary scripts. I even tried to…
Haroon Lone
  • 2,837
  • 5
  • 29
  • 65
34
votes
3 answers

Split the title onto multiple lines?

In an R markdown document (html and presentations), is it possible to manually split the title onto multiple lines? I tried playing with pipes which produces orrendous output. --- title: 'A title I want to split on two lines' author: date:…
Thomas Speidel
  • 1,369
  • 1
  • 14
  • 26
34
votes
6 answers

R View() does not display all columns of data frame

I have been adding columns to a data frame and using View() to check that it did what I expected. I have repeated lines of code along the lines of: x$p <- 3 * x$a x$q <- sqrt(x$b + x$c) View(x) This worked fine until the number of columns exceeded…
Ross Gayler
  • 653
  • 1
  • 8
  • 14
34
votes
3 answers

dynamically add plots to web page using shiny

i want to create an app using shiny that dynamically add plots to the page. it could be 10 plots and it could be only one. i'm using this tutorial in the shiny homepage for dynamic UI. this is a simplified example. the function showme is ploting…
haki
  • 9,389
  • 15
  • 62
  • 110