I have the following decision rules: RELIABILITY LEVEL DESCRIPTION LEVEL I Multiple regression LEVEL II Multiple regression + mec
I've looked quite a few different questions on here around Pivot Longer but I can't seem to figure out how to get my scenario to work. For example R Pivot multi
I'm running a study in which each participant will be presented with stimuli that have been randomized at two different levels: blocks (3 unique blocks) and tri
I have a simulated data set with 5 rows, each representing a block of person-time, each with its own start and end date ('start' and 'end'). Each row has a visi
I have a data frame that has this structure: dat <- data.frame(col1 = sample(0:3, 10, replace = TRUE), col2 = sample(0:3, 10, replace = TRU
I am trying to expand on this answer, by creating a solution that works both on the new_dat and the old_dat. New Data new_dat <- structure(list(`[0,25) east`
When I create a function and use arguments as variable names in group_by() function there is error: comb <- function(z,x,y) { df <- z %>% group
I have a dataframe with one identifier column of unique values, and one column which contains specific criteria. I want to create a new identifier column of uni
I'm new to R. This is my dataset df <- tribble( ~Area_of_interst ,~Meds,~Response, "Internal Med", "asprin", "yes", "Inter
I have the following dataframe: library(dplyr) library(tidyverse) library(concordance) Year <- c(2016,2016,2017,2019,2020,2020,2020,2013,2010,2010) Pf <-
The data: df <- tribble( ~name, ~val.I, ~val.V, ~`val.%`, "Peter", 123, 12.4, 14, "Peter in %", 111, 532, 57, "Harald", 2222, 3333, 444, "Harald in
this is not a very good title for the question. I want to sum across certain columns in a data frame for each group, excluding one column for each of my groups.
I have a data frame with multiple similar sequences in which column Z has a string pattern containing "VALUE1" and "VALUE2" (only these two patterns matter) and
In R, I have a data frame with several values. I would like to have a data frame that transforms the data frame into a data frame with just on
What are good ways to select multiple columns of a data frame in base R using the native pipe |>? (i.e., without the tidyverse/dplyr to reduce external depen
for dataframe below, df <- data.frame(id = c(rep(101, 4), rep(202, 3)), status = c("a","b","c","d", "a", "b", "c"), wt = c(10
I am having difficulty finding the words to describe what I am searching for but will try. I would like to solve the following using R or Python (but preferably
Question In R, can I used a vector that holds the names of data frame columns to avoid repeated code? vec_columns <- c("col1", "col2", "col8", "col54") Bac
I'd like to remove any string that ends in either of 2 characters in a pipe. In this example it's ".o" or ".t". Some of them get removed, but not all of them, a
here my reproducible example mydat=structure(list(supplier = c("TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP", "TKP",