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
10 views

How to obtain standardized residuals for clustered data in lavaan?

I am facing a problem concerning the output of standardized residuals for a fitted lavaan (sem)-object. As far as I do not include “cluster = ” in the fitting function, I can easily obtain the ...
Marcus P's user avatar
0 votes
0 answers
4 views

R: running a mirai_cluster via parallelly::makeClusterPSOCK

my goal is to perform some heavy computation in R on a cluster of several Linux hosts, using docker containers. Within R I want to use foreach. To do this, I believe the best approach is with the ...
Someone2's user avatar
  • 493
0 votes
0 answers
14 views

compiling errors for R 4.4.1 on alma linux 9.4

I am compiling R 4.4.1 from source on alma linux 9.4 (docker container) ./configure --prefix ${installdir} \ --enable-year2038 --with-cairo --with-x --with-libpng --with-jpeglib --with-libtiff \ ...
laura_poggio's user avatar
0 votes
0 answers
17 views

Bipartite graph tracking individuals that change rank on R

I have a set of 150 samples, and several measurements have been taken from each of them. By ranking the samples according to the different parameters I notice that the individual positions are not ...
Alkaligrass's user avatar
0 votes
1 answer
22 views

dplyr: count unique values [duplicate]

I have a data: df <- data.frame(strain = 1:6, sample = c("a24", "a24", "a24", "a26", "a26", "a27"), region = c(rep("ny", 3), ...
trilisser's user avatar
  • 355
0 votes
4 answers
37 views

Error when using bind_rows where one data frame has a column of type <hash>

I want to bind rows from two different data frames where one data frame contains a column of hash values whereas the second data frame doesn't contain this column. library(tidyverse) library(openssl) ...
deschen's user avatar
  • 10.4k
0 votes
0 answers
12 views

Addpoly function adds 95%CIs in text despite specifying 90% using the level argument

I've created a forest plot with subgroups based on an rma.mv object in metafor. We are reporting 90% CI's which appear correctly next to each row of individual effect size estimates when using the ...
AKing's user avatar
  • 3
0 votes
0 answers
17 views

Unable to upload Excel File without updated version of Rcpp

I am unable to load my excel file on R as it gives me the error below: "Preparing data import requires an updated version of the Rcpp package. Do you want to install this package now?" When ...
Ishita Vasishth's user avatar
2 votes
4 answers
69 views

Create Vector from One-to-Many Dataframe in R

I have a dataframe with a one-to-many relationship where the one in the relationship are the column names and the many in the relationship are entries in the first column. I would like to create a ...
James Vercammen's user avatar
0 votes
0 answers
9 views

Several packages not installed in RShiny with Docker

I create a Dockerfile: # Base image https://hub.docker.com/u/rocker/ FROM rocker/shiny:latest # system libraries of general use ## install debian packages RUN apt-get update -qq && apt-get -y ...
Leprechault's user avatar
  • 1,707
0 votes
0 answers
23 views

Keep getting error running this script for stock screening and analysis

The script is meant to extract list of stocks symbols and its corresponding data for analysis but i keep getting error when i get to the map section of the code. The script is given below: { ...
Tbiz Adeniyi's user avatar
0 votes
0 answers
15 views

'Not a matrix' error in ate() function in the 'riskRegression' package [closed]

I'm attempting to estimate the average treatment effect of a baseline treatment on a survival outcome by fitting a doubly robust estimator using the ate() function in the package riskRegression. ...
West_End_Line's user avatar
0 votes
0 answers
13 views

Put the progress bar in the center and change the size of the message box in R Shiny

I am writng a R shiny web application. I am looking for a way to put the progress bar in the center of the webpage and adjust the size the of the bar. The function I used is "withProgress", ...
Jian Zhang's user avatar
  • 1,215
-1 votes
0 answers
38 views

I wanted to assign a value to two objects( a<- 5, b<- 6). I tried to add then (5+6) and it said that object (a) is not found [closed]

a <- 5 b <- 6 a + b it should say 11, but in my console it says object (a) is not found. Do not know how to correct the problem. Any hekp would be great. Thank you a <- 5 b <- 6 a + b. ...
Patrick Rankin's user avatar
0 votes
0 answers
28 views

I dont see window R [closed]

for some reason I only see the console after installing R, can I configure this somehow so as not to call up other windows with commands nothig?i dont know how its change, After installing 4 4 1, and ...
Karachkovskiy Denis's user avatar
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
33 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
1
2 3 4 5
16939