r/RStudio

Made a free iOS app to open and read raw Markdown (.md) files on iPhone/iPad — handy for peeking at Logseq pages outside the app
â–² 34 r/RStudio+40 crossposts

Made a free iOS app to open and read raw Markdown (.md) files on iPhone/iPad — handy for peeking at Logseq pages outside the app

Logseq stores everything as plain .md files, but if you ever open one of those files directly on iOS (from Files, iCloud, Dropbox, a backup, etc.) you just get raw text. I built a small viewer to read them rendered on a phone.

Md Preview:

• Renders GitHub-Flavored Markdown — headings, tables, task lists, footnotes

• Code blocks with syntax highlighting, plus LaTeX math and Mermaid diagrams

• Opens .md / .markdown / .mdx / .rmd / .qmd from Files or the Share Sheet

• 100% on-device — no account, no uploads, no ads, no subscriptions

Free on the App Store: https://apps.apple.com/app/id6760341080

Details: https://markdown.cybergame.ai/

Not a Logseq replacement at all — just a quick way to read loose .md files when you're away from the desktop app. Curious how you all read your graph on the go.

u/Fujima4Kenji — 22 hours ago
â–² 39 r/RStudio

Positron vs RStudio

Just curious about everyone's thoughts on the comparison between Positron vs RStudio! I have had no reason to switch, and I only see people complain about all the bugs they encounter with Positron.

reddit.com
u/Immediate_Lab3275 — 1 day ago
â–² 1 r/RStudio

R and R Studio Help

Hi everyone,
I’m really hoping someone can help because I’ve been trying to get this working for the past 4 hours with no luck.
I have a Hi everyone,
I’m really hoping someone can help because I’ve been trying to get this working for the past 4 hours with no luck.
I have a 2020 MacBook Pro M1 (Apple Silicon) running macOS Tahoe 26.5.2.

I’ve installed:
R 4.6.1 (arm64 package for Apple Silicon)
Rosetta 2
XQuartz

I also downloaded RStudio (I previously had it working on macOS Monterey before updating my Mac).
The problem is that whenever I try to start RStudio, I just get an error and it won’t open properly. I’ve followed the installation instructions exactly, but I honestly have no idea what I’m doing. I do most of my uni work on paper because I’m not very confident with computers, and I really need R and RStudio for university.
Has anyone had this issue or knows how to fix it? I’d really appreciate any help. Thank you so much!

reddit.com
u/Accomplished-Ad-5368 — 22 hours ago
â–² 5 r/RStudio

How can I grey out boxes that I don't need

Hi! I am working on making figures for my thesis. This figure is symmetrical (1:2 is the same value as 2:1. Is there a way to grey/black out repetitive boxes in R?

u/Lower-Duck-5779 — 1 day ago
â–² 1 r/RStudio

Telling R where to get data for a permanova

Hello,

I'm trying to do a PERMANOVA in R, but I don't really know anything about it. I've been given code by my supervisor (who I would ask but he's very busy with other projects). He's given notes in the code telling me what I need to do but not how to do it. I've managed to get part way through by experimenting and checking tutorials but at this point everyone seems to use a different way of coding the PERMANOVA and so I don't know how to point to specific data beyond just loading it in for this.

The specific line of code I can't get to work is:

Betadisper <- betadisper(Bray_Curtis, group = "Habitat", type = "centroid")

I know I need to tell it where to get the Habitat data from, but I'm not sure how as to my small amount of knowledge using group = "Habitat" should tell it to use the data with the name Habitat.

