r/RStudio • • 16h ago

Coding help How to find inverse of a function

5 Upvotes

Hi everyone! I've just began using R for Mathematical Statistics, where I often have to find the quantiles of a probability. For that I need to find the inverse of the cdf, which are often too complicated to solve by hand. I tried using R, but when I searched up the code for the inverse in the help articles, I didn't find any notes on how to specifically find the inverse of a function, whether univariate or multivariate. How do I go about in this instance? And as a seperate question, if it's not too much: how do I plot multiple graphs in one window? Thanks in advance!


r/RStudio • • 2d ago

Internal research group setup for Quarto?

10 Upvotes

Small university research group (2 faculty, 1 doc student), where we're mostly used to passing .Rmd (and output .html) files back and forth. (We don't use Rmarkdown to generate files for external use right now; this is for internal "this is what I'm doing in this process" communications.)

I know that Rmarkdown is no longer being updated, and I'm wondering how painful a transition to Quarto would be. We're currently using a shared Dropbox folder, so yeah, I know you'll advise us to switch to git for versioning control etc. Anything else to keep in mind?


r/RStudio • • 2d ago

Coding help ANOVA Statistics Help

4 Upvotes

Hello RStudio community!

I'm a graduate student trying to conduct an ANOVA on some data I have; it is 5 columns of data all outlining the density of bats in a cave, with the number of samples per opening ranging from 15 to 30 samples. I'd like to conduct a 1 way anova due to the variance in samples and also the relatively low sample size per opening.

I'm trying to use the aov() function, but I'm not sure how to use all 5 columns (might it be easier to shift it around to have the openings as row headers?) at once for my ANOVA.

Thanks in advance!


r/RStudio • • 2d ago

Unable to install packages

7 Upvotes

Hello, my teacher had shown us last year how to install packages with a little code he gave us but this year, it's not working for me on my new pc any help?


r/RStudio • • 3d ago

R version conflict

6 Upvotes

Hey folks,

Did anyone here face the issue that your machine is either forcing a specific version of R, or completely removing the program files for any other version/all versions you have? I have been facing this issue for a while now, where I'm actively using 4.5.3, but then at some point the program files and all the installed packages just disappear. My institution's IT department suggested it was a conflict with the newest version, but even after erasing everything R-related from my laptop, the issue persisted, even erasing the newest version, and re-installing the specific version i need, it happened again and misteriously the newest version was present again.

I got a temporary solution which is currently working (external R installation, basically plugging usb every time i need to use it), but it is very annoying and I would like to finally close this issue.

Technical points if it matters: windows 11 (institutional), built in software center (which does offer some even older version of R), version i need that keeps getting deleted 4.5.3, version being forced 4.6.1. Files are not being removed by protection software, it is deeper.

I am mostly wondering if someone had similar issues, and how did you resolve them.

Thanks in advance!


r/RStudio • • 4d ago

Coding help Help with gglikert_side

Post image
19 Upvotes

Attempting to make a likert graph using the likert package. Have successfully got a graph with the correct data but the side graph is squished to the side. I followed instructions online and no one seems to have this issue and i cant find any variables that would affect this.

If anyone has any suggestion I would greatly appreciate the help.

My code is:

> gglikert_side(Travel,
+               reverse_likert = TRUE,
+               labels_accuracy = .9,
+               add_totals = FALSE,
+               y_label_wrap = 20,
+               side_values = "No Answer",
+               symmetric = TRUE,
+               width = 1)+
+     ggtitle("...Was an important reason for travel")> gglikert_side(Travel,
+               reverse_likert = TRUE,
+               labels_accuracy = .9,
+               add_totals = FALSE,
+               y_label_wrap = 20,
+               side_values = "No Answer",
+               symmetric = TRUE,
+               width = 1)+
+     ggtitle("...Was an important reason for travel")

r/RStudio • • 4d ago

erro fatal no Rstudio quando tento puxar um dataframe

4 Upvotes

Sou bem iniciante no R, comecei a estudar faz uns 2 meses.
Tenho tentado usar o R para Ciência de Dados (2 edição). Porém, logo em uma das primeiras coisas que pedem para fazer meu R esta dando erro fatal.

Em "1.2.1 O data frame pinguins" pede para puxar dados::pinguins. Mas meu R da erro fatal.
Instalei o pacote "dados"

> library(dados)

Mensagen de aviso: pacote ‘dados’ foi compilado no R versão 4.6.2

