I have the following dataset loaded into RStudio: Dataset I'm trying to create a new variable/ column named "betaplasma_calories_males". The new var ...
I have the following dataset loaded into RStudio: Dataset I'm trying to create a new variable/ column named "betaplasma_calories_males". The new var ...
I have a table which looks like: Col A Col b a 2,3,4,5 a 3,5,6,7,8 ...
I have a long format dataset like that: ID year Address Classification 1 2020 A ...
I have a large data.frame called "sim" that has a character colunm named "CAUSABAS", something like this: This data.frame is created using the pack ...
I have a data frame with unequal numbers of rows per group, see df in the example below. I would like to add rows containing the group name and NAs in ...
I am trying to replace two values, Value and Value1, in a row with the specific name (Description). Now I expect from the code, first to find the r ...
How can we get first non-missing value - coalesce - row-wise using dplyr (tidyverse) for all columns without specifying column names? Example data: ...
I know this has been discussed already, but can't find a solution that works for me. I have several binary (0/1) variables named "indic___1" to "indic ...
So, the issue that I've got is that I am trying to transform a series of numbers which appear to me in scientific notation, say 1.39+e14, into single ...
I am looking to develop a tab(x, y) function or tab(x, y, d) (where d = data.frame) to replace this command: d <- mtcars d |> dplyr::select(cyl ...
I'm trying to scrape in R a list of apartments for sale and the basic info (address, m2, price, rooms, etc.) of this website: https://www.boligsiden.d ...
I am trying to perform a meta-analysis on a dataset in which multiple authors have multiple studies which might cause bias. Therefore, I want to extra ...
If I have a df and want to do a grouped ID i would do: following(How to create a consecutive group number answer of @Ronak Shah). Now I have a lis ...
Two big real life tables to join up, but here's a little reprex: I've got a table of small strings and I want to left join on a second table, with th ...
Suppose I have a data frame as follows: date price company 2000-10-01 18 A ...
I am looking to generate a longitudinal dataset. I have generated my pat numbers and treatment groups: My timepoints (in days) are: How can I pi ...
I'm generating some data as follows: This gives me a table like: I want to pivot this into longer format, so I have the columns: timepoints_days ...
I have a named list of functions, where the names(transform_functions) correspond to the column names and the functions are the transformations to be ...
I have two datasets. I want to assign for every row of second dataset a "Group" from first dataset based on "Probabilities" from first dataset. Logic ...