I have a data set that looks something like this data set example I am trying to find unique entries in each of the columns I managed to do it for 1 column util
Say that I have a dataset. date <- c("2004-02-01", "2004-03-05", "2004-08-09", "2004-08-13", "2004-10-20", "2004-11-02", "2008-01-05", "2008-02-03", "2008-08
I have created a simple dashboard (link here) to display some data in R using selectInput. How can I activate/deactivate a filter reactively, so that the output
I want to extract rows that must contain two or more partial strings. For example, suppose I have the following data.table df <- data.table(player = c('A', '
I have a code like that : library("survival") library("survminer") data("lung") res.cox <- coxph(Surv(time, status) ~ sex, data = lung) x<-confint(res.
Issue I have a dataframe of familial relationships coded with integers, where R01 is the relationship of person N to person 1, R02 their relationship to person
I am looking for a method that will look at each date in "Date A" and find the next nearest date after that value in "Date B" by ID (group_by). I then want to c
I'd like to add a new variable to a dataframe for plotting labels, as seen in the top voted answer here Here's the data: small <- structure(list(Site = stru
vertejumi_ceturksnos <- data.frame( Vertejumi = c("0", "1", "2", "3"), Pirmais = c(Pirmaiss), Otrais = c(Otraiss), Tresais = c(Tresaiss), Ce
If i have the following table: tibble(year = c("2020", "2020", "2020","2021", "2021", "2021"), website = c("facebook", "google", "youtube","facebook", "
I have a column which list timestamps and I am in need of converting that to corresponding date for all rows in that column. Listing the code below app21_csv &
I frequently use the dplyr piping to get a column from a tibble into a vector as below iris %>% .$Sepal.Length iris %>% .$Sepal.Length %>% cut(5) How
I have binary data in a dataframe with a time feature and I'm looking to produce a dataframe like below with a new column "duration since =1". I was able to fi
I am trying to use the n_distinct function from dplyr inside a pipe in a function and am finding it to be sensitive to my choice of syntax in a way I didn't exp
I try to conditionally replace multiple values in a data frame. In the following data set, I want to replace in columns 3:5 all values of 2 by "X" and all value
I have the following data frame as an example: match_id <- c("match_1", "match_1","match_1","match_2","match_2","match_2","match_3","match_3","match_3", "mat
I would like to filter using multiple variables in R. I got a way of doing so. How about if I only want to select the variables that meet the filtering criteria
I would like to perform following operation in Pandas: library(tidyverse) df <- tibble(mtcars) df %>% select(ends_with('t')) %>% head(3) # A
I want to get a Mahalanobis difference for each set of two scores, after being grouped by another variable. In this case, it would be a Mahalanobis difference f
Let's say I have the following dataset: dat <- read.table(text="id_1 id_2 123 NA 456 NA NA 3