search for: deparses

Displaying 20 results from an estimated 1302 matches for "deparses".

Did you mean: deparse
2016 Jan 05
0
deparse with parentheses for SUBSET
> maybe there?s a reason for it, but the discrepancy between the > handling of `[` and `$` in deparsing seems odd to me: > > > substitute(a[1], list(a = quote(x * y))) > x * y[1] > > > substitute(a$b, list(a = quote(x * y))) > (x * y)$b > > The former is still executed in the right order (`*` first, then > `[`), which is not what you?d expect looking at the
2010 Feb 09
1
cbind(deparse.level=2,...) problems
Should the deparse.level=2 argument to cbind and rbind be abandoned? It is minimally documented, not used in any CRAN package, and causes some problems. E.g., (a) If a matrix input has row names but not column names cbind(deparse.level=2,...) stops. > m<-matrix(11:14,nrow=2,ncol=2,dimnames=list(Row=c("R1","R2"),Col=charact er())) > cbind(m, 101:102,
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
...type 'builtin' to vector of type 'character' ??? ## Calls: system.time -> do.call -> <Anonymous> ??? ## Timing stopped at: 0 0 0 Unfortunately this will affect all `deparse` calls, and it seems undesirable to pre-emptively enable it just for calls that might cause large deparses on error. An alternative is to store the actual calls instead of their deparsed character equivalents in `.Traceback`.? This defers the deparsing to when `traceback()` is used.? As per `?traceback`, it should be relatively safe to modify `.Traceback` in this way: > It is undocumented where .T...
2008 Nov 25
2
dots methods: dispatch issues
There seems to be a bug arising when using multiple S4 generics with "..." as the signature. The following code works as expected: ############################################################## > setGeneric("rbind", function(..., deparse.level=1) standardGeneric("rbind"), + signature = "...") Creating a generic for "rbind" in
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
...tor of type 'character' > ??? ## Calls: system.time -> do.call -> <Anonymous> > ??? ## Timing stopped at: 0 0 0 > > Unfortunately this will affect all `deparse` calls, and it seems > undesirable to pre-emptively enable it just for calls that might cause > large deparses on error. > > An alternative is to store the actual calls instead of their deparsed > character equivalents in `.Traceback`.? This defers the deparsing to > when `traceback()` is used.? As per `?traceback`, it should be > relatively safe to modify `.Traceback` in this way: > >&...
2006 Jul 24
1
deparse - width.cutoff
I have a question about "deparse" function in R What is the reason that "deparse" use an argument like "width.cutoff" ? Why the maximum cutoff is 500? I was manipulating an R formula and used "deparse". Since the length of user's formula was greater then 500, my code didnt work. thanks Johan johan Faux <johanfaux@yahoo.com> wrote: I have a
2014 Jul 28
1
Parsing and deparsing of escaped unicode characters
In both R and JSON (and many other languages), unicode characters can be escaped using a backslash followed by a lowercase "u" and a 4 digit hex code. However when deparsing a character vector in R on Windows, the non-latin characters get escaped as "<U+" followed by their 4 digit hex code and ">": > x <- "I like \u5BFF\u53F8" > cat(x) I like
2019 Jul 16
1
[External] Mitigating Stalls Caused by Call Deparse on Error
...## Calls: system.time -> do.call -> <Anonymous> >>> ## Timing stopped at: 0 0 0 >>> >>> Unfortunately this will affect all `deparse` calls, and it seems >>> undesirable to pre-emptively enable it just for calls that might cause >>> large deparses on error. >>> >>> An alternative is to store the actual calls instead of their deparsed >>> character equivalents in `.Traceback`. This defers the deparsing to >>> when `traceback()` is used. As per `?traceback`, it should be >>> relatively safe to mo...
2016 Jan 04
1
deparse with parentheses for SUBSET
Hi, maybe there?s a reason for it, but the discrepancy between the handling of `[` and `$` in deparsing seems odd to me: > substitute(a[1], list(a = quote(x * y))) x * y[1] > substitute(a$b, list(a = quote(x * y))) (x * y)$b The former is still executed in the right order (`*` first, then `[`), which is not what you?d expect looking at the deparse result. Some code that shows the execution
2019 Jul 14
0
[External] Mitigating Stalls Caused by Call Deparse on Error
...tor of type 'character' > ??? ## Calls: system.time -> do.call -> <Anonymous> > ??? ## Timing stopped at: 0 0 0 > > Unfortunately this will affect all `deparse` calls, and it seems > undesirable to pre-emptively enable it just for calls that might cause > large deparses on error. > > An alternative is to store the actual calls instead of their deparsed > character equivalents in `.Traceback`.? This defers the deparsing to > when `traceback()` is used.? As per `?traceback`, it should be > relatively safe to modify `.Traceback` in this way: > >&...
2019 Jul 15
0
[External] Mitigating Stalls Caused by Call Deparse on Error
...er' >> ??? ## Calls: system.time -> do.call -> <Anonymous> >> ??? ## Timing stopped at: 0 0 0 >> >> Unfortunately this will affect all `deparse` calls, and it seems >> undesirable to pre-emptively enable it just for calls that might cause >> large deparses on error. >> >> An alternative is to store the actual calls instead of their deparsed >> character equivalents in `.Traceback`.? This defers the deparsing to >> when `traceback()` is used.? As per `?traceback`, it should be >> relatively safe to modify `.Traceback` in...
2011 Jan 14
2
question about deparse(substitute(...))
Dear R helpers: I like to apply deparse(substitute()) on multiple arguments to collect the names of the arguments into a character vector. I used function test.fun as below. it works when there is only one input argument. but it does not work for multiple arguements. can someone kindly help? test.fun <- function(...){deparse(substitute(...))} test.fun(x) #this works test.fun(x,y,z) # I like
2001 Jul 31
4
nlme: bug in getCovariateFormula (PR#1038)
I found that predict.gnls failed with a wierd error message about a non-numeric argument to a binary vector in one of three nearly identical uses. Error in Inh/Ki : non-numeric argument to binary operator (Inh and Ki are arguments to the function used in the formula for the object whose predictions were requested). It turns out that the problem is in getCovariateFormula(). The final line in
2006 Jul 27
3
deparse(substitute(foo))
I see that plot.default uses deparse(substitute(x)) to extract the character name of an argument and put it on the vertical axis. Hence: foo <- 1:10 plot( foo ) will put the label "foo" on the vertical axis. However, for a function that takes a "..." list as an input, I can only extract the first argument name: x <- 1:10 y <- 10:20 foo <- function(...) {
2011 Apr 10
1
deparse operators in expressions
Hi, I observed a slight problem in deparse(): it will add spaces around most operators except /. I wonder if this is easy to fix. I know this is quite trivial, but I will appreciate if / is not treated as an exception. Examples: > deparse(expression(1/1)) [1] "expression(1/1)" > deparse(expression(1+1)) [1] "expression(1 + 1)" > deparse(expression(1%in%1)) [1]
2012 Nov 22
0
why does do_stop call R_GetTraceback ?
I'm using: R 2.15.1 (beta), 2012-06-11, svn.rev 59557, x86_64-unknown-linux-gnu And I normally use: options("error"=recover) I recently ran into a problem where when my code called stop(), recover() was incredibly slow (hours) because it was trying to deparse an extremely large call. I worked around that by instead using my own recover function which avoids deparsing anything
2009 Nov 19
3
Issue when calling deparse(substitute(x)) from C with "anonymous" R vectors ?
Dear list, When calling R from C, what appears like a spurious error can be triggered during the execution of chisq.test(x, y). This is happening when the following conditions are met: - x and y are "anonymous" C-level R vectors (they do not have a symbol), but they are protected from garbage collection - x and y are "not too small" (it was experienced as soon as they are
2007 Mar 23
1
substitute and S4 objects
Hi all, I don't understand why this does not what I expect : ## code start here ############## setClass("num",representation(x="numeric")) num<-function(x) new("num",x=x) add<-function(e1,e2) { cat("Computing ",deparse(substitute(e1)),"+",deparse(substitute(e2)),"\n") e1@x+e2@x }
2016 May 05
1
Too many spaces in deparsed complex numbers with digits17 control option
If you set the "digits17" control option in deparse, you get a lot of unnecessary space in the representation of complex numbers. > deparse(0 + 0i) [1] "0+0i" > deparse(0 + 0i, control = "digits17") [1] "0 + 0i" As far as I can tell, the logic for this comes from this piece of /src/main/deparse.c: if (TYPEOF(vector) == CPLXSXP
2009 Nov 09
1
deparse() and the 'else' statement
Hi all, It is recommended in ?'if' that we use 'else' right after '}' instead of starting a new line, but I noticed deparse() will separate '}' and 'else' when the 'if...else' clause is used inside {...} (e.g. function body). Here is an example: ## if/else inside {} > cat(deparse(parse(text='function(){if (TRUE) {1} else {2}}')),