Displaying 3 results from an estimated 3 matches for "atestfun".
Did you mean:
testfun
2017 Jun 14
2
[WISH / PATCH] possibility to split string literals across multiple lines
Mark, that's actually a fair statement, although your extra operator
doesn't cause construction at parse time. 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)
benchma...
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
...a fair statement, although your extra operator
> doesn't cause construction at parse time. 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)
> cfu...
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