mas qualquer interação que tento fazer com esse pacote da erro fatal.

Alguém consegue me ajudar com isso?


r/RStudio • • 4d ago

cuplyr: dplyr on an NVIDIA GPU

Thumbnail reddit.com
2 Upvotes

r/RStudio • • 5d ago

I built tawjih (LLM-tawjih-Model-building): A zero-dependency, single-file Python tool to manage LLM knowledge in 3-sided trees and run branching workflows across them

Thumbnail reddit.com
0 Upvotes

r/RStudio • • 6d ago

Coding help Adding new documents to an existing topic model in R

4 Upvotes

I'm quite new to topic modeling and R.

I have made a topic model in R using the topic modeling package, and I was wondering if it is possible to add new documents to an existing model without having to retrain the entire model from scratch.

Is there a way to do this while keeping the original topics intact? If so, which packages or methods would you recommend?

Thanks in advance for your help!


r/RStudio • • 9d ago

Coding help md5sum hashes of file not matching

5 Upvotes

This should be straightforward, but am struggling to get this to work. I've tried the digest and openssl libraries and neither matches what I get on the commandline.

Obviously the first thing to get right was to ensure I wasn't just hashing the filename (d'oh!). With the digest function I used this:

digest(file(system.file("myfile")), "md5")

Which concerningly returns a different result each time it runs.

With the openssl md5() function I ran:

md5(file(system.file("myfile")))

Which at least is consistent, but only returns the serialised output and doesn't match the output I get on the commandline with md5sum (on macOS).

Help. How do I get an md5sum in R that matches what I get on the commandline? NB: I don't want to do a system call as this needs to be cross platform.


r/RStudio • • 10d ago

Coding help Desperate for help understanding Rstudio and and how to do an ANOVA

32 Upvotes

I am a physiology grad student who has never taken a statistics course or anything. I am genuinely desperate for any help at this point and if anyone at all is willing to zoom with me to help, even for just five minutes, I would greatly appreciate it


r/RStudio • • 10d ago

Coding help Making text in my xtable smaller (r sweave document)

4 Upvotes

Hi.

I wanted to have smaller text in my table. I used \tiny but it did not seem to work. What am I doing wrong?, and how would you guys reccomend getting smaller text in a table?

MRE

\documentclass{article}
\begin{document}
<<package, include=FALSE>>=
library(xtable)
library(survival)
@

<<data,include=FALSE>>=
lung <- lung
@
\tiny
<<table, echo=FALSE,results='asis'>>=
xtable(lung)
@
\end{document}

EDIT: I think i figured it out with

table <- xtable(lung)

print(table, size="\\tiny")

r/RStudio • • 10d ago

Remedy for statistically significant interaction term in Schoenfeld residual (programming in R) [thesis]

0 Upvotes

Dear all!

I am conducting a Cox proportional hazards analysis and tested the proportional hazards assumption using Schoenfeld residuals. Two interaction terms between predictors showed statistically significant results, suggesting that these effects may vary over time. I am therefore unsure which approach would be most appropriate in R to address this.

Would tt() be suitable in this case? Would it work for interaction terms?

Initially I was thinking of tmerge(), but that doesn't work because this would only work if it is the treatment, right? (although the interaction is between treatment group and an intake variable).

I initially also thought of using strata(), but I guess that's only for categorical variables?

I would be very grateful for any advice on how to handle this appropriately in R, and what remedy there is. Recommendations for relevant literature would also be very welcome.


r/RStudio • • 10d ago

RgentAI (Cheaper Posit Assistant Alternative in RStudio)

14 Upvotes

I founded RgentAI over a year ago. It was the first AI inside RStudio before the Posit Assistant release. After the release of Posit Assistant and my PhD keeping me extremely busy, I did very little marketing and development for RgentAI. Surprisingly, it kept getting new users anyway, so I took a closer look at the market...

Posit costs twice as much ($20 vs $10) and gives you less usage. No wonder we were getting new customers! That told me Rgent was worth investing in, so I spent the last few weeks adding new features and reworking it.

The short video below shows the new features, look, and experience! If you're looking for a cheaper alternative to Posit Assistant with more usage inside RStudio, this could be worth checking out!


r/RStudio • • 11d ago Bravo

I made this! FigureIDE : New IDE for R with vector graphic editor

20 Upvotes

I've been developing FigureIDE, open-source desktop application for creating and editing scientific figures using R.

