Displaying 20 results from an estimated 10000 matches similar to: "Is there a sexy way ...?"
2024 Sep 28
1
Is there a sexy way ...?
Rold,
We need to be clear on what makes an answer sexy! LOL!
I decided it was sexy to do it in a way that nobody (normal) would and had
not suggested yet.
Here is an original version I will explain in a minute. Or, maybe best a bit
before. Hee is the unformatted result whicvh is a tad hard to read but will
be made readable soon:
x <- list(`1` = c(7, 13, 1, 4, 10),
`2` = c(2, 5,
2024 Sep 28
2
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 Sep 2024, 07:21 , <avi.e.gross at gmail.com> wrote:
> I see a book coming:
> "666 ways to do the same thing in R ranked by sexiness."
>
> Kidding aside, if you look under the covers of some of the functions we
> are
2024 Sep 29
1
Is there a sexy way ...?
Admit it, Rolf. Haven't you wondered if S, in a more private way, is sexier than R?
OK, kidding aside, we have talked this to death.
Just FYI, the conversation was stimulating for some of us and I have continued on my own and located functions I see as useful in the stringi and stringr packages to make my silly version ever less silly! LOL!
-----Original Message-----
From: Rolf Turner
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
2
Is there a sexy way ...?
"Sexy code" may get a job done and demonstrate the code's knowledge of a programming language, but it often does this at the expense of clear, easy to document (i.e. annotate what the code does), easy to read, and easy to understand code. I fear that this is what this thread has developed "sexy" but not easily understandable code. While I send kudos to all of you, remember
2024 Sep 27
1
Is there a sexy way ...?
>>>>> Chris Evans via R-help
>>>>> on Fri, 27 Sep 2024 12:20:47 +0200 writes:
> Oh glorious!? Thanks Duncan.
> Fortune cookie nomination!
I don't disagree with the nomination -- thank you, Duncan!
However, please note that I'm sure Rolf's was challenged /
question was ment to work correctly for all factors `f` with
levels
2024 Sep 28
1
Is there a sexy way ...?
Sorry to append, but I just realised that of course
```
x |>
? pmap(c) |>
? reduce(c) |>
? unname()
```
also works and is a general solution in case your list has more than
three elements. Here, we map in parallel over all elements of 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
2024 Sep 28
1
Is there a sexy way ...?
I see a book coming:
"666 ways to do the same thing in R ranked by sexiness."
Kidding aside, if you look under the covers of some of the functions we are using, we may find we are taking steps back 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
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 Apr 22
2
x[0]: Can '0' be made an allowed index in R?
You could have negative indices. There are two ways to do this.
1) provide a large offset.
Offset <- 30
for (i in -29 to 120) { print(df[i+Offset])}
2) use absolute values if all indices are negative.
for (i in -200 to -1) {print(df[abs(i)])}
Tim
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Peter Dalgaard via R-help
Sent: Monday, April 22,
2024 Feb 27
1
Interactions in regression
I have no real idea what you are trying to do, but if a table is
what you want, you can probably get it using the table() function.
Or, more likely, the xtabs() function.
Using your example from an earlier post (adjusted to make it
comprehensible to the human mind):
set.seed(1000)
time <- factor(rep(c("Pre","Post"),each=200))
treatment <-
2024 Feb 28
1
Interactions in regression
Hi Rolf,
No it is not.
I don't know to which question did you want to respond ?
I desribed everything in my first email and attached links from SO with
pictures included, which are quite understandable.
Cheers,
Jacek
wt., 27 lut 2024 o 02:29 Rolf Turner <rolfturner at posteo.net> napisa?(a):
>
> I have no real idea what you are trying to do, but if a table is
> what you
2024 Apr 22
1
x[0]: Can '0' be made an allowed index in R?
Heh. Did anyone bring up negative indices yet?
-pd
> On 22 Apr 2024, at 10:46 , Rolf Turner <rolfturner at posteo.net> wrote:
>
>
> See fortunes::fortune(36).
>
> cheers,
>
> Rolf Turner
>
> --
> Honorary Research Fellow
> Department of Statistics
> University of Auckland
> Stats. Dep't. (secretaries) phone:
> +64-9-373-7599
2024 Feb 05
1
Help
Please see fortunes::fortune(285).
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secretaries) phone:
+64-9-373-7599 ext. 89622
Home phone: +64-9-480-4619
2024 Apr 22
1
x[0]: Can '0' be made an allowed index in R?
See fortunes::fortune(36).
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secretaries) phone:
+64-9-373-7599 ext. 89622
Home phone: +64-9-480-4619
2024 May 07
1
Is there some way to customize colours for the View output?
On Tue, 7 May 2024 06:34:50 -0400
Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 07/05/2024 6:31 a.m., Iago Gin? V?zquez wrote:
> > Thanks Duncan.
> >
> > I am currently on Windows. Is there any solution for it?
>
> Switch to Linux or MacOS?
Fortune nomination!
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of
2024 Dec 02
1
Fortune nomination.
On Sun, 1 Dec 2024 21:43:45 -0800
Bert Gunter <bgunter.4567 at gmail.com> wrote:
> Finally, my best advice would be to forget about SAS if you wish to
> use R. Trying to translate SAS paradigms into R is the devil's work.
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secretaries) phone:
2023 Feb 13
2
Removing variables from data frame with a wile card
x[?V2?] would retain columns of x headed by V2. What I need is the opposite??I need a data grime with those columns excluded.
Steven from iPhone
> On Feb 13, 2023, at 9:33 AM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
>
> ?
>> On Sun, 12 Feb 2023 14:57:36 -0800
>> Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote:
>>
>> x["V2"]
2024 May 13
1
Is there some way to customize colours for the View output?
Hi all,
I've just could test your suggestions on using dataedit... entries now, and indeed they work... partially. See, please, the next screenshot:
https://ibb.co/Dkn2pVs
dataedituser modifies the red borders
dataedittext the yellow text
dataeditfg... I do not know, specified to green the output of View(mtcars) does not change from that of the screenshot
dataeditbg is the (almost) black
2024 Nov 26
1
Using vi syntax in command line editing.
Maybe
https://stackoverflow.com/questions/6235034/vi-keybindings-for-r-command-line-like-in-bash
?? (tl;dr "set editing-mode vi" or "set keymap vi" in .inputrc ... )
On 11/25/24 20:09, Rolf Turner wrote:
>
>
> I have recently acquired a new laptop. (My old one was giving me
> ominous messages on boot-up, about possible hard drive problems.)
>
> I