Let's assign value to a variable: Is there a way to multiply and assign simultaneously with %<>%? ...
Let's assign value to a variable: Is there a way to multiply and assign simultaneously with %<>%? ...
I have Why does this work whereas this throws an error? I was under the impression that %>% and |> are interchangeable. ...
I am just learning data wrangling. Currently I am data wrangling a data frame of 6422 observation and 20 variables. I have added an example to show m ...
I'm having problems when creating a new operator that uses the magrittr pipe. It works well, just not with dot notation. Is there a simple way to make ...
I can pipe from ggplot2 to plotly using: though I use the magrittr pipe and the base R pipe in the one chain. Replacing the magrittr pipe with the ...
Let's say I have the following dataset, with sheets and plots that I want to save one-by-one: Currently, if I want to save data_set$plot and data_s ...
I have a simple question that has nonetheless stumped me. I am trying to extract specific elements from a list of website headers for a set of given ...
Why does this code produce an error ? library(magrittr) c('a', 'b', 'c', 'b') %>% seq_len(length(.)) # Error in seq_len(., length(.)) : # ...
In R 4.1 introduced the native forward pipe (|>) that can be used instead of magrittr's %>%. For example, is a valid syntax in R > 4.1 and ...
Why doesn't the pipe operator %>% work in the second example in the following code ? library(magrittr) # Works job::job({install.packages("gtsum ...
I'm currently scraping stats from a website, but on certain stat pages I hit a snag with the following prompt: Error: Column avg can't be converted f ...
I recently got this amazing answer from JBGruber, to order string columns with double numerical values, which works on both datasets at the bottom of ...
I have data as follows: I would like to apply the following code: For some reason it does not work although it did with similar code before. I d ...
Please have a look at the reprex at the end of the post. For various reasons, I am transitioning from %>% to the native pipe. I struggle a bit some ...
Me and a couple of colleagues are wondering why or do not work (summary is not printed), while does? ...
I've tried to find a solution to this here, but nothing seems to address exactly my case. Sorry if I missed it. I have a data frame with each row pro ...
I've noticed that search-replace %>% with |> does induce some errors. The obvious one is the lack of a place-holder, i.e. has to be rewritten ...
I'm getting an unexpected result when piping a matrix into as.data.frame and could use some wisdom on why it's happening. When I run the below code: ...
How do you pipe an object into a specific place in an apply call, that isn't the first input? The magrittr dot placeholder does not seem to work for t ...
I want to create a list of matrices of correlations and covariances from a dataframe. I tried piping the dataframe into the list, using the magrittr p ...