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
314
votes
10 answers

Update R using RStudio

How can I update R via RStudio?
AdamNYC
  • 19,887
  • 29
  • 98
  • 154
285
votes
16 answers

Change R default library path using .libPaths in Rprofile.site fails to work

I am running R on Windows, not as an administrator. When I install a package, the following command doesn't work: > install.packages("zoo") Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’ (as ‘lib’ is unspecified) Warning in…
I Like to Code
  • 7,101
  • 13
  • 38
  • 48
238
votes
4 answers

R - Markdown avoiding package loading messages

I have been using Knitr via R-Studio, and think it is pretty neat. I have a minor issue though. When I source a file in an R-Chunk, the knitr output includes external comments as follows: + FALSE Loading required package: ggplot2 + FALSE Loading…
Roark
  • 2,575
  • 2
  • 14
  • 8
214
votes
9 answers

Difference between R MarkDown and R NoteBook

I am trying to understand at a high level what the differences between R Markdown and R NoteBook. I know they are interrelated but I would like to figure out how they are related. My understanding is this: I know R Notebooks are really R Markdown…
PagMax
  • 8,088
  • 8
  • 25
  • 40
125
votes
18 answers

rJava load error in RStudio/R after "upgrading" to OSX Yosemite

I recently "upgraded" from OSX Mountain Lion to Yosemite and from R 3.1.3 to 3.2. Immediately after the upgrade, when I opened R or RStudio I got a pop-up message saying that I needed to install Java 6. In addition, loading rJava or any package that…
eipi10
  • 91,525
  • 24
  • 209
  • 285
113
votes
6 answers

Rstudio rmarkdown: both portrait and landscape layout in a single PDF

I wonder how to use rmarkdown to generate a pdf which has both portrait and landscape layout in the same document. If there is a pure rmarkdown option that would be even better than using latex. Here's a small, reproducible example. First, rendering…
user3712688
  • 1,151
  • 2
  • 8
  • 5
111
votes
5 answers

ggplot plots in scripts do not display in Rstudio

I have a strange issue with Rstudio: If a script calls ggplot2 functions to display a plot, then using Source to run the script does not produce the plots. If I select the whole script with Ctrl+A, then Run the current line or selection…
Superbest
  • 25,318
  • 14
  • 62
  • 134
100
votes
3 answers

Understanding user file ownership in docker: how to avoid changing permissions of linked volumes

Consider the following trivial Dockerfile: FROM debian:testing RUN adduser --disabled-password --gecos '' docker RUN adduser --disabled-password --gecos '' bob in a working directory with nothing else. Build the docker image: docker build -t…
cboettig
  • 12,377
  • 13
  • 70
  • 113
98
votes
6 answers

Auto-format R code in RStudio

Is there any possibilities for auto-formatting code in RStudio? I found this, but it is not connected with RStudio. Also it is desirable that it be customizable formatting.
midas
  • 1,758
  • 2
  • 20
  • 20
84
votes
5 answers

Code to clear all plots in RStudio

I have code to clear the workspace: rm(list=ls()) and code to clear the console: cat("\014") Is there code to clear all plots from Rstudio?
dpel
  • 1,954
  • 1
  • 21
  • 31
80
votes
5 answers

Rstudio and Google Drive Syncing Problems: "The process cannot access the file because it is being used by another process"

So I'm using RStudio and storing my files on Google Drive (the version with folders on your system, acting like Dropbox). I'm using it because it provides a lot more space for free than Dropbox, and I need that space for the projects I'm working…
jpm_phd
  • 915
  • 1
  • 6
  • 8
76
votes
5 answers

R knitr Markdown: Output Plots within For Loop

I would like to create an automated knitr report that will produce histograms for each numeric field within my dataframe. My goal is to do this without having to specify the actual fields (this dataset contains over 70 and I would also like to reuse…
bnjmn
  • 4,508
  • 4
  • 37
  • 52
74
votes
2 answers

"long vectors not supported yet" error in Rmd but not in R Script

I am operating matrices with R 3.1 and RStudio 0.99. I have my R Script and with cmd+enter it works without problem. I created an Rmd for reporting but I have this error Error in lazyLoadDBinsertVariable(vars[i], from, datafile, ascii, compress, :…
pachadotdev
  • 3,345
  • 6
  • 33
  • 60
74
votes
1 answer

avoid string printed to console getting truncated (in RStudio)

I want to print a long string to the RStudio console so that it does not get truncated. > paste(1:300, letters, collapse=" ") [1] "1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i ... 181 y 182 z 183 a 184 b... I supposed this should be fairly…
Mark Heckmann
  • 10,943
  • 4
  • 56
  • 88
73
votes
8 answers

multiple authors and subtitles in Rmarkdown yaml

I'm trying to follow this pandoc example to add multiple authors to an Rmarkdown file in the yaml metadata block. The pdf will generate in RStudio (Version 0.98.932), but there is no author information. --- title: 'This is the title: it contains a…
Eric Green
  • 7,385
  • 11
  • 56
  • 102
1
2 3
99 100