FigureIDE is built on the open-source VectorCraft project, with AI tools(Thanks to Codex and Gemini).

The first Windows beta is now available!

GitHub: https://github.com/newkor3185-blip/FigureIDE

Demo Video: https://youtu.be/ay1fmnCTgsg

I'm still improving the software and would really appreciate feedback from you.
Contributions are also welcome!


r/RStudio • • 11d ago

Soundboarding [Discussion]

Thumbnail reddit.com
4 Upvotes

r/RStudio • • 11d ago

Remedy for statistically significant interaction term in Schoenfeld residual (programming in R) [thesis]

3 Upvotes

Dear all!

I am conducting a Cox proportional hazards analysis and tested the proportional hazards assumption using Schoenfeld residuals. Two interaction terms between predictors showed statistically significant results, suggesting that these effects may vary over time. I am therefore unsure which approach would be most appropriate in R to address this.

Would tt() be suitable in this case? Would it work for interaction terms?

Initially I was thinking of tmerge(), but that doesn't work because this would only work if it is the treatment, right? (although the interaction is between treatment group and an intake variable).

I initially also thought of using strata(), but I guess that's only for categorical variables?

I would be very grateful for any advice on how to handle this appropriately in R, and what remedy there is. Recommendations for relevant literature would also be very welcome.


r/RStudio • • 11d ago

Can Existing Local Shiny Apps Be Deployed Through Dataiku Without Using Its Low-Code Features?

7 Upvotes

Our company uses Dataiku, and I'm exploring whether it could serve as a deployment platform for several R Shiny applications I've already developed and currently run locally.

I'm not interested in Dataiku's no-code or low-code development capabilities. My goal is simply to deploy my existing Shiny applications so that other employees can access them through a web browser.

Unfortunately, we don't have access to Shiny Server, Posit Connect, or shinyapps.io.

I've come across several Dataiku articles highlighting its deep integration with R and support for web applications built using frameworks such as Shiny, Dash, and Bokeh.

https://doc.dataiku.com/dss/latest/R/index.html
https://doc.dataiku.com/dss/latest/webapps/shiny.html

I have a few questions:

  1. Deployment feasibility: Can an existing, fully functional R Shiny application be deployed directly through Dataiku without substantially modifying its code?
  2. R package dependencies: My applications depend on numerous R packages. Can these be installed within Dataiku, or would IT administrator privileges be required?
  3. Deployment process: How straightforward is the deployment process? Can I upload my existing app.R file and supporting files, configure dependencies, and publish the application?
  4. Licensing and permissions: Does hosting Shiny applications require additional Dataiku licenses, plugins, or administrative configuration?

When running these applications locally, I've generally been able to install R packages without administrator privileges. I'm particularly interested in whether Dataiku offers similar flexibility.

Has anyone successfully deployed existing R Shiny applications through Dataiku? How does the experience compare with using a dedicated Shiny hosting platform?


r/RStudio • • 12d ago

Remedy for statistically significant interaction term in Schoenfeld residual (programming in R) [thesis]

Thumbnail reddit.com
2 Upvotes

r/RStudio • • 14d ago

Coding help STATISTICAL LEARNING aiuto

11 Upvotes

Ciao a tutti/e, faccio la magistrale in International Management a Pavia e sto avendo problemi con il corso di Statistical Learning il quale consiste nell’utilizzo di Rstudio per creare modelli adatti ad interpretare i dati.
Qualcuno saprebbe dare una mano? (Appunti, approccio allo studio, qualsiasi cosa🙏🏼)


r/RStudio • • 18d ago

Coding help Factor vs component: I need help!

5 Upvotes

Hi all,

I am analyzing some data from a questionnaire. I have never done this before and I feel confused.

pa <- psych::fa.parallel(
EnglishDom_vars,
fm = "ml",
use = "pairwise",
n.iter = 1000)

The output (R studio) gives

Parallel analysis suggests that the number of factors = 3 and the number of components = 1

Can someone explain the difference between a factor and a component?

Thanks!


r/RStudio • • 18d ago

Studium rin Modul mit R

15 Upvotes

Hi, ich wollte mir einen laptop fürs Studium kaufen. Wir haben im 2. Semester ein Modul Statistik, wo wir mit R arbeiten und die Prüfung auf windows haben. Meine frage ist jetzt: wenn ich die ganze zeit auf dem Macbook üben würde, hätte ich dann Schwierigkeiten die Prüfung in R auf dem windows pc def Hochschule abzulegen?