510,854 questions
0
votes
0
answers
27
views
Singularity error in a fully nested linear mixed effects model
My experiment consists of evaluating certain behavioral parameters of tracked larvae using a nested linear mixed effects model.
One experimental "Phase" consists of ("LightCondition&...
0
votes
0
answers
22
views
Compilation error for 'terra' in Rstudio v 4.1.1
I am hoping to install the R-INLA package (https://www.r-inla.org/what-is-inla) which requires the package terra. I need to install the source version of terra to use the INLA package (the binary ...
1
vote
3
answers
62
views
How to flag the first time a variable increases within each group
I have a panel dataset ranging from 1992 to 2023 built from annual surveys.
The ID variable is NORDEST, and the period variable is PERIODO.
I want to create a new variable that takes the value 1 the ...
1
vote
2
answers
52
views
execute a set of different commands specified in a list
I have a repeated task that demands executing slightly different sub-parts of commands in each task.
Each task starts the same, but then I have to go into direction A, B, C, D... for each task.
My ...
2
votes
1
answer
52
views
ggbarplot mean standard error bars not aligning
I am trying to plot the percentage of three cellTypes (T cells CD4, T cells CD8 & Tregs) that are assigned to A vs B, averaged across the ROI_name column and with mean_se bars, however the plotted ...
0
votes
0
answers
39
views
R "rphylopic" package fails with ggplot - my issue or package issue?
I'm using the rphylopic package to add images of animals to a figure I'm making with ggplot2. The code worked great a couple weeks ago but now I'm having trouble re-loading it. When I try to make my ...
3
votes
4
answers
81
views
Creating a group by loop using either single or multiple variables from a list in R
I am trying to perform a loop which loops through a list of single or multiple variables then sums a column. I am essentially trying to paste in from a list into the group_by() function so that it ...
1
vote
1
answer
51
views
Horizontal segments in violin plot in R [duplicate]
I am looking for a way to implement horizontal segments inside a violin-plot in R. I attach an image displaying how I need the plot to look like. I tried using ggplot2, which I am fairly experienced ...
0
votes
0
answers
44
views
Oblique Mercator projection +alpha bug when aligning terra raster to (coastline) segment azimuth
I'm attempting to align a square projected raster grid to individual segments of an n = 15 sided polygon using the terra package and an Oblique Mercator (omerc) projection. The goal is for the ...
0
votes
0
answers
34
views
Creating a competing risk regression when my outcome of interes have zero events for one of my variables [closed]
I am working in R and performing competing risk regressions on data from hernia surgery.
In my model, I have three outcomes:
1 = Death
2 = Recurrence (the outcome of interest)
3 = Other complications
...
0
votes
0
answers
22
views
Connect to EViews data base in R
I have an Eviews data base which is stored in an .edb file (along with an .e0, .e1a, and and .e1b file). Is there any way I can read from (and optimally also write to) this DB with R?
I am aware of ...
0
votes
1
answer
80
views
Extract slopes from bspline of interaction model
How does one get the slopes of a bspline model that has interacting variable? I have to report the rate of change for each of the 2 categories between the knots.
library(splines)
library(ISLR)
age....
1
vote
1
answer
57
views
How can I write the option in a single-choice exercise in r-exams?
In questions such as:
%% META-INFORMATION
%% \extype{schoice}
%% \exsolution{10000}
%% \exname{Regression}
%% \exshuffle{TRUE}
which comes from
\begin{solution}
\begin {answerlist}
\item True
\item ...
0
votes
0
answers
38
views
"error in style$numFmt : $ operator is invalid for atomic vectors" when using createStyle() function of openxlsx package [closed]
I am currently trying to create a wrapper of several openxlsx functions that will allow me to export a data frame in APA-stlye.
However, whenever I execute addStyle() I get the following message:
&...
2
votes
1
answer
82
views
How to insert reactable table in tooltip/popup in Shiny
Is it possible to insert/show a reactable table in a map tooltip/popup in Shiny/R. I can generate it with a modal and observeEvent{(input$map_click,)...} but wanted to avoid interrupting map view ...