7,849 questions
-1
votes
0
answers
54
views
Upon Save, Rstudio runs everything [closed]
I often like to save my work as I work on it, rather than when I finish up something. However, RStudio keeps re-running all the code within the script rather than just saving the .R file. I have ...
0
votes
0
answers
45
views
Problem installing the Hyphen package in Quarto / R Studio
I'm using Quarto 1.6.42 in R Studio (R 4.5.2) on a Linux Ubuntu 24.04 environment to generate a PDF document.
When I try to render the document to generate the PDF file, I receive the error message ...
1
vote
0
answers
56
views
Error: Object '..rs.invokeShinyWindowExternal' not found Execution stopped
I have a problem installing packages in my RStudio with my new work laptop.
When installing a package from github with devtools::install_github("dustinfife/flexplot") the installation fails ...
0
votes
0
answers
109
views
RStudio not updating to new R version or downloading packages--windows username issue?
I'm running into an error getting RStudio to recognize R 4.5.1 (or other versions more recent than 4.1.2). When I try to select a newer version of R in RStudio global options, I am getting the error ...
0
votes
1
answer
119
views
RStudio rmarkdown code chunk printing boxes for data frame output
RStudio: 2025.09.0 Build 387
MacOS 15.7
I am using RStudio and R Markdown files, .rmd.
When I run the code chunk to output a data frame, for example head(gapminder), the output is unreadable. It ...
0
votes
0
answers
72
views
Go to Next Section in RStudio doesn't work
I am trying to use the keyboard shortcut "Go to Next Section" and ""Go to Previous Section" which I can´t get to work. CTRL + PgUp / PgDwn just moves the cursor to the ...
2
votes
1
answer
116
views
Dropdown menus 'move' when clicked
I am trying to make a basic bar plot with filters using plotly. I have two dropdown menus, and when the window is resized and the dropdowns are clicked they 'move', or appear to move with the axis.
...
2
votes
0
answers
128
views
How can I stop testthat::test_that() calls from cluttering RStudio’s Document Outline pane?
I’m writing materials that include a lot of testthat unit tests.
The problem: RStudio’s Document Outline pane treats every test_that() call as if it were a function definition, so the document outline ...
2
votes
1
answer
143
views
How can I stop RStudio telling me that symbols are out of scope in my unit tests?
I have followed the instructions at https://testthat.r-lib.org/ for adding unit tests to an R package using the testthat library.
The tests themselves run fine, but RStudio is yellow-squiggle ...
0
votes
1
answer
359
views
Copilot waiting for completions makes RStudio hang
I have been using copilot in RStudio for a few weeks, but in the last few days it has been causing me some trouble. Specifically: if I am in the middle of writing a command in my R script, then I ...
0
votes
0
answers
42
views
Installing an R Library with an Older Version of R [duplicate]
I've recently run into some issues trying to install the newest compatible versions of R/R studio on my Mac (OS, Monterey, Intel).
Therefore, I've re-installed older versions of R/R Studio (R = 4.2.3; ...
0
votes
0
answers
59
views
how to re-connect an existing xx.Rproj to git and github using R studio
I have git installed on my computer and R studio is already linked to it. I also have a github account and a token. I have been committing and pushing changes to github successfully, however, all of a ...
0
votes
0
answers
79
views
Opening Project in R studio loads old quarto documents automatically
I have this weird issue where every time I open an existing project in R studio, it automatically loads all quarto documents associated with that project (both existing ones and old ones that have ...
1
vote
0
answers
405
views
R studio keeps getting aborted
I recently upgraded my Mac from macOS 10 to macOS 12 through an Apple-authorized service center. Since the upgrade, I'm experiencing issues with RStudio — the session keeps getting aborted. I ...
6
votes
1
answer
125
views
Can I retrieve the label of an Rmd chunk both during knitting and interactively?
In this minimal example we can see that when knitting I will get the output "my-chunk-label". However, if we use "Run Current Chunk" (i.e. green chunk play button in RStudio) the ...
0
votes
0
answers
105
views
Git clone: Permission denied. Can't create temporary folder
my simple try to clone a repository fails with the error:
fatal: could not open '/home/myusername/reponame/.git/objects/pack/tmp_pack_uSnA9n' for reading: Permission denied
fatal: fetch-pack: invalid ...
1
vote
0
answers
29
views
Rstudio - remove ctrl+click as a shortcut to View?
I've noticed if you hold ctrl as you click on a data frame name (e.g frm) in R-studio it acts as a shortcut to View(frm). Does anyone know how to turn off this behaviour?
Example:
frm <- data....
0
votes
2
answers
110
views
Is there a reason a package is not showing under the "Global Environment" drop-down list?
I'm doing the google data analytics course and I wanted to test the feature of exploring the package when looking at the dropdown under "Global Environment"
I attempted to uninstall the ...
1
vote
1
answer
107
views
How Can I Transfer SQL Query Results from RStudio's SQL Tab into an R Variable?
I'm struggling to transfer SQL query results into R after successfully retrieving data in RStudio's SQL Results tab.
What I've Done So Far
Connected to the database via RStudio's "Connections&...
0
votes
0
answers
53
views
Display R console outputs/logs via shiny [duplicate]
I have a R Shiny app which i am running from Posit. It is running perfectly by running app.R file and the dashboard is launching and the corresponding logs / outputs are getting displayed in R studio ...
0
votes
0
answers
21
views
RStudio Rmarkdown Visual output abbreviates column values to column name width
Source and Visual are two Rmarkdown views in RStudio, switchable using Ctrl+Shift+F4.
Works fine in the Source Rmarkdown view (and in the console).
Works fine in Visual Rmarkdown view if the column ...
1
vote
0
answers
425
views
Intermittent database corrupt error in R on package install
I am working on building an R package in RStudio. I am using R version 4.5.0 and RStudio version 2024.12.1 Build 563 on Ubuntu 24.04.2 LTS. When I install my package from the "install" ...
2
votes
0
answers
83
views
why factor with more than 64 levels in Rstudio incur a display issue [closed]
I find that if a variable in a data frame is a factor with more than 64 levels, there will be a display issue when using View() to inspect the data frame.
Specifically, for a data frame like:
a <- ...
1
vote
1
answer
99
views
Automatically open multiple scripts in a detached source window
I'm working in RStudio and prefer having a full-window editor separate from the console. By default, when I run:
file.edit(c("script1.R", "script2.R"))
The files open as tabs in ...
0
votes
1
answer
181
views
How do you change the color of RStudio's toolbars?
I am trying to make a custom RStudio theme but cannot figure out how to change the color of the toolbars/windows/general background beyond the console. I used https://tmtheme-editor.glitch.me to pick ...
0
votes
0
answers
62
views
Can nested code chunks be used when running code interactively in RStudio?
I have Rmarkdown code (full code at the bottom) that works as expected when I click the Knit button in RStudio. However, if I try to run the code interactively by clicking the "Run all code ...
0
votes
1
answer
124
views
Error when doing github commit from Rstudio
I got some kind of sign-error with git commit in Rstudio.
Git works without hitch in batch. I can also push and pull from github using Rstudi. Stage seems to work as well. Only commit fails (from ...
4
votes
0
answers
129
views
Reducing memory used in Shinyapps.io for R project
I'm publishing a Shiny app written in R to Shinyapps.io.
In RStudio, the "memory used" is 4.9 GiB after I run the app and come back to the editor:
When I do gc(), this number doesn't change ...
0
votes
2
answers
174
views
How do I change plot size in RStudio without making plots blurry?
When I run the chunk below in RStudio, I get a very blurry plot. Removing fig.width=6.5, fig.height=6 gives me back a nice, crisp plot. I've tried AGG, Cairo and Cairo PNG backends, and also switched ...
0
votes
1
answer
83
views
.Rprofile not accessible while using renv
I am using renv for this project and everything was working fine. I think the .Rprofile created by renv got corrupted. Now I can't open or delete that .Rprofile.
I tried accessing the file but the ...
0
votes
0
answers
64
views
Change the device used by RStudio when saving a plot
I wish to save some EnhancedVolcano plots in RStudio. The resolution is getting messed up when saving with ggsave - using pixel and DPI makes the fonts scale out of whack, and frankly there are too ...
0
votes
2
answers
51
views
Reticulate not displaying pandas dataframes correctly
I just updated conda and Rstudio and now dataframes will not show up correctly in RStudio. R dataframes show up correctly but not pandas (image attached). The pandas dataframes are correctly displayed ...
2
votes
1
answer
124
views
RStudio displaying outputs in red text, difficult to distinguish from errors
I see some output is being displayed in red text, even though there are no errors or warnings. This makes it very difficult to distinguish between actual errors/warnings and normal output.
The issue ...
0
votes
0
answers
32
views
RStudio "Go to function definition" goes to copied source file instead of .GlobalEnv
I am using Rstudio (2024.12.1 Build 563 "Kousa Dogwood" Release (27771613, 2025-02-02) for windows). If I source a file helper_functions.R using this code:
helper_function_path <- "/...
0
votes
0
answers
87
views
How to debug Python functions in Rstudio?
I have Python chunks in an Rmd file in Rstudio that I would like to debug.
I am using ipdb but when it gets to the breakpoint in the function it doesn't open a separate terminal as I was expecting ...
0
votes
1
answer
153
views
How to Edit R Plots Interactively in RStudio? [closed]
I'm tired of making small tweaks to my R plots by re-running code in the console. It feels tedious, especially when adjusting width or position of columns or elements within the plot, since there is ...
4
votes
2
answers
267
views
How can I use predefined code snippets outside of code chunks in Quarto within RStudio/Posit?
I'm working on a Quarto document in RStudio/Posit where I frequently need to insert recurring formatting code. I've set up some custom code snippets in RStudio that work perfectly inside code chunks. ...
1
vote
0
answers
193
views
RStudio prioritise code completion over GitHub copilot when using Tab
I'm using RStudio and have activated GitHub Copilot. I want to use Copilot automatically (so not using the keyboard shortcut to request completion) but I always run into conflicts with the RStudio ...
0
votes
0
answers
59
views
How to get qmd document in RStudio NOT open in visual editor?
In older versions of RStudio (I now have 2024.12.0 Build 467) , besides the rmd docs, also the quarto documents would listen to Tools/Global options/R Markdown/Visual/ and then uncheck the box in ...
0
votes
1
answer
64
views
Rstudio Clickhouse connection
I need to connect RStudio to ClickHouse and then be able to run SQL queries in R Markdown, generating a pre-formatted table that I can view in the environment instead of a string that needs to be ...
0
votes
0
answers
32
views
Why is RStudio Data Viewer Wrong with Python pd.DF - Snowflake Query
At loss why when I look at the data viewer in RStudio it looks like it does in the image below yet when I print the data frame it looks normal. Am I missing something? It works fine in Spyder
Sample ...
0
votes
0
answers
176
views
Installing TinyTex is causing errors
I am trying to install TinyTex, which I have done easily and successfully in the past.
I am using RStudio 2024.12.0+467 and R v4.4.2 (sessionInfo() below) on my intel Mac.
But today, I get an error:
&...
0
votes
0
answers
38
views
Text not aligning when compiling: xelatex and R markdown
I am using R markdown to create a CV. I use the vitae package and the following template. The problem I am facing is that when compiling with R Studio, I have a jump in one of the lines (see below).
...
1
vote
0
answers
31
views
RStudio aborted when running code in Rmd file
I have this weird problem: when I am running a code chunk (or every code chunk) in an Rmd file in RStudio, it says Error in readRDS(mapfile) : unknown input format basically for every line, and then R ...
1
vote
0
answers
56
views
MacOS: How to tell R.app and RStudio.app where to find the Framework?
New R user but experienced programmer, here. I am on a Mac. I installed the R Library framework in the usual place where one would install such a framework on a Mac: "$HOME/Library/Frameworks&...
0
votes
0
answers
59
views
Maintaining code folding state in RStudio for large Shiny apps
Shortcuts are available in RStudio for code folding as documented here: code folding in Rstudio: Collapse — Alt+L, Expand — Shift+Alt+L, Collapse All — Alt+O, Expand All — Shift+Alt+O.
For shiny apps, ...
1
vote
0
answers
75
views
Trouble installing gradethis from github repository
I'm in the early stages of an MSc in Medical Statistics so I am brand new to R. On my personal laptop, I am having trouble installing gradethis using either the base R (4.4.2) or in RStudio (2024.12.0 ...
1
vote
2
answers
651
views
Having trouble using Python in R via Reticulate, issue with libraries
I am having a hard time getting Python to work in R via Reticulate. I downloaded Anaconda, R, Rstudio, and Python to my system. Below are their paths:
Python: C:\Users\John\AppData\Local\Microsoft\...
0
votes
0
answers
32
views
rstudio send error when opening scripts on command line (after update)
Problem
After updating RStudio, I’m experiencing issues when trying to open R scripts directly from the terminal. While launching RStudio itself works fine, running commands like the one below leads ...
3
votes
2
answers
251
views
Rocker/rstudio username
I have a docker container rimage, with the docker file based on the rocker project
FROM rocker/rstudio:latest
# Install depencendcies
RUN apt-get update \
&& apt-get upgrade -y \
&& ...