I have a dataset in Stata with information on whether or not a participant has experienced a specific side effect. The dataset contains about 900 part ...
I have a dataset in Stata with information on whether or not a participant has experienced a specific side effect. The dataset contains about 900 part ...
I'm having some trouble while I'm searching to specify parameters in custom function passed to .fns argument in dplyr's across. Consider this code: ...
I'm wondering the way R is evaluating several across in the same summarise inside a dplyr piping. Consider the following example: The outcome produ ...
After grouping by species and taken max Sepal.Length (column 1) for each group I need to grab the value of column 2 to 4 that are associated to maximu ...
I'd like to replace all values in df_skeleton columns with the corresponding value from df_ref excluding the Date Time and ID columns. Values in df_s ...
I'd like to remove rows with NA in any one of the columns in a vector of column names. Here's a simplified example with just a couple of columns. ...
With the database pasted as example you can see how the following pipe to scale() everything but the group of intervention (categorical variable), the ...
See code below. the mutate(across(everything(), scale, .names = "{.col}_z")) part of the syntax is generating columns with [,1]appended at the end. ...
I need to take this data and group all matching values in column ESVId, while retaining each unique value in column match; and all values in column Fo ...
I already posted this as an issue in dplyr's repo on github, and they said that across is not a good fit for this type of problem, but I want to post ...
I have a data set with many columns (DATA_OLD) in which I want to exchange all values based on an allocation list with many entries (KEY). Every valu ...
I'm trying to recode a large number of variables with 5 levels ("1_Disagree", "2_SomeD", "3_Neither", "4_SomeA", "5_Agree") into variables with 3 leve ...
I have the following tibble: and I would like to correlate the Experiment_score with each of the Pattern columns for all Gene. Looking at the tidy ...
I have a wide data frame similar to document term matrix: I would like to replace bulk in all columns where x > 0 the value into the name of the ...
My dataframe has 22 variables. this is a simplified sample. the variables include x1,x2,y1_,y2_. i want to create a new variable. the variable values ...
I am new to R, and I have been using Stata for multiple years. I am trying to create a loop and a set of conditions within the loop that will do some ...
I have a following dataset with 100 variables Z1 to Z100 containing character values and 10 variables containing column numbers. Z1 ...
I would like to create factor variables for all non-factor columns. I tried: But get error message: ...
Using dplyr/accross is very easy to summarize numeric variables which group by character variables (no need input variable names). Across can use to d ...
Table: I have a dataset with multiple of the same ID, and a column "Accept_Medicare." I want to deduplicate the data set to only have one ID per ro ...