When I run it I get the error message Error in if (any(dist.neg > dist.pos)) { :

missing value where TRUE/FALSE needed

I've done some research and found out what the error means, but the guide I used I didn't really understand and I tried altering the code that it gave but to no avail.

Any help is really appreciated, I've been stuck on this for several days.

reddit.com
u/The-Magic-Hatter — 1 day ago
â–² 31 r/RStudio

Practicing R

I'm not sure if this is the right sub for this, so apologies if it isn't.

I need to use R for my university. I've managed to teach myself enough for the level I'm at through reverse engineering a script someone made for me, and following some online tutorials.

Most tutorials introduce you to a concept, then give you an example for how to use it. I had a look at the pinned post and from the description it seems like the resources there do that same thing. And that's useful to see how the code is used, but to me at least I feel it's limited because I'm just copying what someone did without really having to use my brain to solve an issue of how to use the code. Another issue is that I don't really know what to do to practice R.

I'm just wondering if there's a resource out there that basically give you tasks of increasing difficulties to practice coding in R?

reddit.com
u/Alex_Smith_042 — 6 days ago
â–² 18 r/RStudio

How do I update R

R is telling me that there is a new update. When I press Quit and Download, it brings me to the page where you download RStudio. Do I just redownload RStudio to update R?

reddit.com
u/mingbaboo — 6 days ago
â–² 315 r/RStudio

Weather App

Always looking to learn more R so my latest project was building a weather app for the terminal. Quite simple app to look at but is more efficient than opening a browser. Had fun making this one.

u/Fresh_Coyote312 — 8 days ago
â–² 1 r/RStudio

Need help with stacktraceon saying file is missing

I have to submit the r script as a school assignment by today, but when i did a final check to run it, it gave me this message. I tried googling and followed the instructions to adjust my work directory but it didnt work. Is this a personal problem and wont affect the laptop of my teacher whos marking me, or should i be deeply concerned? 😭

u/Gacha_SY — 6 days ago
â–² 7 r/RStudio

Help turning 2 dbl columns into 1 factor and 1 dbl column

For reference the picture above is what im working with. And what i have in mind is transforming the two into one variable for "fixed" or "volatile" acidity, and the other variable to state the numeric value of the acidity. Unlike now where both are shown to be numeric.

u/Gacha_SY — 8 days ago
â–² 6 r/RStudio

How to replace all the values in a column with another value ?

Hi there, I have a column containing either A or B as chr values and I want to convert them in order to have A = 1 and B = 2, both as numeric values. Do you know any function I can use to do that ? Thank you very much for your respons !

reddit.com
u/Arbousier83 — 8 days ago
â–² 1 r/RStudio

Database it's not loading.

Hello! I'm a student, and I find myself working with a big database approximately 2 GB. I created R.proj, but I have a problem with my database not loading. Furthermore, I have tried running the code several times. Besides, when I try to open Google Chrome, I cannot because of memory RAM.

Has anyone else had problems? Any recommendations?

https://preview.redd.it/rj17uy6x7cah1.png?width=772&format=png&auto=webp&s=9251a9ce48d51e406d0e8c4543b6c0160d0124dd

reddit.com
u/JabesFrias — 8 days ago
â–² 8 r/RStudio

Package for downloading data from geostationary satellite?

Hi, I want to download land surface temperature data from geostationary MTG satellite. These are 10 minutes data. I Googled online if there is any package that can help me do that but I couldn't find anything useful.

Any recommendations?

reddit.com
u/Nicholas_Geo — 11 days ago
â–² 9 r/RStudio

Linear and Quadratic Regression Models

Hi, I am currently writing a Uni paper that looks into how worsening housing conditions affect the vote share change of the incumbent party in US presidential elections.

So far, I've established with regressions that worsening housing conditions negatively affect the incumbent (statistically significant, robust effect).

But when I did a fitted residuals plot, the plot shows a clear curve. This leads me to believe that the nonlinear assumption of my basic models is not correct and the effect is nonlinear.

I then ran the same model but added a quadratic factor, and it is also statistically significant and has a way higher (like over 10x and positive) regression coefficient than my linear models.

However, I am not quite sure as to how to proceed now. I have never done quantitative analysis on such a level, and I am unsure whether the nonlinear model only adds complications. But the fitted residual and statistical significance leads me to believe that the nonlinear model is the better model, that tells the whole story.

I would greatly appreciate it if someone who was more experience with things like this, would provide me with typical steps to determine if my choice was right.

Also I am aware that the model is quite basic, but my prof advised me to make my model less detailled and just be transparent in the limitations. I am in my bachelor's.

If this helps, the regression results are:
Linear:
OLS estimation, Dep. Var.: inc_diff

Observations: 8,907

Fixed-effects: factor(NAME): 1,733,  factor(Year): 3

Standard-errors: Clustered (STATE)

Estimate Std. Error  t value  Pr(>|t|)   

OACB_diff -0.092745   0.029711 -3.12155 0.0030744 **

MHI_diff   0.003187   0.001762  1.80878 0.0768852 . 

---

Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RMSE: 0.031982     Adj. R2: 0.282804

Within R2: 0.008405

Nonlinear:
OLS estimation, Dep. Var.: inc_diff

Observations: 8,907

Fixed-effects: factor(NAME): 1,733,  factor(Year): 3

Standard-errors: IID

Estimate Std. Error  t value   Pr(>|t|)   

OACB_diff         -0.053746   0.014853 -3.61843 2.9843e-04 ***

I(I(OACB_diff^2))  1.398048   0.207885  6.72509 1.8899e-11 ***

MHI_diff           0.003150   0.000943  3.34006 8.4187e-04 ***

---

Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RMSE: 0.031881     Adj. R2: 0.287201

Within R2: 0.014621

&gt; 

https://preview.redd.it/45eveztrq69h1.png?width=863&format=png&auto=webp&s=64774a0d72e582a1bb473e99e155f8c896d9227d

https://preview.redd.it/9hnxbw61r69h1.png?width=861&format=png&auto=webp&s=91d9f7c55b4cec1770a84876c1f9066977ce3da6

reddit.com
u/aceyosh_ — 14 days ago
â–² 21 r/RStudio+1 crossposts

nmathopencl + opencltools packages now on CRAN: GPU-accelerated R Mathlib functions via OpenCL for package developer

Happy to share that nmathopencl has just appeared on CRAN, joining opencltools which went live earlier. Both are aimed at R package developers who want to bring OpenCL GPU acceleration into their packages without building the infrastructure from scratch.

What they do

  • opencltools provides the OpenCL scaffolding for R package developers — device detection, kernel compilation, buffer management, and a clean C++ API that other packages can link against via LinkingTo.
  • nmathopencl ports ~137 R Mathlib functions (probability distributions, special functions, etc.) to OpenCL C, so they're callable from GPU kernels. If you're writing statistical or numerical computing packages and want to offload to the GPU without reinventing distribution math, this is the layer that handles it.

Why it might matter

Most GPU-accelerated R work either wraps Python/CUDA tooling or reimplements distribution functions from scratch. This approach keeps things in the R ecosystem natively, uses OpenCL (so it's not NVIDIA-only), and exposes a LinkingTo interface so downstream packages can build on top without vendoring the math.

Accessing

Navigate to CRAN and access the nmathopencl and opencltools packages there. The packages are also available on R universe (with nicely formatted documentations) and on GitHub for source code.

  • Would love feedback from anyone doing numerical computing or building packages that need GPU acceleration. Happy to answer questions about the OpenCL-in-R workflow, which has its quirks.
reddit.com
u/Bucksswede — 13 days ago
â–² 0 r/RStudio

¿Cómo iniciar Rstudio?

Muy buenas a todos, soy nuevo en usar este software. Algún consejo en usarlo? Y hay alguna desventaja al no tener conocimiento en informática? Recientemente me estoy incorporando en esta plataforma debido que lo usaré en mi área profesional.

Se los agradecería mucho y estaré al pendiente con sus respuestas ;)

Muchas gracias por aceptarme en este grupo :D

reddit.com
u/RangeOrange97 — 13 days ago
â–² 6 r/RStudio

Getting previous value in a group

Hi, I was wondering how i could obtain the value from the previous row in a group.

In the example below i set time_number2 to have the first value in status for each group. This would be what i want if all groups had only 2 rows, but with 3+ rows in a group I instead want the value from the previous row.

Does anyone have ideas to lead me in the right directions? Thanks in advance.

MRE below

library(survival)
library(tidyverse)
lung &lt;- lung
test &lt;- lung %&gt;% 
  arrange(inst,time) %&gt;% 
  mutate(number = 1) %&gt;% 
  mutate(time_number = cumsum(number)) %&gt;% 
  relocate(time_number) %&gt;% 
  group_by(inst) %&gt;% 
  mutate(time_number2 = status[1]) %&gt;% 
  relocate(time_number2)
reddit.com
u/Bikes_are_amazing — 13 days ago