r/RStudio • • 23h ago

Coding help Help with gglikert_side

Post image
17 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 • • 1d ago

cuplyr: dplyr on an NVIDIA GPU

Thumbnail reddit.com
2 Upvotes

r/RStudio • • 1d 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 • • 1d 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 • • 2d 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 • • 5d 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 • • 6d 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 • • 6d 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 • • 6d 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 • • 7d 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 • • 7d ago

Soundboarding [Discussion]

Thumbnail reddit.com
4 Upvotes

r/RStudio • • 7d 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 • • 7d 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 • • 7d 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 • • 8d ago

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

Thumbnail reddit.com
2 Upvotes

r/RStudio • • 10d 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 • • 14d 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 • • 14d ago

How do I find code for doing a Brownian Bridge Movement Model? (BBMM)

13 Upvotes

I'm doing my masters in wildlife ecology and have to do a brownian bridge movement model for my analysis.

I'm not entirely new to using R, but this is my first time doing a bigger analysis on my own. My supervisor is mostly hands off when it comes to coding in R and so I feel a bit lost because I'm not sure where to start.

Is there a best method for this step? Like reading papers that have used this and then go off of their code? Or using websites like this: https://rdrr.io/cran/BBMM/man/BBMM-package.html ?

I'm just not sure how to read these instructions :(


r/RStudio • • 14d 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?


r/RStudio • • 15d ago

Cannot launch Rstudio/Bibliometrix - Independent/Early researcher

Thumbnail reddit.com
3 Upvotes

r/RStudio • • 15d ago

Coding help Question about merging columns with numeric value or NA (keeping only numeric value)

8 Upvotes

Hello!

Apologies for this possibly very silly question, but I have been trying to figure this out without the help of AI (trying to better understand what I am 'asking' code to do and avoid AI generally) and am losing my marbles a little on one likely very simple element!

I have a dataset where participants were assigned to one of 4 groups (V1, V2, V3, V4). In my Qualtrics survey, I accidentally made it so that the data output has separate columns for each question for each group, although all participants answered the same measures (were just assigned different vignettes).

I have made a variable/column for the condition assignment and have made the below columns summing the measure score for all 4 groups:

dat_clean <- AttributionQuestionnaire <- mutate(

dat_clean,

AQsum1 = V1_Q1_1 + V1_Q1_2 + V1_Q1_3 + V1_Q1_4 + V1_Q1_5 + V1_Q1_6 + V1_Q1_7,

AQsum2 = V2_Q1_1 + V2_Q1_2 + V2_Q1_3 + V2_Q1_4 + V2_Q1_5 + V2_Q1_6 + V2_Q1_7,

AQsum3 = V3_Q1_1 + V3_Q1_2 + V3_Q1_3 + V3_Q1_4 + V3_Q1_5 + V3_Q1_6 + V3_Q1_7,

AQsum4 = V4_Q1_1 + V4_Q1_2 + V4_Q1_3 + V4_Q1_4 + V4_Q1_5 + V4_Q1_6 + V4_Q1_7

)

However I am stuck on how to merge these 4 columns into one. If a person was assigned to V1, their score for AQsum2-4 columns would be NA and their score for AQsum1 column would be the numeric value. Ideally I want a column that is only the AQ scores for all participants.

Thanks very much in advance for your help!


r/RStudio • • 15d ago

Is there a package analogous to the Github Copilot extension for VS Code

11 Upvotes

I've been using GH Copilot in VS Code for some months now via corporate subscription and I wanted to see about using it in RStudio and feel a bit confused.

I've run across chattr and ellmer, but they don't seem the same as the VS Code extension where I can chat prompts and have the model write full functions, consult background data, troubleshoot, write tests, etc.

I see the comment/question bit, but nothing as full featured as VS Code.

In addition, the VS Code extension provides maybe 15 models to choose from, including an auto mode, where it provides a 10% token discount and will pick a model based on complexity. chattr looks to require setting a model... I feel a bit like a dummy, but I assumed the models available in VS Code were coming via my corporate GH Copilot license, or just generally whatever GH Copilot is partnered up with. This includes seeing notices like "Model x.y is going away starting on [date]."

Point being, there is something very "automatic/organic" with the VS Code <-> GH Copilot integration and I am not seeing it on the RStudio side.

Am I just fully misunderstanding the state of the RStudio integration or how folks use it? Is everyone doing this?

# write a function here that [description]

I'd often do a /plan session in VS Code to discuss a larger project, and then can cut it loose to scaffold things vs. having to do this as one-at-a-time prompts via comments. Thanks for any guidance.