Category "r"

Is it possible to know the size of a variable that is being created while the function is running?

I am very new to R and I was exploring a function in a library that download data from a server and leaves the data as dataframe. The data are stored in a varia

renderPlots() not showing when on shinyapps.io but do show when I run app locally using conditionalPanel

I am trying to make one of two plots depending on browser size (from shinybrowser) using conditionalPanel. The plots are appearing when I run the app locally bu

Getting error $ operator not defined for this S4 class when findings mean of residuals [duplicate]

heyy i have a problem with getting the the below error. I am new to R and not sure how to resolve this!! I am trying to find the mean of resid

How to filter very small values in r?

I have a large dataset in which one column is p-values that range from 0.9 to being extremely small like 5e-79. In R I can sort the data in descending order and

Remove column with unique length in R [duplicate]

I have this data frame (train) where I have 2314 variables and I want to drop the columns where the unique length of the column is < 2 and

Use dplyr::select's where with base R grepl and anonymus function

There is a very similar question here: How to select columns based on grep in dplyr::tibble However I think that the select_if was superseeded with select(where

Issue with 'group_by' function when doing shapiro_test in R

I've asked this question previously with no luck, so here goes again: My dataframe: data.type <- c("DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA

adding more standard deviations to a plot

I'm trying to add more standard deviation to my current plot. I need to add 1std and 3std, I've already addeed the 2std to my plot. This is my code: tidyverse_

Storing looping rows in R

laststop <- NULL stopinfo <- NULL for (i in journeys$JourneyID){ laststop <- get_last_stop(i) stopinfo <- c(stop_info(i,laststop)) final_stops

Mean and Standard Deviation of x>=5 of 10000 data points binomial(10, 1/4)

I have a data range of 10,000 points as per: data = rbinom(10000, size=10, prob=1/4) I need to find the mean and standard deviation of the data values >=5.

Downloading files from GSE datasets

Does someone know where I can find the full files (Matrix, Barcodes and Features) in GEO datasets? I've been trying to download that from previous studies for a

Add text annotations at consistent locations in facet_grid when scale = 'free_y' + ggplot2 + r

I need to annotate a set of chats in a facet grid where the y axis is scale is set to scale = 'free_y'. As the scales are very different, when I set the y posit

How to interpret interactions in a multinomial ordinal regression (r)

A colleague and I ran a multinomial logistic regression using the 'ordinal' package in r and I am not sure how to interpret interactions between variables with

Fetching values from one column based on other column keys in long-formatted dataset

I have a long format dataset of 100,000+ individuals, capturing clinic visits at 5 different time points (not chronological). I've included an example dataset b

How to get x-axis to show all months in dataset

I can't figure out how to customize the x-axis in the graph below. At minimum, I would like each month to be labeled on the x-axis. All help is appreciated. dpu

Dynamically named dots passed to lapply

This isn't really a httr2 specific problem though it is easy to illustrate this way. If I have a param that is being to a function that I want to lapply on and

Checking the normality assumption of a linear mixed effects model

I have the following code for an LME: IDRTlme <- lme(Score ~ Group*Condition, random = ~1|ID, data=IDRT) I want to check the normality assumption, and so I h

An R Loop to wrap text in multiple saved excel files

I have hundreds of excel files with a single column and a single sheet containing text. I am trying to write a loop that will 'Wrap Text' and align the single c

Why doesn't R dplyr arrange sort properly using a vector element within a for loop

I'm having trouble getting r's dplyr::arrange() to sort properly when used in a for loop. I found many posts discussing this issue (like ex.1 with the .by_grou

Merging data frames by selecting for correct value

I have a data frame called "ref" that contains information that allows mapping of gene entrez ID to the gene's start and end positions. I have another data fram