Skip to main content
13 events
when toggle format what by license comment
Dec 28, 2021 at 12:06 comment added U13-Forward @DominicvanEssen Ah, that's cool, never knew scan()
Dec 28, 2021 at 12:05 comment added Dominic van Essen @U12-Forward - (it's a bit similar to using scan() for input: it usually saves a trivial 2 bytes compared to defining a function - like this - but it isn't always very clever or interesting...)
Dec 28, 2021 at 12:02 history edited Dominic van Essen CC BY-SA 4.0
added 62 characters in body
Dec 28, 2021 at 12:01 comment added Dominic van Essen @U12-Forward - I'll edit to mention it. Generally, though, I don't use it where it doesn't achieve better than the trivial 7-byte saving (especially because it's convenient to be able to directly compare answers on 'Try it online', which doesn't support R version 4.1).
Dec 28, 2021 at 11:53 comment added U13-Forward @DominicvanEssen Mentioned here Tips for golfing in R
Dec 28, 2021 at 11:52 comment added U13-Forward @DominicvanEssen You should add in your answer that you could use the new R function assignment with \ backslash, to save 7 bytes.
Dec 28, 2021 at 11:50 comment added U13-Forward @pajonk Ah, didn't see it
Dec 28, 2021 at 11:50 comment added pajonk I've deleted my longer straightforward boring answer after seeing yours.
Dec 28, 2021 at 11:50 comment added U13-Forward @DominicvanEssen Wow! First R answer here! Thanks.
Dec 28, 2021 at 11:48 history edited Dominic van Essen CC BY-SA 4.0
added 30 characters in body
Dec 28, 2021 at 11:47 comment added Dominic van Essen @pajonk - I saw it in your answer, and was just editing it in, but it seemed sneaky...
Dec 28, 2021 at 11:46 comment added pajonk Try expand.grid without rep!
Dec 28, 2021 at 11:43 history answered Dominic van Essen CC BY-SA 4.0