Skip to main content
11 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited CommunityBot
Commonmark migration
Mar 17, 2017 at 0:36 comment added skan I've always wondered why R coders in this section don't just use a variable name instead of scan, as other do with their languages.
Mar 2, 2017 at 22:06 comment added Gregor Thomas @raymkchow library(magrittr) adds quite a few bytes.
Mar 2, 2017 at 8:49 comment added rturnbull You can save one byte by putting the n assignment inside of array: array(n<-scan(),rep(n,n)).
Mar 1, 2017 at 17:14 comment added BLT pryr::f(array(n,rep(n,n))) creates an unnamed function instead of using scan, but doesn't save any bytes.
Mar 1, 2017 at 10:35 comment added raymkchow can it be scan()%>%array(rep(.,.))? It uses magrittr operator
Mar 1, 2017 at 1:19 comment added Flounderer Yes, you can replace n=scan(); by function(n) but it makes it longer.
Feb 28, 2017 at 21:58 comment added Adám Right, I don't know R at all. I just thought that you could specify a function somehow instead.
Feb 28, 2017 at 21:43 comment added Flounderer Looking at the other answers, it seems like it either has to be a function or accept input somehow?
Feb 28, 2017 at 21:42 comment added Adám is scan() necessary?
Feb 28, 2017 at 21:40 history answered Flounderer CC BY-SA 3.0