Unable to Zoom or Hover on Nested Plotly Map in R Using nested subplot()
I’m working on an interactive dashboard where multiple plotly objects including maps are displayed using nested subplot() in R. The code works structurally, but I’ve hit a...
View ArticleHow to Make a Line Break in rmarkdown Header?
I am trying to insert a line break inside the header paragraph in rmarkdown.---title: "Untitled"output: word_document---```{r setup, include=FALSE}knitr::opts_chunk$set(echo = TRUE)someValue <-...
View ArticleAnyway to do `tbl_hierarchical`-like analysis table in call of `tbl_summary`?
Here is an example:library(cards)library(gtsummary)adsl <- cards::ADSLtbl <- tbl_summary( data = adsl, by = ARM, include = c(AGE, SEX, RACE), type = all_continuous() ~ "continuous2", statistic =...
View ArticleQuantile deviations detected gamma GLM
I am trying to apply a Gamma GLM to a dataset. The main issue is the lack of fit for quantile deviations although no other problems are detected. I have read similar posts without a conclusive...
View Articlemanyglm (package mvabund) giving error when using family = Gamma(link = log)
I am trying to test if my three experimental factors (see example_data1.csv) affect a multivariate dataset (5 variables measured on the same experimental unit, see example_data2.csv), using the manyglm...
View Articlesimulate probability with gamma distribution in SAS versus R
I have some SAS code I am trying to translate into R. At one point the SAS code simulated a probability bhrsim essentially with the following. I am unsure how to translate this into R but show my...
View ArticleHow to use nlmer from lme4 with non-Normal data
I am testing some non-linear models with nlmer from the lme4 library. But this function assumes normality while my data clearly follows a Gamma distribution.fit <- lme4::nlmer(y ~ nfun(x, b0, b1,...
View ArticlePositive and negative Loglikelihood values for gamma distribution using...
I have a dataset and the dataset normalized to the maximum value (values between [0,1] and I try to fit gamma distribution. I am using fitdistrplus and I am estimating the parameters of the...
View ArticleManually get the responses from GLM with gamma distribution and a GLM with...
I've been trying to manually get the response values given by the predict.glm function from the stats package in R. However, I'm unable to do so. I only know how to manually get the value with a...
View Articleglm with gamma family with NA / 0 Values in r
I would like to use a generalized linear mixed effect model. My data follows a gamma distribution but contains NA and 0 values. However, the gamma family does not allow me to compute these models if I...
View ArticleIs there a R package for computing intraindividual Gamma correlations?
im searching a r package that enables me to compute Goodman and Kruskal's gamma correlations within each subject. I have 2 variables with 16 items each, which I would like to correlate per subject.So...
View ArticleHow to interpret parameters in brm with family=Gamma
I have a question about interpretation for a bayesian model with a gamma distributed dependent variable.I have a dataset containing 3 groups’ sentiment score data, from 0 to 4 (this is a continuous...
View Articledepmix function to fit two state gamma distribution
I am using depmixS4 package in R. I have a data that looks like a gamma distribution, and I am assuming that there are two states. I would like to fit two-state gamma distribution to my data in R. The...
View Articledgamma function R speed
I am trying to use the dgamma function in R to obtain values of the gamma density function across a matrix of values. Because my values are usually quite small, I am also required to do this process in...
View ArticleHow to use the gamma distribution equation
I am using R to fit a GLM with Gamma distribution (link inverse). I would like to use the equation of the model to get other values of my predictors, knowing the response value. I know that the...
View ArticleRemove spacing around plotting area
When I create the following plot, I get unwanted space between the plotting area and the axis (i.e. the white space between the blue box and the x-axis. How can I remove this space and make the...
View ArticleHow can I automatically make flextable::save_as_rtf() use the entire...
If I run the code below, I get an rtf that does not seem to use the entire page width when opened in MS Word.flextable::flextable(head(iris)) |> flextable::save_as_rtf(path = "test1.rtf")Naively one...
View ArticleHow to add individual data points to bar plot with means using geom_jitter
I have a dataset with growth rate measurements on 4 different media types (cmym, agar, char5, and char10).I made a bar graph with the average growth rate for each media type by grouping and summarizing...
View ArticleSaving modelsummary resulting flextable as .docx lose horizontal line that...
Consider the following example:library(modelsummary)library(flextable)library(officer)modlm <- lm(gear ~ mpg + wt, data = mtcars)res <- modelsummary( modlm, stars = TRUE, out = "flextable")If I...
View Articleggh4x: Rotate group labels with guide_axis_nested ggplot2
Hello I am using this package I found very handySo this is the data:df <- data.frame( x = LETTERS[1:16], group = rep(c("Group 1", "Group 2", "Group 3"), c(5, 3, 8)), value = rpois(16, 10))And this...
View ArticleRe-projected raster not plotting correctly
I'm trying to plot some environmental data in ggplot2 similar to maps that I see plotted up in matplotlib in python. I'd like to use the kav7 projection, but when I re-project the environmental data...
View ArticleAdd x-axis labels on top and bottom of ggplot
Does anyone know how to have x-axis labels appear on the top of the graph while retaining the labels on bottom. I have found plenty of posts about doing scale_x_continuous(position = "top"), but this...
View ArticleIn `dplyr` `filter`, how to parse conditions which are stored in string?
In dplyrfilter, how to parse conditions which are stored in string?When there's only one condition, below code can worklibrary(dplyr)conditions_string_1 <- "Species=='versicolor'"iris %>%...
View ArticleChaining functions with multiple arguments
Is there a way to chain functions with multiple arguments?For the moment I "chain" my operation in Python like this:def createDirIfNecessary(directoryName): if not os.path.exists(directoryName): print...
View ArticleConfidence intervals from model-averaged objects - error with MuMIn
I've been trying to obtain model-averaged confidence intervals, but MuMIn::confint() throws the error:Error en get(name, envir = asNamespace(pkg), inherits = FALSE): objeto 'format.perc' no encontrado–...
View ArticleHow to append values to an R save file?
Suppose I run a step to import several foreign data files to R, I save them, then I import still more files and would like to append them to my save file. Is there any efficient or simple way to add...
View ArticleHow to split a number into its digits in R
new here so forgive me if this sounds dumb.I am currently working on a project, the data set has a variable that consists of two digits. For example 12 or 34. The second digit is from 1 to 5 and I need...
View Articlepanel spacing and columns split in nested facet
I'm working on the facet plot below; however, I have two main issues:I can't properly set independent space values for the between chr* and the between G* facets e. g. I wish to set 0.1 for the former...
View ArticleHow to make DT datatable factor filter dropdowns keyboard accessible (ADA...
The GoalI am building an R Shiny application with a DT::datatable that has column filters (filter = 'top'). For columns that are factors, DT correctly creates a dropdown menu (using selectize.js) that...
View ArticleCan't install an R package that requires a Fortran compiler, despite (I...
I've been trying to install the R package "gap" for the last six hours, and I keep getting this error:Warning in install.packages : installation of package ‘gap’ had non-zero exit statusAs I've tried...
View Article