similar to: [External] Re: capture "->"

Displaying 20 results from an estimated 9000 matches similar to: "[External] Re: capture "->""

2024 Mar 04
1
[External] Re: capture "->"
Dear Barry, In general, I believe users are already accustomed with the classical arrows "->" and "<-" which are used as such in quoted expressions. But I agree that "-.>" is a very neat trick, thanks a lot. A small dot, what a difference. All the best, Dmitri On Mon, Mar 4, 2024 at 11:40?AM Barry Rowlingson < b.rowlingson at lancaster.ac.uk> wrote:
2024 Mar 04
1
[External] Re: capture "->"
Maybe someone has already suggested this, but if your functions accepted strings you could use sub or gsub to replace the -> with a symbol that parsed at the same precedence as <-, say <<-. Then parse it and deal with it. When it is time to display the parsed and perhaps manipulated formulae to the user, deparse it and do the reverse replacement. > encode <-
2024 Mar 01
1
capture "->"
I would also be interested in that. For me, this is interesting for my QCA package, over which Dmitri and I have exchanged a couple of messages. The "<-" operator is used to denote necessity, and the "->" is used for sufficiency. Users often make use of Boolean expressions such as A*B + C -> Y (to calculate if the expression A*B + C is sufficient for the outcome Y)
2024 Mar 01
1
capture "->"
I am wondering what the specific need for this is or is it just an exercise? Where does it matter if a chunk of code assigns using "<-" beforehand or "->" after hand, or for that matter assigns indirectly without a symbol? And whatever you come up with, will it also support the global assignment of "->>" as compared to ""<<-" too? I
2024 Mar 02
1
capture "->"
Would it be good enough to pass it as a formula? Using your definition of foo foo(~ A -> result) ## result <- ~A foo(~ result <- A) ## ~result <- A On Fri, Mar 1, 2024 at 4:18?AM Dmitri Popavenko <dmitri.popavenko at gmail.com> wrote: > > Hi everyone, > > I am aware this is a parser issue, but is there any possibility to capture > the use of the inverse
2024 Mar 01
1
capture "->"
On 01/03/2024 8:51 a.m., Dmitri Popavenko wrote: > On Fri, Mar 1, 2024 at 1:00?PM Duncan Murdoch <murdoch.duncan at gmail.com > <mailto:murdoch.duncan at gmail.com>> wrote: > > ... > I was thinking more of you doing something like > > ? parse(text = "A -> B", keep.source = TRUE) > > I forget what the exact rules are for
2016 Apr 08
1
(no) circular dependency
A third possibility, which I use in my gtools and gdata packages, is to use soft-links to create a copy of the relevant functions from one package in the other. I make sure these functions are *not* exported, so no conflicts are created, and the use of soft-links mean the code never gets out of sync. -Greg -- Change your thoughts and you change the world. --Dr. Norman Vincent Peale > On
2016 Apr 08
2
(no) circular dependency
Thanks all, I don't know either (for the moment). It's all in the design phase still. Generally, I would also like to keep specific functions in specific packages, if at all possible. On Fri, Apr 8, 2016 at 3:03 PM, Mark van der Loo <mark.vanderloo at gmail.com> wrote: > Well, I'm not saying that Dmitri _should_ do it. I merely mention it as an > option that I think is
2024 Mar 01
2
capture "->"
Hi everyone, I am aware this is a parser issue, but is there any possibility to capture the use of the inverse assignment operator into a formula? Something like: > foo <- function(x) substitute(x) gives: > foo(A -> B) B <- A I wonder if there is any possibility whatsoever to signal the use of -> instead of <- Thank you, Dmitri [[alternative HTML version deleted]]
2024 Mar 01
1
capture "->"
Adrian, That is indeed a specialized need albeit not necessarily one that cannot be done by requiring an alternate way of typing a formula that avoids being something the parser sees as needed to do at that level. In this case, my other questions become moot as I assume the global assignment operator and somethings like assign(?xyz?, 5) will not be in the way. What I was wondering about is
2016 Apr 08
4
(no) circular dependency
Hi Mark, Uhm... sometimes this is not always possible. For example I have a package QCA which produces truth tables (all combinations of presence / absence of causal conditions), and it uses the venn package to draw a Venn diagram. It is debatable if one should assimilate the "venn" package into the QCA package (other people might want Venn diagrams but not necessarily the other QCA
2016 Apr 07
5
(no) circular dependency
Hi Thierry, Thanks for that, the trouble is functions are package specific so moving from one package to another could be a solution, but I would rather save that as a last resort. As mentioned, creating a package C with all the common functions could also be an option, but this strategy quickly inflates the number of packages on CRAN. If no other option is possible, that could be the way but I
2020 Mar 27
2
object.size vs lobstr::obj_size
On 3/27/20 12:00, Hadley Wickham wrote: > > > On Fri, Mar 27, 2020 at 10:39 AM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi Tomas, > > On 3/27/20 07:01, Tomas Kalibera wrote: > > they provide an over-approximation > > They can also provide an "under-approximation" (to say the
2020 Mar 27
1
object.size vs lobstr::obj_size
On 3/27/20 15:19, Hadley Wickham wrote: > > > On Fri, Mar 27, 2020 at 4:01 PM Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > > > On 3/27/20 12:00, Hadley Wickham wrote: > > > > > > On Fri, Mar 27, 2020 at 10:39 AM Herv? Pag?s > <hpages at fredhutch.org <mailto:hpages at
2024 Mar 01
1
capture "->"
On 01/03/2024 4:17 a.m., Dmitri Popavenko wrote: > Hi everyone, > > I am aware this is a parser issue, but is there any possibility to capture > the use of the inverse assignment operator into a formula? > > Something like: > >> foo <- function(x) substitute(x) > > gives: > >> foo(A -> B) > B <- A > > I wonder if there is any
2024 Mar 01
1
capture "->"
Dear Duncan, On Fri, Mar 1, 2024 at 11:30?AM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > ... > If you parse it with srcrefs, you could look at the source. The parser > doesn't record whether it was A -> B or B <- A anywhere else. > Thank you, this gets me closer but it still needs a little push: > foo <- function(x) { x <- substitute(x)
2024 Mar 01
1
capture "->"
On 01/03/2024 5:25 a.m., Dmitri Popavenko wrote: > Dear?Duncan, > > On Fri, Mar 1, 2024 at 11:30?AM Duncan Murdoch <murdoch.duncan at gmail.com > <mailto:murdoch.duncan at gmail.com>> wrote: > > ... > If you parse it with srcrefs, you could look at the source.? The parser > doesn't record whether it was A -> B or B <- A anywhere else.
2016 Apr 06
2
(no) circular dependency
Hello all, I would like to build two packages (say A and B), for two different purposes. Each of them need one or two functions from the other, which leads to the problem of circular dependency. Is there a way for package A to import a function from package B, and package B to import a function from package A, without arriving to circular dependency? Other suggestions in the archive mention
2024 Mar 01
1
capture "->"
On Fri, Mar 1, 2024 at 1:00?PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > ... > I was thinking more of you doing something like > > parse(text = "A -> B", keep.source = TRUE) > > I forget what the exact rules are for attaching srcrefs to arguments of > functions, but I do remember they are a little strange, because not > every possible
2017 Mar 09
0
problems with RdMacros in file DESCRIPTION
Hi, Field RdMacros was introduced in file DESCRIPTION to allow users to import LaTeX-like macros from other packages. Currently 'R CMD Check --as-cran' gives a NOTE: > Unknown, possibly mis-spelled, field in DESCRIPTION: > ?RdMacros? A small package demonstrating this is available at http://www.maths.manchester.ac.uk/~gb/testRdMacro_0.0.2.tar.gz (and this is the source: