Skip to main content

Questions tagged [r]

R is a free, open-source programming language & software environment for statistical computing, bioinformatics, visualization & general computing. Please use minimal reproducible examples others can run using copy & paste. Show desired output entirely. Use dput() for data & specify all non-base packages with library(). Don't embed pictures for data or code, use indented code blocks instead. For statistics questions, use https://stats.stackexchange.com.

0 votes
0 answers
11 views

OTU data into box plots

I am trying to create a box plot of the relative abundance of a taxa controlled for a Vitamin D condition. For example a boxplot with the relative abundance of Bifidobacterium, one boxplot for Vitamin ...
mistletoestars's user avatar
0 votes
1 answer
33 views

How to create a vector of 2 elements?

For a function I want to utilize the documentation states that I need to create a vector of 2 elements. library("dplyr") df <- data.frame( Genus = c("Panthera", "Quercus&...
Mary Ann Moody's user avatar
0 votes
1 answer
19 views

How to change state border color in R Plotly choropleth map?

I have replicated the choropleth map for discrete colors in R using the method suggested in this link: How to create a chloropleth map in R Plotly based on a Categorical variable? However, as you will ...
Lagrange's user avatar
0 votes
0 answers
12 views

Overall row summary section divider in rtables

I'm trying to build an rtable with the following requirements: Overall counts at the top Counts of rows by a group and subgroup Unindent groups/subgroups by one level Use section dividers (blank ...
Ryan's user avatar
  • 192
0 votes
0 answers
27 views

Duplicated points in ggplot2 animation [closed]

I'm trying to do a visualization which is animated. Problem: my points show duplicated regardless that I put the transition_time parameter to show the points every year. Inside aes function I also ...
Juan Carlos Saravia's user avatar
0 votes
1 answer
34 views

Correlation grouping by multiple variables

all. I've trying to perform correlation, grouping by two variables, as ideally the data would be present in the same data and be of the same type. Let's say I have the following dataframe: df <- ...
annyeong's user avatar
1 vote
0 answers
13 views

Two dropdown menus to select Y and Y2 axes independently

I am trying to generate a plot which has independent dropdown menus for both Y and Y2 axes. I am able to implement a dropdown for either the Y1 or Y2 axis when the other is static. I have also ...
mchen's user avatar
  • 71
0 votes
1 answer
17 views

how I can customize font color using conditional format in openxlsx2 in r?

Hi and thanks for reading me Im currently working in an excel file with a conditional format using R and the package openxlsx2, but when I add the style I get an error in the document output. My code ...
Jorge Hernández's user avatar
-2 votes
0 answers
30 views

Is it possible to use R Markdown directly? [duplicate]

Suppose I have the following .txt notepad file (containing Latex math equations) saved in the working directory Hello. This is a parabola: $$ y = x^2$$ And this is a cubic function: $$ y = x^3$$ ...
stats_noob's user avatar
  • 5,695
0 votes
1 answer
20 views

XGBoost Tree Plots in mlr3

I'm trying to get a plot of a single tree from an XGboost model fit in mlr3, and I can't seem to find any examples. I know there's a way using the underlying xgboost (see here), which mlr3 calls, but ...
S. Robinson's user avatar
0 votes
0 answers
29 views

RMarkdown issue: {r child = here::here("scripts","rmd","analysis-part000.Rmd")}

I'm trying to clean up a long RMarkdown document based on this article that uses here::here() to dynamically build the folder structure from the base folder of the project. My code successfully ...
Marc Alexander's user avatar
0 votes
0 answers
26 views

R gamlss - Last error message: object 'fit' not found [duplicate]

After executing several data correctly, it throws the error : Last error message: object 'fit' not found any ideas? train_modelo<-function(data,x){ codigo <- x[,1] family <- x[,2] ...
jorgeluisgatica's user avatar
0 votes
0 answers
14 views

Error in Boosted Regression Tree model with offset

I'm working with boosted regression tree models (BRTs) to predict the probability of occurence of a dolphin species. For that I have presence/absence data and several environmental variables. The ...
Maria Inês Silva's user avatar
0 votes
0 answers
14 views

Why are the YAML highlight options not being reflected in my HTML that is knitted from and RMD?

I am working in r studio. For my college class, we're working in rmd files and then knitting them to html files. Each rmd file starts with YAML options that setup the document. The document has no ...
Spoger's user avatar
  • 23
0 votes
1 answer
24 views

How do I get a per pixel linear regression analysis of a raster stack across time when time is only saved as the tiff file name?

I have single band rasters of data values averaged per year from 1986-2023. I would like to run a trend anlysis that gives me the linear regressions of each pixel across the years. I am not sure where ...
GeogDay's user avatar

15 30 50 per page