search for: kasserra

Displaying 10 results from an estimated 10 matches for "kasserra".

2024 Sep 28
2
Is there a sexy way ...?
...and perhaps more functionality than we need. > > But for a new reader , looking at many approaches may open up other ways > and ideas and see the problem space as quite vast. > > -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of Lennart Kasserra > Sent: Saturday, September 28, 2024 1:59 AM > To: Rolf Turner <rolfturner at posteo.net>; r-help at r-project.org; > lennart.kasserra at gmail.com > Subject: Re: [R] Is there a sexy way ...? > > Sorry to append, but I just realised that of course > > ``` > > x |...
2024 Sep 28
1
Is there a sexy way ...?
...age. Python users often ask if a solution is ?pythonic?. But I am not aware of R users having any special name like ?R-thritic? and that may be a good thing. From: CALUM POLWART <polc1410 at gmail.com> Sent: Saturday, September 28, 2024 5:27 AM To: avi.e.gross at gmail.com Cc: Lennart Kasserra <lennart.kasserra at gmail.com>; Rolf Turner <rolfturner at posteo.net>; r-help at r-project.org Subject: Re: [R] Is there a sexy way ...? Avi I fear this was all a huge social experiment. Testing if a post titled "sexy way" would increase engagement... On Sat, 28 Se...
2024 Sep 29
1
Is there a sexy way ...?
...seful in the stringi and stringr packages to make my silly version ever less silly! LOL! -----Original Message----- From: Rolf Turner <rolfturner at posteo.net> Sent: Saturday, September 28, 2024 10:11 PM To: CALUM POLWART <polc1410 at gmail.com> Cc: avi.e.gross at gmail.com; Lennart Kasserra <lennart.kasserra at gmail.com>; r-help at r-project.org Subject: Re: [R] Is there a sexy way ...? On Sat, 28 Sep 2024 10:26:31 +0100 CALUM POLWART <polc1410 at gmail.com> wrote: > Avi > > I fear this was all a huge social experiment. > > Testing if a post titled &q...
2024 Sep 28
1
Is there a sexy way ...?
...as some of them use others and perhaps more functionality than we need. But for a new reader , looking at many approaches may open up other ways and ideas and see the problem space as quite vast. -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Lennart Kasserra Sent: Saturday, September 28, 2024 1:59 AM To: Rolf Turner <rolfturner at posteo.net>; r-help at r-project.org; lennart.kasserra at gmail.com Subject: Re: [R] Is there a sexy way ...? Sorry to append, but I just realised that of course ``` x |> pmap(c) |> reduce(c) |> unn...
2024 Sep 28
1
Is there a sexy way ...?
...f the list, always combining the current set of elements into a vector, and then reduce the resulting list into a vector by combining the elements in order. This yields a named vector which we can un-name given this was not desired.n All the best, Lennart Am 28.09.24 um 07:52 schrieb Lennart Kasserra: > Hi Rolf, > > this topic is probably already saturated, but here is a tidyverse > solution: > > ``` > > library(purrr) > > x <- list( > ? `1` = c(7, 13, 1, 4, 10), > ? `2` = c(2, 5,? 14, 8, 11), > ? `3` = c(6, 9, 15, 12, 3) > ) > > x |> >...
2024 Apr 13
1
any and all
...row where both of them are missing. Another way of writing this would be ``` data |> ? filter(!if_all(ends_with(c(".a", ".b")), is.na)) ``` i.e. don't keep rows where all columns ending in .a or .b are `NA`, which returns the same result. Hope this helps, Lennart Kasserra Am 12.04.24 um 21:52 schrieb avi.e.gross at gmail.com: > Base R has generic functions called any() and all() that I am having trouble > using. > > It works fine when I play with it in a base R context as in: > >> all(any(TRUE, TRUE), any(TRUE, FALSE)) > [1] TRUE >&...
2024 Sep 29
1
Is there a sexy way ...?
On Sat, 28 Sep 2024 10:26:31 +0100 CALUM POLWART <polc1410 at gmail.com> wrote: > Avi > > I fear this was all a huge social experiment. > > Testing if a post titled "sexy way" would increase engagement... <SNIP> I conjecture that this conjecture was tongue-in-cheek. Be that as it were ??, let me assure everyone that such was not my intention. The usage
2024 Sep 28
1
Is there a sexy way ...?
Hi Rolf, this topic is probably already saturated, but here is a tidyverse solution: ``` library(purrr) x <- list( ? `1` = c(7, 13, 1, 4, 10), ? `2` = c(2, 5,? 14, 8, 11), ? `3` = c(6, 9, 15, 12, 3) ) x |> ? pmap(~ c(..1, ..2, ..3)) |> ? reduce(c) #> [1]? 7? 2? 6 13? 5? 9? 1 14 15? 4? 8 12 10 11? 3 ``` Here, we map over the elements of the list in parallel (hence pmap),
2024 Jan 11
4
arrow on contour line
Hello, I am drawing contour lines for a function of 2 variables at one level of the value of the function and want to include a small arrow in any direction of increase of the function. Is there some way to do that? Below is an example that creates the contour lines. How do I add one small arrow on each line in the direction of increase of the function (at some central point of the contour
2024 Apr 12
2
any and all
Base R has generic functions called any() and all() that I am having trouble using. It works fine when I play with it in a base R context as in: > all(any(TRUE, TRUE), any(TRUE, FALSE)) [1] TRUE > all(any(TRUE, TRUE), any(FALSE, FALSE)) [1] FALSE But in a tidyverse/dplyr environment, it returns wrong answers. Consider this example. I have data I have joined together with pairs of