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 a named list of functions, where the names(transform_functions) correspond to the column names and the functions are the transformations to be ...
result: Is it possible to map the function by using the elements within the same dataframe? ...
I am making a shiny app where the user should be able to upload a file then filter the dataset based on the unique values (levels) of all character co ...
I'm trying to learn how to use nest(), and I'm trying to nest by once of 3 time periods participants could be in and I want to add two columns. The fi ...
I've got a dataframe like the one below (in the actual dataset the number of rows are a few thousands and I 've got more than 300 variables): which ...
I want to perform an action against a list of columns in a dataframe using map() but I get an error which I can't understand, can anyone help? I want ...
One use of pmap is to deal with situations where one might want map3, but such a function does not exist in purrr. For example: (where my examples ...
In a dplyr mutate context, I would like to select the column a function is applied to by purrr:map using the value of another column. Let's take a te ...
How to use the raw string (such as len/s) in the colnames in ggpubr::ggboxplot in R? It seems due to purrr::map with error ...
I'm trying to count how many students received 1s, 2s, 3s, 4s, and 5s across their subjects, and I want a column for each subject and the possible gra ...
I have a excel file with 131 sheets, that all contain data in the same format. Each sheet contains data of one station, and is named with that number ...
First let's set up the folder structure we need for this question. Now let's run this code: I am getting the following structure: However, wh ...
I'm trying to use map from the purrr package in a more efficient way that I'm doing right now. I have 3 different datasets, let's say iris_1, iris_2, ...
I'm trying to use the purrr map function to efficiently write many ggplot images through one call. I wrote example code that's simple for example sake ...
I have many plots that I need to create broken out by students' level. To do this, I want to use map2 from the purrr package. I want one plot for each ...
I have a problem with passing arguments to purrr::pmap when using with mutate. I don't understand why some things work and some don't. My example dat ...
I have two data.tables. The first data.table, DT_1, contains strings and a matching type as follows: I then want to return the first match of the " ...
Consider the following Rmarkdown document: When using RStudio's knit button, everything works like a charm and the output is as follows: However ...
I have two lists with different dataframes (original data has 70 dataframes for each list, totalising 2 million rows). I want either to create a ne ...
I've got a tibble of data in long format where some observations are missing --- think sales of different articles on different dates, where an articl ...