All Questions
Tagged with error-handling r
1,041
questions
0
votes
1
answer
18
views
Friedman test gives back error: not an unreplicated complete block design. How do I fix this?
Whatever I try, I keep getting the error 'not an unreplicated complete block design' when I try to perform a Friedman test in R.
I have a dataset with the total number of flower visits that I counted ...
0
votes
1
answer
33
views
Empty dateRangeInput() is giving an error
My previous question 1 was about managing empty dateRangeInput(). My previous question 2 was about error-handling when an initial date is posterior to an end date.
I have integrated the solutions to ...
0
votes
1
answer
39
views
R - dateRangeInput() - Error: "end date" > "start date"
My shiny app has a data.table to be filtered by a date range. To this end I use dateRangeInput(). When an end date precedes a start date by mistake the R console is giving an Error in seq.int: ...
2
votes
2
answers
36
views
How do I use an error as input for to if clause (in R)
This workflow will either produce a value or an error. I want that, in the event of an error, will perform an arbitrary code (it could print a message to the console, create an objet).
a <- 1
b <...
0
votes
1
answer
61
views
data.table use df[, i] to fetch a column
I am using data.table package.
library(data.table)
df = data.table(col1 = c(2,4,6),
col2 = c(4,6,8),
col3 = c(8,10,12),
col4 = c(20,16,14))
i = 2
df[,...
1
vote
2
answers
41
views
How do I get a daily average for data points generated every 15 minutes?
This is my first question and I'm also a very new learner to r so please bear with me. I am working on some gauge data from about 4 months and it took temperature readings every 15 minutes. I am ...
0
votes
0
answers
23
views
how to download and run sf package for spartial data analysis inR [duplicate]
I have installed the sf package into R but I get errors upon trying to read shapefiles using sf_read() function.
I ran the code;
> install.packages("sf", type = "source", ...
0
votes
1
answer
40
views
R code not recognizing error (tryCatch) when webscraping
I'm trying to scrape data from Google Scholar. I don't have much experience with coding and scraping, so I've run into many issues. I made a similar post here, except I have a new problem. When I ...
0
votes
0
answers
33
views
I am getting an error message when trying to install EFA.dimensions package
I am BRAND NEW to R and am running into a problem. I have a dataset in SPSS that I ran an EFA (PAF) in successfully. Parallel analysis suggests no more than 7 factors but the scree plot suggests less....
0
votes
0
answers
27
views
geepack:: geeglm Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]): contrasts can be applied only to factors with 2 or more levels
I'm using the geeglm() command to fit a logistic regression model via GEE, intending to incorporate an unstructured correlation matrix to capture within-participant correlations (for subjects with two ...
1
vote
0
answers
65
views
extract instrumental variables Error in if (out == "[]") { : argument is of length zero
I can extract instrumental variables from dataset 'ieu-a-2' using code below:
exp_dat <- extract_instruments(outcomes = 'ieu-a-2')
But it is strange that I can not extract IVs from dataset 'ukb-b-...
1
vote
1
answer
3k
views
"Error in Ops.data.frame(guide_loc, panel_loc) : ‘==’ only defined for equally-sized data frames" when using draw() from gratia to draw GAM in r
I am trying to draw GAMs in R using the below code. This code always used to work, and I could draw the partial effect of my smoothed term, but randomly it no longer works, consistently triggering ...
0
votes
1
answer
35
views
How do I fix subscript out of bound error for my interaction matrices?
I am trying to create interaction matrices from multiple files. With some of my files, I am receiving the following error:
Error in interaction_matrix[as.numeric(pig_id), as.numeric(closest_pig)] :
...
0
votes
0
answers
15
views
Specific Dataset causes the glm.nb fucntion to crash for no apparent reason when attempting to perform regression
So I am attempting to run a Negatice Binomial Regression to estimate a trend of a number of events over time. To do this I am using the function glm.nb() from the MASS package. This has worked for a ...
0
votes
0
answers
37
views
R return an error when i run this code and i don't understand the error
I have this code
getSymbols("^GSPC")
Log_return <- log(GSPC$GSPC.Close/lag(GSPC$GSPC.Close))
ggplot(Log_return, aes(sample = Log_return$GSPC.Close)) + stat_qq()+stat_qq_line(color = "...