similar to: Operator masks in R, restrict set of applicable functions

Displaying 20 results from an estimated 10000 matches similar to: "Operator masks in R, restrict set of applicable functions"

2006 May 29
1
variation on vioplot?
I have been using the package vioplot to make boxplot/densityplots. Now I am looking for a variation of this, and I was wondering if someone could give me any tips on how to do what I want. I have nine groups of values, each group containing two sets of numbers which show the difference between two values, such as this: Start dev Stop dev -1 10 5 -2 0
2016 Oct 19
2
How to assign NULL value to pairlist element while keeping it a pairlist?
On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>>> on Wed, 12 Oct 2016 15:21:13 -0700 writes: > > > Thanks, this was what I expected. There is a desire to > > eliminate the usage of pairlist from user code, which > >
2002 Mar 18
2
ordering a matrix by multiple columns
Dear all, is there an easy way to sort or get the order of a matrix or data.frame by multiple rows (like ODER BY in SQL), that means if some values in the first column are equal, then sort them (or 'order') by the second etc.? Thanks in advance! Michael -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2013 Feb 18
2
quote() vs quote(expr=)
Hi all, I think there's a small buglet in quote: str(quote()) # Error in quote() : 0 arguments passed to 'quote' which requires 1 str(quote(expr = )) # symbol I bring this up because this seems like the most natural way of capturing the "missing" symbol with pure R code, compared to substitute() or bquote() or formals(plot)$x Hadley -- Chief Scientist, RStudio
2007 Feb 21
1
Confindence interval for Levenberg-Marquardt fit
Dear all, I would like to use the Levenberg-Marquardt algorithm for non-linear least-squares regression using function nls.lm. Can anybody help me to find a a way to compute confidence intervals on the fitted parameters as it is possible for nls (using confint.nls, which does not work for nls.lm)? Thank you for your help Michael
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
Thanks, this was what I expected. There is a desire to eliminate the usage of pairlist from user code, which suggests the alternative 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
2006 Jun 03
3
More on bug 7924
Hi, Again, sorry for the length of this post. Once I get my new office I will get a website set up on my work machine and will simply post a link to the log since I doubt many people are truly interested in these logs. To further analyze what is happening, I added my own routine in main.c called DEBUG_SET_NAMED and then redefined the SET_NAMED macro to use it and then rebuilt R. I
2006 Dec 31
1
Capturing argument values
I would like to preserve the values of all the arguments to a function in a results object. foo <- function(a, b=1) .... foo(x, 3) match.call() looks promising, but it records that a is x, while I want the value of x (in the calling frame). Also, if the invocation is foo(x), then match.call doesn't record that b is 1. So I tried this (inside the function definition): myargs <-
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
On 11/03/2023 11:57 a.m., Ivan Krylov wrote: > On Sat, 11 Mar 2023 11:11:06 -0500 > Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > >> That's clear, but your proposal violates a very basic property of the >> language, i.e. that all statements are expressions and have a value. > > How about reframing this feature request from multiple assignment >
2004 Jun 09
1
Using macros
Dear list members, I've been puzzling over how best to clean up the code for my Rcmdr package. In particular, there's a lot of repetitive tcltk code in the package, and as Martin M?chler has pointed out to me, this makes the package difficult to maintain. If R were Lisp, I'd use macros for much of the clean up. My efforts to do similar things with R functions has run into problems
2006 Dec 18
3
turning expression object to function
Dear all, I have the following problem. Given an expression object 'expr' containing a certain set of symbols (say 'a', 'b', 'c'), I would like to translate the expression object in an R function of, say, 'a', programmatically. Here an example of what I mean. Given: > expr <- expression(a+b+c) a call like: > asFunctionOf(expr, 'a',
2011 May 26
1
Is it possible to define a function's arguments via a wildcard in 'substitute()'?
Dear List, just out of pure curiosity: is it possible to define a function via 'substitute()' such that the function's formal arguments are specified by a "wildcard" that is substituted when the expression is evaluated? Simple example: x.args <- formals("data.frame") x.body <- expression( out <- myArg + 100, return(out) ) expr <-
2023 Mar 11
3
Multiple Assignment built into the R Interpreter?
Thanks Duncan and Ivan for the careful thoughts. I'm not sure I can follow all aspects you raised, but to give my limited take on a few: > your proposal violates a very basic property of the language, i.e. that all statements are expressions and have a value. > What's the value of 1 + (A, C = init_matrices()). I'm not sure I see the point here. I evaluated 1 + (d =
2001 May 30
2
environments
I would like to be able, inside a function, to create a new function, and use it as part of a formula as an argument to, say, gnls or nlme. for example: MyTop <- function(data=dta) { Cexp <- function(dose,A,B,m){...} Model <- as.formula(paste("y","~ Cexp(",paste(formals(Cexp),collapse =", "),")")) MyCall <-
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
On 11/03/2023 4:42 p.m., Sebastian Martin Krantz wrote: > Thanks Duncan and Ivan for the careful thoughts. I'm not sure I can > follow all aspects you raised, but to give my limited take on a few: > >> your proposal violates a very basic property of the language, i.e. that all statements are expressions and have a value. > What's the value of 1 + (A, C =
2023 Mar 11
2
Multiple Assignment built into the R Interpreter?
FWIW, it's possible to get fairly close to your proposed semantics using the existing metaprogramming facilities in R. I put together a prototype package here to demonstrate: https://github.com/kevinushey/dotty The package exports an object called `.`, with a special `[<-.dot` S3 method which enables destructuring assignments. This means you can write code like: .[nr, nc] <-
2009 Jun 25
1
R data inspection under gdb?
Hi, everyone. I'm trying to debug an R-module, written in C, and I'm using gdb for this. How can I print "standard" R objects from within C code? BTW, I'm familiar with the advice to use R_PV given in Writing R Extensions, but it's not working for me. E.g., I get (gdb) p R_PV(x) $1 = void and yet (gdb) p *x $2 = {sxpinfo = {type = 16, obj = 0, named = 0, gp = 0,
2007 Jun 05
1
Question using stepAIC
Hi - I use stepAIC to automatically select the model. The stepAIC was applied on polr as follow:objPolr <- polr(formula=myformula, data=dat, method=METHOD);objPolr.step <- stepAIC(objPolr, trace=T);Then R complaints that it doesn't know about 'dat' when it executes the second line. Below is the exact error that I got when executing the stepAIC line above:Error in eval(expr,
2023 Mar 12
2
Multiple Assignment built into the R Interpreter?
Thanks Gabriel and Kevin for your inputs, regarding your points Gabriel, I think Python and Julia do allow multiple sub-assignment, but in-line with my earlier suggestion in response to Duncan to make multiple assignment an environment-level operation (like collapse::%=% currently works), this would not be possible in R. Regarding the [a] <- coolest_function() syntax, yeah it would mean do
2016 Oct 19
0
How to assign NULL value to pairlist element while keeping it a pairlist?
On Wed, 19 Oct 2016, Henrik Bengtsson wrote: > On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler > <maechler at stat.math.ethz.ch> wrote: >>>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>>>> on Wed, 12 Oct 2016 15:21:13 -0700 writes: >> >> > Thanks, this was what I expected. There is a desire to >>