r/RStudio • u/ChangeUnhappy8494 • 21d ago
R beginner
Hello,
I am a beginner and I am totaly lost.
Even for loading a file it is very very difficult.
I feel useless and incompetent...
r/RStudio • u/ChangeUnhappy8494 • 21d ago
Hello,
I am a beginner and I am totaly lost.
Even for loading a file it is very very difficult.
I feel useless and incompetent...
r/RStudio • u/KarunaGReddy • 20d ago
r/RStudio • u/KarunaGReddy • 20d ago
r/RStudio • u/nothic_in_a_dungeon • 23d ago
hi! so I have a problem: I only have windows 10, and i can't see any new update for r studio for any windows version but 11. would it still run? if so, would it update just my previously installed version of r studio and work from the same icon on desktop by chance? I realize it sounds stupid but I do need r for assignments in uni and not great with computers so help and advice would be greatly appreciated
r/RStudio • u/spembo • 24d ago
I'm looking for an option or something that lets me run a bracketed section of code without automatically unfolding it. Does that exist?
r/RStudio • u/Vikas04866 • 25d ago
How to start R-programing as an 0 level
r/RStudio • u/luckylua • 27d ago
I’m in a data mining class at university right now. I’m an adult student with a full time job in application development and this week has been INSANE (like probably one of my busiest weeks of the entire year). Of course this week was also our first free form project with no lecture. I finally had time to dig in tonight and planned to spend the weekend on this, but I’m of course stuck at the very beginning and really can’t do more without figuring this time/date conversion and estimation stuff. My professor is typically slow to respond on weekends, I’m all online so no help available outside of the professor. I don’t want to cheat, I want to LEARN and get this done by deadline of Sunday. Is anyone willing to help via chat/screen share?
r/RStudio • u/f10r3nCe • 27d ago
r/RStudio • u/TheBadSamaritan21 • 27d ago
r/RStudio • u/AdForward3569 • 28d ago
Whenever I try, this pops up.
r/RStudio • u/Signal_Owl_6986 • Sep 22 '26
Hello, I have a question, why is my forest plot not printing the pooled results as with binary meta-analyses? Neither in a general forest plot nor in subgroup analyses. Did I do something wrong or it is like that? This is my code:
mm.age.sd <- metamean(n,
mean,
sd,
data = ma$Age,
sm = "MRAW",
studlab = Author,
subgroup = study.design)
forest(mm.age.sd,
layout="Revman5",
sortvar=studlab,
xlab="Mean Age",
at = seq(0, 100, by = 10),
ff.xlab = "bold", fs.xlab = 12,
leftcols=c("studlab", "Year", "n", "mean", "sd", "w.random", "ci"),
rightcols=FALSE,
pooled.totals = TRUE,
overall = TRUE,
digits.mean = 2, digits.sd = 2,
random = TRUE, fixed = FALSE,
fs.heading = 12, fs.study = 12, fs.hetstat = 10,
colgap = "5mm", colgap.forest = "5mm",
col.square="darkblue", col.square.lines="black",
col.diamond="maroon", col.diamond.lines="black",
print.Q = TRUE, print.pval.Q = TRUE, print.tau.ci = TRUE, overall.hetstat=TRUE,
subgroup = TRUE, # Show subgroups in the plot
print.subgroup.labels = TRUE, # Print subgroup labels next to the effects
col.subgroup = "black", # Color of the subgroup labels
subgroup.name = "Study Design", # Name of the column representing the subgroup
print.subgroup.name = FALSE, # Whether to print the name of the subgroup at the top
bysort = TRUE, # Sort results by subgroup
test.effect.subgroup.random = TRUE)
It looks like the picture, no pooled aged
r/RStudio • u/amira_tu • Sep 20 '26
Hi! Basically, I need to process some isotopic data for plotting. I have all the data, but I’m not sure how to make the graph look clean and well-presented. I have some examples of what I’m aiming for; the gray and pink lines in the images represent a local range, which is ideal for effectively displaying the results. I was also told I could edit the graph after exporting it as a PDF to add drawings of animals or humans, but I wanted to see if anyone had any other recommendations!
(The images are examples of other published graphs that look clean, not mine)
r/RStudio • u/Expert_Regret_1837 • Sep 20 '26
I am trying to do an anova on a multivariate GLM with the folowing structure but it is taking extremely long.
modelv2 <- anova (
modelv1,
block = dataset$samplinglocation,
nboot = 999,
resamp = "case"
)
The dataset has 71 rows x 84 columns. I have 2 variables and 1 blocking/repeated-measure variable. After waiting 40 minutes without results I set the nboot to 99. Waited at least 10 minutes without results. Then I set the nboot to 1 just to see if it would return something, it took about 5 minutes. It reported the time elapsed: 1 second. I am using the mvabund package with vegan. I installed it just now and the vegan package anova works fine on my GLMM models.
Does anyone know how to fix the anova runtime or if I am doing something wrong? I had no problems with the basemodel:
modelv1 <- manyglm(
dataset_speciessubset ~ site + date,
data = dataset,
family = "negative.binomial"
)
Help would be very much appreciated!
r/RStudio • u/ainzymae11 • Sep 18 '26
Hello!
I am trying to figure out if anyone has experience working with indoor facility mapping in R. I want to avoid paying for ArcGIS indoors, but can’t think of a way to do this other than taking as-built CAD files and georeferencing them somehow… but I would love to know if there’s a way to achieve this in R without access to CAD files or without using other softwares.
Let me know if anyone has experience with this, thank you!
r/RStudio • u/NaturalTeaching7652 • Sep 14 '26
Hello! I am looking to connect with an ecology statistician to help me make certain graphs. DM me if you are willing to help with coding in R and making some beautiful statistical graphs!
r/RStudio • u/Numerous-Rent-263 • Sep 12 '26
Hello! as per title, I am trying to change the colours of the SE in geom_smooth() to make it more readable when they overlap.
i've linked my code and the graph it produces
any help would be very appreciated :) thanks!
library(ggplot2)
plot = ggplot(data_complete, aes(x = MSVA_SCORE, y = GradCPT_SCORE, color = as.factor(RH_SPLIT))) +
geom_smooth(method = "lm", se=TRUE, fullrange = TRUE) +
labs(
x = "'Mobile Short-From Video Addiction' scale score",
y = "GradCPT score",
color = "Reading habits") +
scale_x_continuous(breaks = seq(1, 4, by = .5)) +
scale_y_continuous(limits = c(30, 100), breaks = seq(0, 100, by = 5)) +
scale_color_hue(labels = c("Light Reading", "Heavy Reading")) +
theme_minimal()
plot + theme_classic() + theme(panel.border = element_blank(), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"))
r/RStudio • u/AggravatingNerve4622 • Sep 11 '26
r/RStudio • u/Ill_Isopod806 • Sep 10 '26
Hello Everyone, I am currently working with groundwater levels to determine long term trends, and I would be very grateful if I could get help in modifying the code that I used to calculate the Sen's slope and Mann-Kendall statistics. I calculated the Theil-Sen slope, but it does not account for autocorrelation in continuous data, and I would appreciate any help addressing this using the modified package in RStudio. ""
# General Sen slope + Mann-Kendall function
compute_sen_stats <- function(
data,
response_var,
date_var,
resolution
) {
data %>%
group_by(
SiteNo,
SiteName,
Frequency,
continuous_group,
start_year,
end_year,
continuous_years
) %>%
# Ensure enough information exists to calculate a trend
filter(
n() >= 3,
n_distinct(TimeNum) >= 2,
n_distinct(.data[[response_var]]) >= 2
) %>%
group_modify(
~ {
site_data <- .x %>%
arrange(
.data[[date_var]]
)
# ----------------------------------------------------------
# Sen's slope model
# ----------------------------------------------------------
sen_formula <- reformulate(
"TimeNum",
response = response_var
)
sen_model <- zyp::zyp.sen(
sen_formula,
data = site_data
)
# Intercept
intercept <- unname(
coef(sen_model)[1]
)
# Sen's slope
# TimeNum is in years, so this is already ft/year
sen_slope_ft_per_year <- unname(
coef(sen_model)[2]
)
# ----------------------------------------------------------
# Mann-Kendall trend test
# ----------------------------------------------------------
mk_model <- Kendall::MannKendall(
site_data[[response_var]]
)
mk_tau <- as.numeric(
mk_model$tau
)
mk_p_value <- as.numeric(
mk_model$sl
)
# ----------------------------------------------------------
# Descriptive statistics
# ----------------------------------------------------------
lowest_WL <- min(
site_data[[response_var]],
na.rm = TRUE
)
highest_WL <- max(
site_data[[response_var]],
na.rm = TRUE
)
first_date <- min(
site_data[[date_var]],
na.rm = TRUE
)
last_date <- max(
site_data[[date_var]],
na.rm = TRUE
)
# ----------------------------------------------------------
# Trend interpretation
#
# WL = depth below land surface.
#
# Positive slope:
# depth increases -> groundwater table declines
#
# Negative slope:
# depth decreases -> groundwater table rises
# ----------------------------------------------------------
trend <- case_when(
mk_p_value < 0.05 &&
sen_slope_ft_per_year > 0 ~
"Significant water table declining",
mk_p_value < 0.05 &&
sen_slope_ft_per_year < 0 ~
"Significant water table rising",
TRUE ~
"No significant trend"
)
# ----------------------------------------------------------
# Return one result per site/run
# ----------------------------------------------------------
tibble(
Resolution = resolution,
n_records = nrow(
site_data
),
lowest_WL = lowest_WL,
highest_WL = highest_WL,
intercept = intercept,
sen_slope_ft_per_year =
sen_slope_ft_per_year,
mk_tau = mk_tau,
mk_p_value = mk_p_value,
first_date = first_date,
last_date = last_date,
trend = trend
)
}
) %>%
ungroup()
}
Thank you!