Displaying 3 results from an estimated 3 matches for "atestfun2".
Did you mean:
atestfun
2017 Jun 14
2
[WISH / PATCH] possibility to split string literals across multiple lines
...You still call paste0(), but just
add an extra layer on top of it.
I also doubt that even in gigantic loops the benefit is going to be
significant. Take following example:
atestfun <- function(x){
y <- paste0("a very long",
"string for testing")
grep(x, y)
}
atestfun2 <- function(x){
y <- "a very long
string for testing"
grep(x,y)
}
cfun <- cmpfun(atestfun)
cfun2 <- cmpfun(atestfun2)
require(rbenchmark)
benchmark(atestfun("a"),
atestfun2("a"),
cfun("a"),
cfun2("a"),...
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
...ayer on top of it.
>
> I also doubt that even in gigantic loops the benefit is going to be
> significant. Take following example:
>
> atestfun <- function(x){
> y <- paste0("a very long",
> "string for testing")
> grep(x, y)
> }
> atestfun2 <- function(x){
> y <- "a very long
> string for testing"
> grep(x,y)
> }
> cfun <- cmpfun(atestfun)
> cfun2 <- cmpfun(atestfun2)
>
> require(rbenchmark)
> benchmark(atestfun("a"),
> atestfun2("a"),
>...
2017 Jun 14
4
[WISH / PATCH] possibility to split string literals across multiple lines
On Wed, 14 Jun 2017 06:12:09 -0500, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 14/06/2017 5:58 AM, Andreas Kersting wrote:
> > Hi,
> >
> > I would really like to have a way to split long string literals across
> > multiple lines in R.
>
> I don't understand why you require the string to be a literal. Why not
> construct the long