Skip to main content
added 1 character in body
Source Link

99100 characters

assign("a",1:10); b<<;b<<-paste(c(a),collapse=";"); unlist;unlist(lapply(strsplit(b,";")[[1]],function(c)c[[1]]))

Not sure if lapply on strsplit is a negative example but it sure should be.

Returns as a character:

 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"

99 characters

assign("a",1:10); b<<-paste(a,collapse=";"); unlist(lapply(strsplit(b,";")[[1]],function(c)c[[1]]))

Not sure if lapply on strsplit is a negative example but it sure should be.

Returns as a character:

 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"

100 characters

assign("a",1:10);b<<-paste(c(a),collapse=";");unlist(lapply(strsplit(b,";")[[1]],function(c)c[[1]]))

Not sure if lapply on strsplit is a negative example but it sure should be.

Returns as a character:

 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"
Source Link

99 characters

assign("a",1:10); b<<-paste(a,collapse=";"); unlist(lapply(strsplit(b,";")[[1]],function(c)c[[1]]))

Not sure if lapply on strsplit is a negative example but it sure should be.

Returns as a character:

 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"