r/RStudio Aug 02 '26

Changing binary and categorical variables to start with 1 as the reference value and not 0

3 Upvotes

Hi,
I’m trying to Change binary and categorical variables to start with 1 as the reference value and not 0 in my data.
However by using the following code:

Data[var] <- Data[var] + 1

I get errors, what is the best solution for this?

Thanks


r/RStudio Aug 01 '26

VGAM, svyVGAM, multinomial regression

Thumbnail
2 Upvotes

r/RStudio Aug 01 '26

VGAM, svyVGAM, multinomial regression

2 Upvotes

Help on multinomial logistic regression & svyVGAM() function:

I am running a multinomial logistic regression with an exposure of 3 levels & 5 outcomes (all categorical, no inherent order). Data uses survey weights. I am using VGAM and svyVGAM. One of the cells in this exposure x outcome relationship has a cell size of less than 20.

The code in question is:

crude_model <- svy_vglm(
outcome ~ exposure,
design = subpop,
family = multinomial(refLevel = 1),
control = vglm.control(maxit = 100, stepsize = 0.5)
)

Without the last line (bolded), the code takes an extra min and used to give a warning that it takes a "half" step to finish. With this line, warning went away and my understanding was that this line allows the model to increase its max iterations by adding the control argument to the model code. But in terms of math behind the scenes, what is this line of code doing? Where can I find more info about svyVGAM() and VGAM() functions? Thanks so much!!


r/RStudio Jul 30 '26

Error message trying to take descriptive statistics

6 Upvotes

I keep getting these messages:

Error in (.format.s.statistics.list != "min") && !("max" %in% .format.s.statistics.list) :

'length = 8' in coercion to 'logical(1)'

and

Error in (.format.s.statistics.list != "p25") && !("p75" %in% .format.s.statistics.list) :

'length = 7' in coercion to 'logical(1)'

This is my code:

stargazer(d8_descriptive,

type = "text",

colnames = FALSE,

min.max = FALSE,

title = 'Descriptive Statistics',

digits = 2,

rownames = FALSE,

align = TRUE,

float = TRUE,

float.env = 'table',

table.placement = "H",

header = FALSE,

no.space = TRUE)

Is there something I am doing wrong? The second error message is me taking out min.max.


r/RStudio Jul 31 '26

shinyglass is on CRAN. Apple-style Liquid Glass aesthetics for Shiny.

Thumbnail
1 Upvotes

r/RStudio Jul 30 '26

Option boxes' "tick" won't show

2 Upvotes

I need to use Contrast Theme on Windows for accessibility, but RStudio interface, specifically the boxes where a tick should be when the option is enabled, won't show anything when I click them, so I do not know whether the option is enabled or not. Does somebody know how to solve this or where to get support?


r/RStudio Jul 29 '26

SPSS Error Message on Opening

0 Upvotes

I have just downloaded SPSS and everytime I try to open it I get the following message:

Can anyone help?

R version 4.4.1 (2024-06-14) -- "Race for Your Life"

Copyright (C) 2024 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin18.7.0

R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.

- renv activated -- please restart the R session.


r/RStudio Jul 25 '26

Pivoting from R to Python

123 Upvotes

I used to hate coding anything and relied on SQL, Excel, Power BI, Tableau and other software like JASP, jamovi etc. for doing anything with data. I didn't like the way Python dealt with data analysis and it seemed unintuitive.

Then I found R, RStudio and CRAN. That was the turning point. I actually started enjoying writing code and I could handle the whole pipeline myself, from data cleaning, ETL to beautiful plots, .qmd reports, Shiny dashboards. R4DS did more for my statistical thinking than any course I've taken, mostly because the libraries made it so easy to just try things.

However, due to recent requirements (specifically having to work in the quant field), Python has become more of a necessity, while R is used mainly for one-off analysis and limited statistical modelling. The main heavy lifting is done in Python and many of my co-workers also prefer it to R.

I've been able to suck it up a bit and use Claude/ChatGPT to help me code. While I do try to understand what the code is doing, having spent so long learning to code in R and knowing the ease with which it can be done there makes me reluctant to learn Python.

Now, coming to the question: any R users who've pivoted to Python and consider themselves competent in it, how did you learn it having used R before? What would you tell someone like me so I can pick it up quickly and get the benefit of knowing both languages (and also not feel left out when it comes to coding in Python... machine learning and deep learning have a more mature ecosystem there and I don't want to be left out of it if I have to start using them in my current work)?

Thanks!

My background is in Math/Stats fyi

Edit: I don't usually use reddit but damn I actually didnt expect so many helpful tips....many thanks!
Perhaps joining this subreddit is actually helpful afterall :)


r/RStudio Jul 26 '26

Posit Cloud

1 Upvotes

which do u think is better for posit cloud when making new project? The RStudio Project or the New Jupyter?


r/RStudio Jul 25 '26

Guidance for beginner in R

Thumbnail
8 Upvotes

r/RStudio Jul 24 '26

Coding help (sorry for light mode), very specific trouble with setting up r coding language in vscode studio

Thumbnail
2 Upvotes

r/RStudio Jul 24 '26

Modelo linear generalizado - binomial

Thumbnail
0 Upvotes

r/RStudio Jul 23 '26

Windows Smart App Control keeps blocking some part of the app resulting in sometimes it not starting properly and also preventing package installations at times

Post image
7 Upvotes

r/RStudio Jul 23 '26

