7,849 questions
2
votes
1
answer
95
views
What is the keyboard shortcut in RStudio to quickly insert YAML code from code snippet?
I am creating Quarto document in RStudio. I use some YAML settings quite frequently. So, I have added these settings in code snippet in RStudio. What is the keyboard shortcut to quickly insert this ...
1
vote
1
answer
318
views
Repeated RStudio crashes about 1 minute after using it
I am experiencing repeated RStudio crashes about 1 minute after using it and uploading my .RData. I am using Windows 11. I updated to the latest version of RStudio in a trial to solve that and here ...
0
votes
2
answers
541
views
My plots only show in a separate window. How can I undo this?
I am using RStudio and doing scRNA sequencing analysis. I am trying to plot my clusters and they keep popping up in a new window called R Graphics: Device 2 (ACTIVE).
This is my code:
DimPlot(pbmc....
0
votes
0
answers
73
views
Can't install Rtools 43 using windows R version 4.3.2 (2023-10-31 ucrt) -- "Eye Holes" & Solution [duplicate]
I'm at the beginning stages of learning R and I'm trying to install Rtools using install.packages("Rtools43") as it's the newest version of R and I keep getting:
Code I wrote: install....
0
votes
0
answers
185
views
RStudio hanging while installing "BH" package when deploy
Hi I have an app wanted to publish on RStudio Connect.
However it hangs forever at step Installing BH (1.84.0-0). Then it failed.
Tried to install this package locally but it doesn't work.
Any help ...
3
votes
1
answer
332
views
R and Quarto do not generate headers inside for loop
I am using RStudio.
I want to generate headers and plots inside a for loop. But it does not work.
My code should generate three headers. One for each region_value. But I only obtain the header for the ...
1
vote
0
answers
84
views
"Can't Move Doc" Error Upon Opening RStudio or Restarting R Session
Nearly even time I open RStudio or restart the R session, I see the error shown in the picture below. It's essentially these two "Can't move doc" error messages but there are actually ...
3
votes
1
answer
189
views
Exporting default RStudio themes, or setting parenthesis colour?
I'm trying to customise my RStudio theme, which is easy enough using https://tmtheme-editor.glitch.me/
One of the default themes is so nearly perfect for my particular colourblindness and all I want ...
0
votes
1
answer
364
views
rendering pdf using Quarto
I'm having an issue with inserting parameter values into a Quarto document. Despite defining a parameter in the YAML header, the document renders the literal text r params$name instead of substituting ...
0
votes
1
answer
205
views
R/Rstudio: How to automatically skip "Press Enter to continue" in console?
community,
I´m currently struggling of a probably very simple problem in RStudio/R. I´m aiming towards a multiple application of a model, via a simple loop.
Unfortunately, each model run finishes with ...
0
votes
1
answer
278
views
I'm trying to increase performance on through pandoc Rmarkdown
I'm trying to tweak pandoc parameters to increase memory and conversion speed, but can't get anything. This is the ouput part in the RMarkdown:
output:
word_document:
toc: yes
pandoc_args: [...
0
votes
0
answers
372
views
how to properly activate renv using console in R project?
I am confused with proper steps to activate renv.
The project is currently scheduled and working fine with renv using task scheduler.
But I need to do some modifications, so I opened project in R ...
0
votes
1
answer
205
views
connecting rstudio to azure container
I'm currently attempting to establish a connection between RStudio and Azure services, but I'm encountering an error that's preventing successful authentication. Here's the specific error message:
| ...
1
vote
0
answers
509
views
R Markdown not Compiling to pdf even after tinytex installation
I've recently gotten a new laptop and am trying to compile an RMarkdown file to pdf and it's giving the following error:
tlmgr.pl: Remote database (revision 69830 of the texlive-scripts package)
seems ...
1
vote
0
answers
272
views
How to remove folding in R code in R studio
Very basic question but one that I am struggling with and thus can use some guidance...
I am working in Rstudio and modifying an existing script. It is full of foldable regions and they are really ...
0
votes
0
answers
132
views
Best way to reference a locally created r package in a second r project
I have created a r package containing some functions, let's call it functionPackage. I have a second project that needs to reference the functionPackage. I can successfully install the ...
0
votes
1
answer
146
views
How to have correct working directory paths in R Studio dynamically?
I am trying to have some code that has a nested structure - e.g. one script calls another using source().
As I have a complex file/folder structure and I want the code to be reproducible on other ...
1
vote
0
answers
2k
views
RStudio Running Unbearably Slow/Unresponsive when Connected to Cisco AnyConnect VPN
R Version: 4.3.2 (2023-10-31)
RStudio Version: 2023.12.1.0
Cisco Secure Client - AnyConnect VPN: Revision 6
RStudio extremely slow and at times unresponsive when working on the Cisco AnyConnect VPN. ...
-1
votes
1
answer
77
views
Plots don't show under plots window in R
When i run any kind of plot in R, the plot shows up in a new window (Quartz 2 [*]). It will only show one plot at a time as well. This is really frustrating, as I want the plots under the plots window ...
2
votes
1
answer
199
views
Task scheduler batch file not executing R script with renv
Created a simple project using Rstudio and included renv.
It simply creates txt file in project directory.
created batch file:
CALL "C:\Program Files\R\R-4.3.2\bin\Rscript.exe" -e "...
0
votes
1
answer
177
views
How to change the automatic switching of panes into default setting in Rstudio
In RStudio, I'm experiencing an issue where the source, console, and plot panes are switching automatically. For instance, whenever I plot something in R, the plot window pops up automatically and ...
2
votes
1
answer
433
views
How to tell if code is running interactively within an R Markdown (Rmd) context?
My question is very similar to one that has been answered but with a crucial difference. There are several solutions to detecting if code is running non-interactively within an R Markdown (Rmd) ...
2
votes
0
answers
384
views
Error rendering quarto project after update of TinyTex
I encountered discrepancies in PDF renderings between my setup and my colleague's. He was on TinyTeX version 2024.2, while I was not updated. Consequently, I upgraded TinyTeX using "quarto ...
0
votes
1
answer
91
views
How to enter symbols and align equations
1)I wrote an equation and when I hover my mouse over it it shows perfectly as I want it to but when I am knitting to pdf I get the error 1 :
Code used for error1:
$var(u_{t}) = {\delta}_{u}^2 < \...
0
votes
0
answers
190
views
Why does RStudio jump back and run the previous code line if there is a star "*" above the line intended to execute?
When using Run the current line (by button or Ctrl+Enter) and having a code like this (with one or more stars "*"):
code line 1
*
code line 2
The behavior will be the following:
If one ...
0
votes
0
answers
258
views
Dataframes not showing up in R Environment
None of my data frames are showing up in my RStudio Global Environment. When I type View(dataframe) in the Console, they are displayed with their contents. But the Environment itself is blank -- it ...
0
votes
1
answer
97
views
Seeing Greek letters in RStudio when viewing data.frame
Out of nowhere when I look at my imported csv I see Greek alphabet (as seen in the example image).
The csv file itself is in Latin, encoding shouldn't be the problem
In the RStudio options I have ...
0
votes
1
answer
51
views
R Studio stops responding after 2-3 hours of use
Cleaning data in R Studio mainly using tidyr functions and it freezes after 2-3 hours of use. The only way to regain functionality is to close and restart. I've tried stopping the run in console but ...
0
votes
1
answer
260
views
RStudio missing red x's that indicate a missing parantheses
The little red x's that appear next to the code lines to indicate there is a missing paranthesis/bracket/character are gone. I rely on these little guys especially during nested if/else functions, and ...
1
vote
0
answers
35
views
Rstudio executing script fragments on startup
Brand new Windows 11 Pro machine, latest R (4.3) and Rstudio (2023.12.0). When I start up Rstudio about 15 statements appear in the Rstudio history pane but not the R console. Here are the first few:...
6
votes
2
answers
7k
views
Error using Keras in R. "ValueError: Only input tensors may be passed as positional arguments."
So I'm trying to learn RNN in R using keras with this beginner's tutorial:
I'm going through the tutorial step by step, but I run into a weird error after adding the input layer. Here's the line ...
2
votes
1
answer
368
views
Is there a way to automatically format R code in data.table syntax?
When writing the code in data.table format as shown below
Is there a possible way of making sure that when I use the RStudio code reformatter cmd + shift + A, the code is formatted as above, instead ...
0
votes
0
answers
34
views
Changing the behavior of `View` in the .Rprofile?
Per my previous question I want to add this statement to my .rprofile to change the behavior of View:
View = purrr::partial(View, title = ".")
However this statement causes an error, I ...
0
votes
1
answer
614
views
R session does not start from Rstudio (no such file or directory)
R Session Startup Failure Report
RStudio Version
RStudio 2023.12.0+369 "Ocean Storm " (33206f75, 2023-12-17) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (...
0
votes
1
answer
295
views
Unable to render vitae package template rmd files to a PDF format:
Firstly I'd like to say that I'm new to R and R markdown. I wanted to play around with a CV template from the vitae package so I installed the package and loaded it.
Next, I picked one of them (all of ...
0
votes
0
answers
47
views
How can I move the filename section of the RStudio environment pane to see more of the filename?
I have some long filenames for my data frames. I would like to be able to see the entire filename in the "Environment" pane in RStudio. It does not matter how much I widen RStudio, the ...
0
votes
0
answers
683
views
! Text line contains an invalid character
I'm trying to compile my R markdown file as PDF but i'm getting this error,
> ! Text line contains an invalid character.
l.234 ## i Use the ^^[
]8;;http://conflicted.r-lib.org/...
0
votes
0
answers
152
views
Conditional bold font in Quarto doc, using LaTeX and kable
For one of my tables in a Quarto doc I am trying to write a conditional to bold an entire row of text if one of the values contains a specific character ("-R"). It would be in the column ...
1
vote
1
answer
262
views
Is there any way in RStudio to know from which library a particular function in a script is used? [duplicate]
I have got a R script. I want to know the library of a particular function used in the script. In python the library name is attached to the function but in R it is not.
I tried hovering the cursor on ...
0
votes
0
answers
471
views
Cannot deploy R-shiny app due to "fribidi was not found"
Local app runs fine, but I keep encountering this error when attempting to publish it.
I have already installed fribidi & harfbuzz using brew install fribidi & brew install harfbuzz on my Mac, ...
0
votes
0
answers
238
views
Quarto in Fedora: Missing .qmd File Option in RStudio
I recently installed Quarto 1.3.450 on my Fedora 39 system, following these steps, but I'm encountering an issue in RStudio. When I navigate to File > New File, the option to create a .qmd (Quarto ...
0
votes
1
answer
84
views
Using html within Quarto
I am trying to build a simple website using Quarto and I would like to know how to use html within the Quarto.
I would like to create a page which is divided in two equal parts. On the left there ...
1
vote
0
answers
66
views
Rstudio running local job produce a different effect from interactive mode when sourcing function
to reproduce this effect, we need two files,both stored in your working directory:
file1: f.R just one line:
f = function(){print('whatever you like')}
file2: execute_in_jobs.R
source('f.R')
print(...
2
votes
1
answer
406
views
Quarto shows 2 pictures with two duplicate labels in Rstudio
Background
This is my code in .qmd document in Rstudio. I'm going to write a report using Quarto document in Rstudio.
---
title: "Quarto test document"
format:
pdf:
pagesize: "...
2
votes
1
answer
568
views
How to find the file path of a Quarto-file when rendering it into a HTML-file in RStudio using the Knitr-engine?
I need to find the path to a Quarto-file (from within just that file in RStudio) to check for existing directories. This worked well so far with getSourceEditorContext()$path. But as soon as I render ...
2
votes
1
answer
2k
views
How to use Windows user credentials for proxy authentication in R/RStudio
To install packages in RStudio on my corporate network, I need to set system env variables for proxy authentication:
Sys.setenv(https_proxy_user = "userid:password")
Sys.setenv(https_proxy = ...
2
votes
0
answers
413
views
Rstudio Shortcut to Restart R Session + Run All
In RStudio there is a shortcut for Restart Session (Ctrl+Shift+F10) and another one for Run All (Ctrl + Alt + R), but I often want to do the first one followed by the second one, like in other ...
0
votes
1
answer
169
views
"Error: OutOfMemoryError (Java): Java heap space" when loading a small file with XLConnect
First of all I must say that I have long looked for a solution to my problem and that starting this thread is a desperate attempt. All the information (and their respective solutions) relate to memory ...
0
votes
1
answer
96
views
R How did Rstudio know which project to open?
I just curious on this question.
When you start a new project, and save some files, then close the Rstudio.
Next time you open Rstudio, it knows which project you are working on and will reopen it.
...
0
votes
0
answers
37
views
An error always occurs when starting RStudio
When I open RStudio, an error saying that:
Error: 1:6: unexpected input
1: setwd(
^
always occurs in the console.
I tried some solutions online, and I have removed all the .RData files, but it still ...