r/RStudio • u/swoggleshhestnut • 6h ago
r/RStudio
•
u/heddie23
•
1d ago
2560x1440 Cheat sheet wallpaper with R functions I had to use for a class, with their arguments and a brief description
r/RStudio • u/motcketnoke • 1d ago
2560x1440 Cheat sheet wallpaper with R functions I had to use for a class, with their arguments and a brief descriptionhttps://i.imgur.com/1c4BRqt.jpeg
r/RStudio • u/catwoman4ever • 1d ago
Does anyone have the FULL PDF to this book to “discovering Statistics Using R 2nd Edition” (I can’t afford to buy one)? 😭
Please if anyone can help
r/RStudio • u/melinda_r • 2d ago
Coding help Help with choropleth map colors!!
Hello! I'm trying to create a choropleth map in R using plotly but I'm having a hard time adjusting the color scale setting. My main issue is that there is only one country with a high number of n_studies so the map is quite hard to look at (the numbers range from 0 to 35). Here's my code:
# light grey boundaries
l <- list(color = toRGB("grey"), width = 0.5)
# specify map projection/options
g <- list(
showframe = FALSE,
showcoastlines = FALSE,
projection = list(type = 'Mercator')
)
fig2 <- plot_geo(all_data)
fig2 <- fig2 %>% add_trace(
z = ~n_studies, color = ~n_studies, colors = "Blues",
text = ~COUNTRY, locations = ~country_code, marker = list(line = l)
)
fig2 <- fig2 %>% colorbar(title = 'Number of studies', orientation = "h", y = -0.01)
fig2 <- fig2 %>% layout(
geo = g
)
fig2Any suggestions on how I can change the color scale setting so each interval is a bit more distinct? I was thinking of maybe using a specific color for each interval (e.g., 0-5, 5-10, etc.), not sure if that makes sense.
Thank you so much!!
r/RStudio • u/crawfishly • 2d ago
I suck at this
I use R studio for a stats course in uni, but I absolutely suck at it. It makes sense in the moment if i have a step by step guide but once it's removed I seem to forget everything. Ive always been bad at computers, maybe its just me subconsciously not trying because I think im bad and just keeps me bad, but I really want to improve since I know r studio is very useful and probably will make my life easier in the future.
I'm not terrible at stats, im just really bad at computers/coding/anything to do with tech (including printers)
How do i improve? It doesnt feel intuitive at all. Is it just practice and practice and practice? It all makes me feel very stupid :/
r/RStudio • u/catwoman4ever • 1d ago
Coding help Please can someone help me with psychological research methods
I’m a psychology undergrad an assignment is due soon. I’m struggling on analysing the results. If someone can DM me that would be great.
r/RStudio • u/OldAct1956 • 3d ago
I failed to install "Git" on my Mac
When I finished installing my Rstudio on my Mac(m2), a window poped up and said I need to install "Git", but I can't install it somehow. Could anyone be nice enough to tell me how to install it?
🥹😊
r/RStudio • u/Less_Alfalfa4592 • 5d ago
Learning R in RStudio; Discussion
Hi all,
I struggled with R for a long time during my university years but managed to work through it and now work with it on a daily basis.
With this background I approached students and asked about their experiences and hear many stories along "in the R course we are asked to copy paste the code that does the PCA/ ANOVA/ GLMM etc." or "We are told not to write scripts but work in the console" and not a single course I heard about is using projects. Also everything is written in unstructured base R.
I believe many universities do it that way and am shocked how poorly even the people leading the course understand the topic. How was your journey and how could R be taught better. I imagine a course where e.g. TT datasets are explored with the tidyverse in a superficial way but setting up projects and enstablish version control for each and get experience in the basics should be key. After exploring data and the workflow are given, restructuring etc. and making good plots to communicate get into focus.
Once they have created a few dozen projects with version control and explored various datasets which have been rudimentary visualized, only then can they start with statistics which is something completely different.
The Project structure would help to share and ask specific questions, also it would allow to understand each others code better. But I want to have the clearest picture and suggestion before I ask my Uni if I could get a course or any say in the matter how R is taught.
So, how do you see the situation?
r/RStudio • u/Cheap_Anywhere_6929 • 6d ago
Coding help How to find inverse of a function
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 • u/TempeGrumble • 8d ago
Internal research group setup for Quarto?
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 • u/RnbwTurtle • 8d ago
Coding help ANOVA Statistics Help
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!
Unable to install packages
r/RStudio • u/Responsible_Rub8057 • 9d ago
R version conflict
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 • u/Mr_Maldar • 10d ago
Coding help Help with gglikert_side
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 • u/LuscasMathias • 10d ago
erro fatal no Rstudio quando tento puxar um dataframe
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 • u/Basic_You_2402 • 11d 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
reddit.comr/RStudio • u/yulianmk • 11d ago
Coding help Adding new documents to an existing topic model in R
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 • u/Kiss_It_Goodbyeee • 15d ago
Coding help md5sum hashes of file not matching
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 • u/GenIIMysteryEgg • 16d ago
Coding help Desperate for help understanding Rstudio and and how to do an ANOVA
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 • u/Bikes_are_amazing • 16d ago
Coding help Making text in my xtable smaller (r sweave document)
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")