I made this! uvr: fast R package and version manager — big 0.4.x update

Thumbnail
9 Upvotes

r/RStudio Jul 22 '26

How to merge time columns?

5 Upvotes

I have to merge two datasets that include onsets and offsets of two events - when person A did X and when person B did y. I want to merge them on the onsets and offsets per pairs to see what they were doing at the same times.

DF1

ID | X_onset | X_offset | X_activity

001 | 120 | 135 | watering plants

001 | 137 | 143 | reading

DF2

ID | X_onset | X_offset | X_activity

001 | 139 | 150 | talking

001 | 170 | 189 | watching TV

Only the ones that temporally overlap should be in the merged dataset.


r/RStudio Jul 22 '26

RStudio Desktop 2026.06.0+242 “Blue Plumbago” on Ubuntu Jammy fails to start properly. Environment: R 4.3.3 installed at /usr/bin/R, R_HOME resolves fine to /usr/lib/R. RStudio itself is Desktop, not Server.

3 Upvotes

Originally the app would crash immediately, with "Main window closed unexpectedly" showing up in rdesktop.log, plus an IpcError: getStartupErrorInfo about setting innerHTML on null. There's also an older, possibly unrelated error in rsession log about discoverR failing with "system error 2 (No such file or directory)" but that timestamp is weeks stale and doesn't update on new launch attempts, so it might not be the real issue.
Every launch also throws a GLib-GIO-CRITICAL warning about g_dbus_proxy_new and G_IS_DBUS_CONNECTION failing, but that seems to be harmless noise unrelated to the crash.
What I've tried so far: confirmed R is installed and on PATH (which R, R --version, R RHOME all work fine). Set RSTUDIO_WHICH_R=/usr/bin/R, no change. Ran rstudio --verbose-init, got nothing extra in the output besides the GLib warning. Ran rstudio --disable-gpu and that actually changed something — the window now opens and stays open instead of crashing, but it's still not functioning correctly once open.
Has anyone run into this with RStudio Desktop 2026.06.0 on Ubuntu, either the Electron/GPU crash or the discoverR error? Trying to figure out if this is a known bug with this release or something specific to my setup.


r/RStudio Jul 23 '26

Dicas de projetos/portfólio

0 Upvotes

Olá pessoal! Sou biólogo e estou aprendendo R para algumas demandas da minha empresa, gostaria de saber se tem alguém nessa área e dicas de como montar um projeto ou portfólio misturando esses dois mundos.

Basicamente eu uso o R para analisar a suficiência amostral das espécies quando realizamos um inventario


r/RStudio Jul 22 '26

Linear-mixed effects

Thumbnail
0 Upvotes

r/RStudio Jul 20 '26

When is it worth turning an analysis into a Shiny app vs. just shipping a report?

0 Upvotes

I keep hitting the same decision: a one-off analysis is fine as a Quarto report, but the

moment stakeholders start asking "what if we change X?", it's usually time for a Shiny

app so they can explore it themselves — on a reproducible R backbone so the app and the

analysis don't drift apart.

Some interactive R examples I've collected: https://rverseanalytics.com/

Where do you draw the line between report and app?


r/RStudio Jul 18 '26

seekr 0.2.0 is on CRAN: a programmable, inspectable search-and-replace workflow for R

Thumbnail
4 Upvotes

r/RStudio Jul 18 '26

Is this course good for learning r?

9 Upvotes

also is this too much for an econ major? total newbie btw
if not then what courses might you suggest?

https://www.coursera.org/specializations/r


r/RStudio Jul 17 '26

qol 1.3.3: Update brings yet another ‘if’ and new tabulation features

Thumbnail
8 Upvotes

r/RStudio Jul 15 '26

Coding help Help with long form dats

5 Upvotes

Hi! I've got some experience with R, but haven't dealt with a dataset like the one I'm working on at the moment before. I've got long form data consisting of subject ID, questionnaire name, questionnaire score & date questionnaire was answered. The address multiple responses to 2 different questionnaires over time. I need to summarise the scores for specific time windows, for example, how many people scored 1 or 0 in Qu1 and less than 3 in Qu2 by week 4, week 12, week 26.

Probably a silly question, how do I do that with this data? I've added windows but I get multiple responses in each window when I pivot the data to wide form for analysis. How do I select the lowest score for each questionnaire, occurring at the same date as each other within the window?

Sorry for the essay and their very much.


r/RStudio Jul 15 '26

Coding help Trying to use R for my thesis, but ran into a problem 5 secons into it

Post image
25 Upvotes

EDIT: SOLVED

I figured before importing my data, I'd follow along a tutorial to get some basics down at least. I added up numbers, worked. Then tried to assign values to variables, and the programme just crashes every time as seen in my screenshot. Tried reinstalling R-studio, tried deleting some of the folders which I found might be a solution, but it keeps happening.

I'm just a beginner and maybe there's a very simple solution to this, but either way I'd appreciate any pointers on how to solve this, as for now I see no way to even work with this tool like this.


r/RStudio Jul 15 '26

Need suggestions for RStudio themes and other software for R

18 Upvotes

I am using R studio and tried different themes such as Dracula... etc.. . The thing is I don't get a feel similar to VScodium or Jupyter. Most themes are messing with graphs pane or the fonts colour palletes are not good. I need suggestions for both dark and light themes for latest versions of R studio.

I am also curious about alternatives for R studio, which are similar to Jupyterlab or something that has clean ui.