Skip to main content
4 votes
2 answers
101 views

If you want to call a function that returns multiple values on a column of a data.frame, and append these values as new columns to the data.frame, you can mutate(map()) |> unnest_wider(). If it's ...
mac's user avatar
  • 3,794
0 votes
1 answer
87 views

Taking the following data: library(tidyverse) df <- data.frame(id = c("a", "a", "a", "b", "b", "b"), x = c(NA, "...
deschen's user avatar
  • 11.6k
2 votes
2 answers
353 views

I was excited when I read about the latest update of purrr (1.1.0) with its in_parallel capabilities. I just happen to have a time-consuming data task that runs for several minutes, because: my data ...
deschen's user avatar
  • 11.6k
2 votes
2 answers
134 views

I have a simple list like library(tidyverse) library(openxlsx) mtcars |> group_split(cyl) And now I want to save each list as an Excel file to the folder specified in cyl like so: mtcars |> ...
deschen's user avatar
  • 11.6k
1 vote
1 answer
122 views

I want to remove passwords from several Excel files, so I specified a data frame with paths and passwords and then added some python code running with reticulate. When I pass that function to a for ...
deschen's user avatar
  • 11.6k
0 votes
1 answer
84 views

I like to call a command line utility from R and parallelise the tool by calling several copies of it in different folders. Each call can have quite different runtimes, so I'd like to do this in an ...
user3460194's user avatar
0 votes
2 answers
81 views

I tried to use 'map' to filter a list of dataset. how can I extract the name of dataframe, which is 'YYY' in my code. library(dplyr) library(purrr) df1 <- data.frame(var1=seq(1:10), var2=seq(1:10),...
Stataq's user avatar
  • 2,419
0 votes
1 answer
79 views

I have a deeply nested list that I am trying to extract into a simple df. Sample List df <- tibble::tribble( ~division, ~id, ...
Jazzmatazz's user avatar
1 vote
3 answers
153 views

I have this small function and want to apply it to a dataset using purrr::map(). It does what I expect it to do, but after the output it also prints a list of NULL, which I don't want. I would like to ...
Claudio's user avatar
  • 1,615
1 vote
1 answer
94 views

I'm working with the Jira Native API to bring in dashboard data to R for rectangularizing. The max results that can be returned each call is 100. I'm working with a small dashboard atm but am thinking ...
PhDavey's user avatar
  • 438
0 votes
0 answers
42 views

In the process of learning this part: vectorised functions The current version of purrr has deprecated the invoke_map function, what is the problem with this latter code? I am really confused. sim <...
Breeze's user avatar
  • 586
1 vote
1 answer
86 views

I have an issue when working with httr2::last_response() and purrr::possibly() and I can't quite figure out how to resolve it, as other posts involving either httr2 or purrr::possibly doesn't really ...
PeRiKo's user avatar
  • 13
1 vote
4 answers
123 views

I'm trying to select specific items in a list that are not in the top level, and everything I can think of doesn't work the way I would expect. Here is a dummy list where what I do NOT want is item &...
shirewoman2's user avatar
  • 1,960
-1 votes
1 answer
61 views

Based on this post for gglikert. There the group1 column had 2 levels and group2 has 3. Now if i implement it with 3 levels in group1 and 4 levels in group2 library(ggstats) library(dplyr) library(...
Homer Jay Simpson's user avatar
0 votes
1 answer
46 views

I have a bunch of dataframes that contain individual-level person data for complex survey weight adjusted survey data at a state level. Say one for each state: df_1, df_2, ..., df_50 I have a ...
abrar's user avatar
  • 153

15 30 50 per page
1
2 3 4 5
237