search for: expr

Displaying 20 results from an estimated 2328 matches for "expr".

2014 Jun 25
0
[ANNOUNCE] libnftnl 1.0.2 release
...the event monitoring and fixes for the XML/JSON infrastructure See ChangeLog for more details. You can download this library from: http://www.netfilter.org/projects/libnftnl/downloads.html ftp://ftp.netfilter.org/pub/libnftnl/ Have fun! -------------- next part -------------- Ana Rey (76): expr: log: Code refactoring in nft_rule_expr_log_snprintf expr: log: Rename variables in nft_rule_expr_log_json_parse functions expr: log: Use nft_rule_expr_set_* in the xml parsing code expr: log: Do not print unset values in xml expr: log: Do not print unset values in json...
2019 May 30
2
stopifnot
Here is a patch to function 'stopifnot' that adds 'evaluated' argument and makes 'exprs' argument in 'stopifnot' like 'exprs' argument in 'withAutoprint'. --- stop.R 2019-05-30 14:01:15.282197286 +0000 +++ stop_new.R 2019-05-30 14:01:51.372187466 +0000 @@ -31,7 +31,7 @@ .Internal(stop(call., .makeMessage(..., domain = domain))) } -stopifnot &l...
2010 Nov 26
3
Calling substitute(expr, list(a=1)) when expr <- expression(a+b+c)
# The result I am after is the result after a substitution in an expression, such as substitute(expression(a+b+c), list(a=1)) expression(1 + b + c) # However, the way I want to do it is for a an expression "stored as a variable" as (expr <- expression(a+b+c)) expression(a + b + c) # a) The following does not work (expr2 <- substitute(expr, list(a...
2019 Mar 02
1
stopifnot
A private reply by Martin made me realize that I was wrong about stopifnot(exprs=TRUE) . It actually works fine. I apologize. What I tried and was failed was stopifnot(exprs=T) . Error in exprs[[1]] : object of type 'symbol' is not subsettable The shortcut assert <- function(exprs) stopifnot(exprs = exprs) mentioned in "Warning" section of the documentati...
2019 Mar 05
2
stopifnot
Another possible shortcut definition: assert <- function(exprs) do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) After thinking again, I propose to use ??? ? ? stop(simpleError(msg, call = if(p <- sys.parent()) sys.call(p))) - It seems that the call is the call of the frame where stopifnot(...) is evaluated. Becaus...
2007 Dec 22
0
[LLVMdev] random warnings
On Dec 20, 2007, at 3:56 PM, Mike Stump wrote: > They looked real enough to me: Fixed, thanks. -Chris > > > /Volumes/mrs5/net/llvm/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp: In > function ‘bool<unnamed>::isFPS16Immediate(llvm::ConstantFPSDNode*, > short int&)’: > /Volumes/mrs5/net/llvm/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp: > 148: warning:
2007 Dec 20
2
[LLVMdev] random warnings
They looked real enough to me: /Volumes/mrs5/net/llvm/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp: In function ‘bool<unnamed>::isFPS16Immediate(llvm::ConstantFPSDNode*, short int&)’: /Volumes/mrs5/net/llvm/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp: 148: warning: dereferencing type-punned pointer will break strict- aliasing rules
2014 May 01
3
How to test if an object/argument is "parse tree" - without evaluating it?
This may have been asked before, but is there an elegant way to check whether an variable/argument passed to a function is a "parse tree" for an (unevaluated) expression or not, *without* evaluating it if not? Currently, I do various rather ad hoc eval()+substitute() tricks for this that most likely only work under certain circumstances. Ideally, I'm looking for a isParseTree() function such that I can call: expr0 <- foo({ x <- 1 }) expr1 <- fo...
2019 Mar 05
0
stopifnot
>>>>> Suharto Anggono Suharto Anggono >>>>> on Tue, 5 Mar 2019 17:29:20 +0000 writes: > Another possible shortcut definition: > assert <- function(exprs) > do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) Thank you. I think this is mostly a matter of taste, but I liked your version using eval() & substitute() a bit more. For me, do.call() is a heavy hammer I only like to use when needed.. Or wo...
2016 Oct 19
2
How to assign NULL value to pairlist element while keeping it a pairlist?
...ment lists (which are > pairlists, but the user does not need to know really). > Or did you imply, Henrik, that would you want is not achievable > with these? Martin, thanks for bringing these options up. Just to make sure no one misreads these comments - I'm not operating on as.list(expr) - it was just used to show the content of the expression. In my case, I'm operating / modifying expressions and not functions per se, e.g. expr <- quote(function(x = 1) x) It's not clear to me how I would go about to modify this to be the equivalent of: expr <- quote(functi...
2016 Dec 19
0
[ANNOUNCE] libnftnl 1.0.7 release
...(API) to the in-kernel nf_tables subsystem. The library libnftnl has been previously known as libnftables. This library is currently used by the nft command line tool. This release includes the following list of updates: * New nftnl_rule_cmp() interface to compare rules. * Support for new kernel expressions: - Number Generator (a.k.a. numgen). - Routing (a.k.a. rt). - Range. - Inverted set lookups. - Inverted dynamic set updates (ie. rule mismatch on full sets). - Packet quota. - Hash. - Forward Information Base lookups (a.k.a. fib). - Reference to stateful objects (requires kernel 4.1...
2007 Jul 30
2
problems saving and loading (PLMset) objects
...n't see why my saved PLMset objects come out all wrong. To use an example: Setting up an example PLMset (I have the same problem no matter what example I use) > library(affyPLM) > data(Dilution) # affybatch object > Dilution = updateObject(Dilution) > options(width=36) > expr <- fitPLM(Dilution) This works, and I'm able to get the probeset coefficients with coefs(expr). until I save and try reloading: > save(expr, file="expr.RData") > rm(expr) # just to be sure > expr <- load(expr.RData) Now, running coefs(expr) says: >...
2017 Feb 09
2
[Release-testers] [4.0.0 Release] Release Candidate 2 has been tagged
...bebd80eb64652 > SHA256 (clang+llvm-4.0.0-rc2-amd64-unknown-freebsd10.tar.xz) = 0b71197a3288b4c7c54f12497b4907257eda71d9be0cb26f9497b25539b5a3c3 > > On i386-freebsd10 there were some interesting test results: > > ******************** > Unexpected Passing Tests (1): > lldb :: Expr/TestCallStdStringFunction.test > > ******************** > Failing Tests (4): > LLVM :: tools/llvm-xray/X86/convert-with-debug-syms.txt > lldb :: Expr/TestCallStopAndContinue.test > lldb :: Expr/TestCallUserAnonTypedef.test > lldb :: Expr/TestCallUserDefinedFunct...
2008 Feb 12
3
matching last argument in function
I often want to temporarily modify the options() options, e.g. a <- seq(10000001, 10000001 + 10) # some wide object with.options <- function(..., expr) { options0 <- options(...) tryCatch(expr, finally=options(options0)) } Then I can use: with.options(width=160, expr = print(a)) But I'd like to avoid explicitly naming the expr argument, as in: with.options(width=160, print(a)) How can I do this with R's argument matching? (I p...
2007 Nov 26
0
[LLVMdev] Fibonacci example in OCaml
Here is a complete 104-line native code compiler for a tiny subset of OCaml that is expressive enough to compile an external Fibonacci program: type expr = | Int of int | Var of string | BinOp of [ `Add | `Sub | `Leq ] * expr * expr | If of expr * expr * expr | Apply of expr * expr type defn = | LetRec of string * string * expr open Camlp4.PreCast;; let expr = Gram.Entr...
2010 Jan 20
1
function curve() (PR#14191)
Full_Name: Georgi Boshnakov Version: 2.10.1pat OS: Windows XP Submission from: (NULL) (130.88.123.205) When calling programmatically function curve() from package:graphics I experienced some trouble since it reports stop("'expr' must be a function or an expression containing 'x'") even if expr is "expression". Naturally, the user message uses "expression" in its usual generic meaning but it is somewhat confusing that an object of type "expression" is rejected. The message i...
2008 Oct 14
1
library MICE warning message
...logical 10: In any(predictorMatrix[j, ]) ... : coercing argument of type 'double' to logical 11: In any(predictorMatrix[, j]) ... : coercing argument of type 'double' to logical 12: In any(predictorMatrix[j, ]) ... : coercing argument of type 'double' to logical 13: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 14: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 15: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 16: In eval(expr, envir, enclos) ... : non-integer #successes in a binomi...
2010 Aug 02
1
Convert an expression to a function
Hi John, Here is my code practicing. Please give me some advises. Thank you. Wu Gong # Extract the function string f.str <- sub("y~","",exprtext) # Get arglist from the text sp1 <- paste("\\",c(getGroupMembers(Arith),"(",")"),sep="") sp2 <- getGroupMembers(Math) sps <- paste(c(sp1,sp2),sep="",collapse="|") agl <- gsub("^[0123456789]+$","",strspli...
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
...ve of allowing for function arguments to be stored in lists. That's a much deeper change though. On Wed, Oct 12, 2016 at 12:31 PM, Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote: > Michael, thanks for this info. > > I've stumbled upon this in a case where I walk an R expression (the > AST) and (optionally) modifies it (part of the globals package). In R > expressions, a function definition uses a pairlist to represent the > arguments. For example, > >> expr <- quote(function(x = 1) x) >> str(as.list(expr)) > List of 4 > $ : symbol...
2019 Nov 27
2
error in parallel:::sendMaster
...is printed. All outputs are created successfully. So far so good. But then "part i written successfully." it is printed another X times, for values of i for which it was already printed. This output is intermingled with X-1 times the following error message: Error in sendMaster(try(eval(expr, env), silent = TRUE)) : write error, closing pipe to the master Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMaster and Y times the message "Execution halted". mc_ret is printed again, now being a list of length 85, with the first element bein...