search for: dparse

Displaying 7 results from an estimated 7 matches for "dparse".

Did you mean: parse
2019 Mar 02
1
stopifnot
...ntical(quote(expression), E1)) - eval(exprs, envir=envir) + exprs else - as.expression(exprs) # or fail .. + call("expression", exprs) # or fail .. + if(!is.null(names(cl))) names(cl) <- NULL + cl[[1]] <- sys.call()[[1]] + return(eval(cl, envir=envir)) } Dparse <- function(call, cutoff = 60L) { ch <- deparse(call, width.cutoff = cutoff) @@ -62,14 +65,10 @@ abbrev <- function(ae, n = 3L) paste(c(head(ae, n), if(length(ae) > n) "...."), collapse="\n ") ## - for (i in seq_along(cl)) { - cl.i <- cl[[i]] - #...
2019 Mar 05
2
stopifnot
...e ? ? > -? ? ? ? as.expression(exprs) # or fail .. ? ? > +? ? ? ? call("expression", exprs) # or fail .. ? ? > +? ? ? ? if(!is.null(names(cl))) names(cl) <- NULL ? ? > +? ? ? ? cl[[1]] <- sys.call()[[1]] ? ? > +? ? ? ? return(eval(cl, envir=envir)) ? ? > } ? ? > Dparse <- function(call, cutoff = 60L) { ? ? > ch <- deparse(call, width.cutoff = cutoff) ? ? > @@ -62,14 +65,10 @@ ? ? > abbrev <- function(ae, n = 3L) ? ? > paste(c(head(ae, n), if(length(ae) > n) "...."), collapse="\n? ") ? ? > ## ? ? > -? ? for (i in s...
2019 Mar 05
0
stopifnot
...> ? ? > +? ? ? ? call("expression", exprs) # or fail .. > ? ? > +? ? ? ? if(!is.null(names(cl))) names(cl) <- NULL > ? ? > +? ? ? ? cl[[1]] <- sys.call()[[1]] > ? ? > +? ? ? ? return(eval(cl, envir=envir)) > ? ? > } > ? ? > Dparse <- function(call, cutoff = 60L) { > ? ? > ch <- deparse(call, width.cutoff = cutoff) > ? ? > @@ -62,14 +65,10 @@ > ? ? > abbrev <- function(ae, n = 3L) > ? ? > paste(c(head(ae, n), if(length(ae) > n) "...."), collapse="\n? ")...
2019 Mar 02
0
stopifnot
...eval(exprs, envir=envir) + exprs else - as.expression(exprs) # or fail .. + call("expression", exprs) # or fail .. + if(!is.null(names(cl))) names(cl) <- NULL + cl[[1]] <- sys.call()[[1]] + return(eval(cl, envir=envir)) } Dparse <- function(call, cutoff = 60L) { ch <- deparse(call, width.cutoff = cutoff) @@ -62,14 +65,10 @@ abbrev <- function(ae, n = 3L) paste(c(head(ae, n), if(length(ae) > n) "...."), collapse="\n ") ## - for (i in seq_along(cl)) { - cl.i <- cl[[i]...
2017 May 15
2
stopifnot() does not stop at first non-TRUE argument
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Wed, 3 May 2017 12:08:26 -0700 writes: > On 05/03/2017 12:04 PM, Herv? Pag?s wrote: >> Not sure why the performance penalty of nonstandard evaluation would >> be more of a concern here than for something like switch(). > which is actually a primitive. So it seems that
2019 Feb 27
1
stopifnot
...ression, as.list(exprs[-1])) + exprs[-1] else if(identical(quote(expression), E1)) eval(exprs, envir=envir) else as.expression(exprs) # or fail .. + if(!is.null(names(cl))) names(cl) <- NULL + return(eval(as.call(c(sys.call()[[1]], as.list(cl))), envir=envir)) } Dparse <- function(call, cutoff = 60L) { ch <- deparse(call, width.cutoff = cutoff) @@ -62,14 +64,10 @@ abbrev <- function(ae, n = 3L) paste(c(head(ae, n), if(length(ae) > n) "...."), collapse="\n ") ## - for (i in seq_along(cl)) { - cl.i <- cl[[i]] - #...
2017 May 15
3
stopifnot() does not stop at first non-TRUE argument
I see in the archives that the attachment cannot pass. So, here is the code: 8<---- stopifnot_new <- function (...) { mc <- match.call() n <- length(mc)-1 if (n == 0L) return(invisible()) Dparse <- function(call, cutoff = 60L) { ch <- deparse(call, width.cutoff = cutoff) if (length(ch) > 1L) paste(ch[1L], "....") else ch } head <- function(x, n = 6L) x[seq_len(if (n < 0L) max(length(x) + n, 0L) else min(n,...