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
42
votes
4 answers

How do you change the default directory in RStudio (or R)?

I consulted http://www.rstudio.com/ide/docs/using/workspaces and tried the setwd code and clicking on More --> Set as working directory options. However, the next time I closed and opened RStudio, it did NOT change my directory to the one I…
user3380666
  • 439
  • 1
  • 4
  • 4
42
votes
4 answers

Can RStudio automatically generate an roxygen template for a function?

Does RStudio support any automated roxygen template creation? In Emacs-ESS, C-x C-o will produce an roxygen template for a function. For example, it will automagically convert this: foo <- function(x,y) x+y into this: ##' .. content for…
David LeBauer
  • 31,011
  • 31
  • 115
  • 189
41
votes
3 answers

Use internal links in RMarkdown HTML output

I am using R Studio to create a Rmarkdown (.Rmd) document. I tried: Jump to [Header 1](#anchor) I would like to set up a link so when a reader clicks it, they jump to a specific point on the page. Let's say the point I want them to be directed to…
Joe Parzival
  • 557
  • 2
  • 5
  • 10
41
votes
1 answer

How to convert .Rmd into .md in R studio?

I am working on a website with Rmarkdown on gh-pages. However, in R studio you can only create new .Rmd files. This is a problem because I need to convert my .Rmd files into .md files before I push to my github repo. Does anyone have some advice?
Gustavo B Paterno
  • 976
  • 1
  • 9
  • 14
41
votes
2 answers

How to end a 'debug' mode?

In RStudio, I started a debug mode by debug(ls) ls() Then I do not know how to end this mode. The prompt changed to Browse[2]> How can I end this debugging mode?
user67275
  • 1
  • 9
  • 38
  • 64
41
votes
10 answers

Check if R is running in RStudio

I am looking for a way to test if R is being run from RStudio. For some reason I could find the answer on google yesterday but not today, but I think it had to do with testing if a certain system variable was set.
Sacha Epskamp
  • 46,463
  • 20
  • 113
  • 131
41
votes
9 answers

How to preserve formatting from rstudio when copy/pasting to Word?

I want to reproduce my code in Word 2010. The scripts were written in rstudio, and I would like to preserve rstudio's formatting when pasting into Word. Principally, I like the font colors and spacing that rstudio uses. I find that when I paste…
dubhousing
  • 551
  • 1
  • 4
  • 10
40
votes
1 answer

Renaming Objects in RStudio context sensitive within entire Project

I have an issue when developing an R project using RStudio. I create an object, and then realise later, that I want to give it another name. I then have to manually change the name, which in larger projects is annoying and often results in errors,…
David Go
  • 810
  • 1
  • 7
  • 13
39
votes
1 answer

"Erroneous nesting of equation structures" in using "\begin{align}" in a multi-line equation in rmarkdown to knit+pandoc pdf

I am writing some multi-line equations in R Markdown - LaTeX, using auto-numbering and \begin{align}. Here's a working the example: --- title: "test" output: html_document --- (@eq01) $$ \begin{align} y = x^2 \\ y = x^3 \\ y =…
Hernando Casas
  • 2,837
  • 4
  • 21
  • 30
38
votes
2 answers

How to uninstall R and RStudio with all packages, settings and everything else?

I messed up something and there is a problem with tidyverse. Tried to find a solution but spend lots of time without result. How to uninstall R and RStudio with all packages, settings and everything else on Windows. I tried to uninstall through…
vasili111
  • 6,032
  • 10
  • 50
  • 80
38
votes
8 answers

How to set up conda-installed R for use with RStudio?

I've been trying to set up my R using conda (eventually to use with Beaker Notebook) and I want to be able to use RStudio with my conda-installed version of R. My method of installing R: conda install -c r r conda install -c r r-essentials conda…
O.rka
  • 29,847
  • 68
  • 194
  • 309
38
votes
5 answers

RStudio enters debug mode for every function error - how can I stop it?

I've been using RStudio for years, and this has never happened to me before. For some reason, every time a function throws an error, RStudio goes into debug mode (I don't want it to). Even after using undebug() on a single function. >…
Hillary Sanders
  • 5,778
  • 10
  • 33
  • 50
37
votes
2 answers

R not responding request to interrupt stop process

Every now and then I have to run a function that takes a lot of time and I need to interrupt the processing before it's complete. To do so, I click on the red sign of "stop" at the top of the console in Rstudio, which quite often returns this…
rafa.pereira
  • 13,251
  • 6
  • 71
  • 109
37
votes
1 answer

Package error when running r code on command line

I have some code that I run that includes this part: if (!require("yaml")) { install.packages("yaml") library("yaml") } When I run in it rstudio, everything runs seamlessly and there are no bugs. However, when I try running my code on the…
kng
  • 651
  • 2
  • 7
  • 12
36
votes
3 answers

Is it possible to get code completion for R in Emacs ESS similar to what is available in Rstudio?

Rstudio has a great code completion feature. It provides a quick view of functions that start with a given string, as well as function and parameter definitions. ESS is powerful enough, familiar to me, and integrated into Emacs, where I conduct most…
Abe
  • 12,956
  • 12
  • 51
  • 72