You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code, when selected in RStudio and submitted to {reprex} via the Addins menu ("Reprex selection"), causes the R session to crash. Not sure why. Code runs fine from the Source pane.
suppressPackageStartupMessages(library(tidyverse))
library(relaimpo)
# Regresses first column (mpg) against the other 10 variablesmodel<- calc.relimp(mtcars,
type= c("lmg","last","first","pratt"),
rela=TRUE)
plot(model)
str(model)
summary(model)
mod.df<-data.frame(lmg=model$lmg*100,
first=model$first*100,
last=model$last*100,
pratt=model$pratt*100)
mod.dfmod.df %>%
rownames_to_column(var="Variable") %>%
pivot_longer(cols=2:5,
names_to="Method",
values_to="% of R2") %>%
arrange(Method, Variable) ->long.df
head(long.df)
ggplot(data=long.df) +
aes(x=Variable, y=`% of R2`) +
geom_col() +
facet_wrap(~Method, nrow=2, ncol=2) +
labs(title=(paste("Relative importances for", names(mtcars)[1])))
My machine specs and software setup are as follows:
The full story is at yihui/xfun#97. The key used for imgur uploads, which any reprex with a plot will tickle, by default, is out of service, with "too many requests". It's unclear why or if the situation is permanent.
So I'll keep an eye on this for a bit. If fortune smiles, the key will start working again, maybe after some suitable period of time has passed. Otherwise, we'll have to take some more measures to use a different key or make it more obvious to reprex users how to provide their own key.
jennybc
changed the title
Simple code block crashes {reprex} R session.
reprex with a plot fails (because imgur upload fails due to the API key quota being exhausted)
Jan 14, 2025
The following code, when selected in RStudio and submitted to {reprex} via the Addins menu ("Reprex selection"), causes the R session to crash. Not sure why. Code runs fine from the Source pane.
My machine specs and software setup are as follows:
Created on 2025-01-13 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: