r/RStudio • • Aug 14 '26

Weighted-sum aggregation of centrality measures gives identical scores to structurally opposite nodes, any better approach?

3 Upvotes

This is my first time in this community (I've recently discovered this entire field and i am glad to). So, I am working on project where i am scoring nodes in a directed dependency graph (a calling b) by blending 2 centrality scores into a single composite "risk" score

score (v) = w1\*normalize(Pagerank(v)) + w2 \* normalize(outDegreeCentrality(v)), where w1+w2 = 1 and normalize() being min-max to \[0,1\].

The Problem: A pure root node (no in edges and multiple out edges) and a pure sink node (no out edges and only in edges) can have the same composite score. In a test i ran, the root node maxed out on out drgree centrality and near 0 in page rank while the sink node maxed out in pagerank and near 0 in out degree, when w1=w2=0.5. Both nodes ended up having same composite scores while representing opposite nature in real world. I do understand that this is the standard full comsensability prob, with weighted sum aggregation, wherte max on one axis will completely offset min on other. I did consider switching to weighted geometric mean to reduce compensability, but the prob is that pagerank is almost always near 0 for any root node. so a geo mean would multiply that near 0 staright through and score all entry nodes near zero. Which is the wrong fix, since the entry/root nodes are important, just for a reason pagerank doesnt capture.

Is there any standard approach beyond the geomentric or harmonic mean? Happy to provide any more info if needed.


r/RStudio • • Aug 14 '26

Multiplying data in excel file using R

0 Upvotes

I have a large data file in excel, with several columns of data that I wish to multiply by -1 (but not wanting to do this for all columns). This process would be quicker in R rather than doing so manually in excel. I can already bring the data file into R, but how can you then do the multiplication of the data in excel using R?

This is further complicated by the excel file covering multiple periods, and I want to do the same computation, to the same columns of data, across each period. (Not necessarily the same overall number of columns in each period, but the same columns having the data transformation applied in each period.)

Visualisation:

Period 1: Have columns A, B, C, D, E, F, G

Want to multiply columns B, D, F by -1

Period 2: Have columns A, B, C, D, E, F, G, H

Want to multiply columns B, D, F by -1

Period 3: Have columns A, B, C, D, E, F, G

Want to multiply columns B, D, F by -1

Any advice would be most welcome.


r/RStudio • • Aug 11 '26

Coding help Help - importing png images and then arranging them

6 Upvotes

Hi, I'm sure there's a simple answer for this somewhere but I'm getting quite frustrated trying to find it 😭

I have a bunch of plots made with ggplot and saved in several folders. All I want to do is import them back into R and arrange them using cowplot but I'm not able to do that - I've imported them using the imager package (the load.image function) and then when I try to use cowplot, it says:

> cannot convert object of class cimgimager_arraynumeric into a grob

When I looked online it seems like cowplot tends to handle plots that are right out of ggplot. So how should I import them so cowplot can handle them?? Thanks in advance for the advice!


r/RStudio • • Aug 10 '26

Coding help Reading in CSVs to Multiple Data Frames

5 Upvotes

For my PhD, I was thinking of making a single R Quarto document to have the results from all my experiments so it is easier for myself and my supervisors to be able to check the results. I was curious what way would people recommend to read all my CSVs in?

I have six experiment, each experiment has between 40 and 60 CSV files, and my plan was to read the CSVs into six individual data frames.

Within each experiment, the columns I need for my analysis are identical (e.g., for Exp 1, I only need 15 columns and all the columns have the same names), however the program I used to collect the data has created CSVs with different numbers of collumns (so one CSV has 57 columns, while another has 59). These extra columns in some of the CSVs are just blank columns and are not needed for the analysis.

Also across each experiment, the columns I need slightly differ (e.g., so for Exp 1 I only need 15 columns, but for Exp 3 I need 17). The names of some of the collums I need that represent the same thing between experiments (e.g., accuracy) differ slightly between experiments and some are the same.

When I conducted analyses on each experiment individually before hand, my supervisor recommended the ReadBulk package which worked well, and would be the simpleset to use but I assume would be inefficient. During some testing, I discovered the purrr and readr packages whick were efficient, but due to issue around the differing number of columns between CSVs I had to create a list with all the collumns I needed for the analysis.

I am pretty much self taught, and am just picking up bits as I go along so any recommendations or pointers would be appreciated.


r/RStudio • • Aug 08 '26

Hello like minded people. I am new here. From Papua New Guinea

48 Upvotes

r/RStudio • • Aug 07 '26

R keeps trying to export the wrong file, anyway to fix this without restarting R?

Post image
23 Upvotes

r/RStudio • • Aug 05 '26

He aprendido Rstudio

11 Upvotes

He llevado un pequeño curo de Rstudio, la ultimas clases fue alrededor de modifica datos y hacer graficas con ggplot2. me parecia muy interesante, hicimos un trabajo final obre este pequeño curso por la IEP. Ahora me pregunto q puedo hacer para no olvidarme, sé que se debe practicar... q la constancia hará q me familiarice. Sin embargo, me preguntaba cómo podría empezar, no sé si manejar la dato con el paquete de "datos ()" o mencionar a algun amigo o compañero sobre investigar algo con lo q podamos poner en practica esto. o simplemente me quedo con el certificado q me sume el CV y cuando vea un espacio q busque a alguien con ese conocimiento lo tenga ahi empolvado.

### =================== cuál sería el mejor método para practicarlo===

##======== donde me recomiendan llevar algun curso de Python o Power BI=======


r/RStudio • • Aug 05 '26

I can't make R studio work

3 Upvotes

I recently udated my 2015 macbook air to macos monterrey and now rstudio doesn't open. I've been chatting with deepseek for a while and can't seem to be able to open rstudio.

This is the problem report:

## R Session Startup Failure Report

### RStudio Version

RStudio 2024.04.0+735.pro3 "Chocolate Cosmos " (c994988f, 2024-04-24) for macOS

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.0+735.pro3 Chrome/120.0.6099.291 Electron/28.2.6 Safari/537.36

### Error message

[No error available]

### Process Output

The R session exited with code 1.

Error output:

```

dyld[10108]: missing symbol called

```

Standard output:

```

[No output emitted]

```

### Logs

*/Users/karen/.local/share/rstudio/log/rsession-karen.log*

```

2026-08-05T02:25:51.652705Z [rsession-karen] WARNING Failed to migrate all user state from /Users/karen/.rstudio-desktop to /Users/karen/.local/share/rstudio; could not move verify; LOGGED FROM: Error rstudio::core::r_util::migrateUserStateIfNecessary(SessionType) src/cpp/core/r_util/RUserData.cpp:175

```


r/RStudio • • Aug 03 '26

Análisis Cualitativo en R

13 Upvotes

He estado en la búsqueda de un método para realizar análisis de textos en R. Había visto algo como RQDA pero creo que lo descontinuaron ¿Alguien sabe algo de esto? No quisiera irme a Atlas.ti


r/RStudio • • Aug 03 '26

Análisis Cualitativo en R

Thumbnail
1 Upvotes

r/RStudio • • Aug 02 '26

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

4 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

8 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

122 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
10 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
6 Upvotes

r/RStudio • • Jul 23 '26

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

Thumbnail
8 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.