similar to: detect ->

Displaying 20 results from an estimated 4000 matches similar to: "detect ->"

2020 Apr 13
3
detect ->
Using => and <= instead of -> and <- would make things easier, although the precedence would be different. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 13, 2020 at 1:43 AM Adrian Du?a <dusa.adrian at gmail.com> wrote: > Thank you for your replies, this actually has little to do with the > regular R code but more to signal what in my package QCA is referred
2020 Apr 13
3
detect ->
Adrian, Indeed, this has come up in a few places, but as Gabor says, there is no such thing as right hand assignment at any point after parsing is complete. This means the only feasible way to detect it, which a few projects do I believe, is process the code while it is still raw text, before it goes into the parser, and have clever enough regular expressions. The next question, then, is why
2020 Apr 15
1
detect ->
You are right. >= is not as evocative as =>. Perhaps > and < would do? %=>% and %<=% would work. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Apr 15, 2020 at 12:41 AM Adrian Du?a <dusa.adrian at gmail.com> wrote: > Dear Bill, > > I already tried this, and it would have been great as (currently) the > sufficiency relation is precisely
2020 May 22
2
GCC warning
I am trying to submit a package on CRAN, and everything passes ok on all platforms but Debian, where CRAN responds with an automatic "significant" warning: * checking whether package ?QCA? can be installed ... [35s/35s] WARNING Found the following significant warnings: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ?__builtin_strncpy? output may be truncated
2018 Mar 09
2
importing namespaces from base packages
Dear All, I understand the R CMD checks with only the base package attached, everything else (including the other packages bundled with the base R) should be imported and most importantly declared in the Imports field from the DESCRIPTION file. However, I do use functions from other packages than base (utils, grDevices, stats, graphics), for which it is sufficient to declare importFrom() in the
2018 Mar 13
2
importing namespaces from base packages
On Mon, Mar 12, 2018 at 2:18 PM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > [...] > Is that so? Not according to my reading of the 'Writing R > Extensions' manual, nor according to what I have been doing in > all of my packages for ca. 2 years: > > The rule I have in my mind is > > 1) NAMESPACE Import(s|From) \ >
2016 Apr 12
2
formula argument evaluation
On Tue, Apr 12, 2016 at 2:08 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > [...] > > It never gets to evaluating it. It is not a legal R statement, so the parser signals an error. > If you want to pass arbitrary strings to a function, you need to put them in quotes. I see. I thought it was parsed inside the function, but if it's parsed before then quoting is the
2016 Apr 12
3
formula argument evaluation
I have a simple function such as: foo <- function(x) { call <- lapply(match.call(), deparse) testit <- capture.output(tryCatch(eval(x), error = function(e) e)) if (grepl("Error", testit)) { return(call$x) } } and I would like to detect a formula when x is not an object: # this works > foo(A + B) [1] "A + B" # but this doesn't >
2016 Apr 13
2
formula argument evaluation
I suppose it would work, although "=>" is rather a descriptive symbol and less a function. But choosing between quoting: "A + B => C" and a regular function: A + B %=>% C probably quoting is the most straightforward, as the result of the foo() function has to be a string anyways (which is parsed by other functions). On Tue, Apr 12, 2016 at 6:20 PM, Richard M.
2020 May 23
1
GCC warning
On 23/05/2020 07:38, Simon Urbanek wrote: > Adrian, > > newer compilers are better at finding bugs - you may want to read the full trace of the error, it tells you that you likely have a memory overflow when using strncpy() in your package. You should check whether it is right. Unfortunately we can?t help you more specifically, because I don't see any link to what you submitted so
2016 Apr 12
0
formula argument evaluation
Would making it regular function %=>%, using "%" instead of quotes, work for you? On Tue, Apr 12, 2016 at 11:09 AM, Adrian Du?a <dusa.adrian at unibuc.ro> wrote: > On Tue, Apr 12, 2016 at 2:08 PM, Duncan Murdoch <murdoch.duncan at gmail.com> > wrote: >> [...] >> >> It never gets to evaluating it. It is not a legal R statement, so the > parser
2016 Apr 13
0
formula argument evaluation
%=>% would have precendence ('order of operations') problems also. A + B %=>% C is equivalent to A + ( B %=>% C) and I don't think that is what you want. as.list(quote(A + B %=>% C)) shows the first branch in the parse tree. The following function, str.language, shows the entire parse tree, as in > str.language(quote(A + B %=>% C)) `quote(A + B %=>%
2015 Oct 06
4
authorship and citation
Adrian, I am not on the CRAN or R-core teams, so the following is my own view, but... > library(QCA) > > Users are encouraged to cite this package as: > > Dusa, Adrian (2015). QCA: Qualitative Comparative Analysis. R Package > Version 1.2-0, > URL: http://cran.r-project.org/package=QCA > > This is just an encouragement, not a requirement, and the official citation
2020 Apr 15
1
detect ->
On Wed, 15 Apr 2020 10:41:41 +0300 Adrian Du?a <dusa.adrian at gmail.com> wrote: > Now, if I could find a way to define "=>" as a standalone operator, > and convince the R parser to bypass that error, it would solve > everything. If this is not possible, I am back to detecting "->". Just to confirm, are you avoiding custom %operators% because of two extra
2015 Oct 06
2
authorship and citation
Adrian, Responses inline On Tue, Oct 6, 2015 at 1:58 PM, Adrian Du?a <dusa.adrian at unibuc.ro> wrote: > Hi Gabriel, > > On Tue, Oct 6, 2015 at 10:59 PM, Gabriel Becker <gmbecker at ucdavis.edu> > wrote: > >> [...] >> >> At the very least, this is seems to be a flagrant violation of the >> *spirit* of the CRAN policy, which AFAIK is intended to
2017 Jun 27
2
paste strings in C
Dear R-devs, Below is a small example of what I am trying to achieve, that is trivial in R and I would like to learn how to do in C, for very large matrices: > (mymat <- matrix(c(1,0,0,2,2,1), nrow = 2)) [,1] [,2] [,3] [1,] 1 0 2 [2,] 0 2 1 And I would like to produce: [1] "a*C" "B*c" Which can be trivially done in R via something like: foo
2016 Apr 05
3
Problem with <= (less than or equal): not giving the expected result
Thanks Adrian and Thierry (from the previous answer). I was aware of the all.equal function, but there is nothing similar for <= (e.g. all.smallerEqual)? cheers, jo On 05 Apr 2016, at 14:31, Adrian Du?a <dusa.adrian at unibuc.ro<mailto:dusa.adrian at unibuc.ro>> wrote: Yes, that does have to do with floating point representation. I use this function for these types of
2015 Dec 17
1
integer
In the help page for ?is.integer, there is this function is.wholenumber <- function(x, tol = .Machine$double.eps^0.5) abs(x - round(x)) < tol A quick question: is there a case where this alternative function will not work? function(x) x %% 1 == 0 Best, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5
2015 Oct 06
1
authorship and citation
On Tue, Oct 6, 2015 at 2:52 PM, Adrian Du?a <dusa.adrian at unibuc.ro> wrote: > Dear Gabriel, > > On Wed, Oct 7, 2015 at 12:39 AM, Gabriel Becker <gmbecker at ucdavis.edu> > wrote: > >> [...] >> >>> >>> I apologize for pushing this topic to the limit, but I haven't got an >>> answer to this question yet... >>> >>
2016 Apr 12
0
formula argument evaluation
On 12/04/2016 6:24 AM, Adrian Du?a wrote: > I have a simple function such as: > > foo <- function(x) { > call <- lapply(match.call(), deparse) > testit <- capture.output(tryCatch(eval(x), error = function(e) e)) > if (grepl("Error", testit)) { > return(call$x) > } > } > > and I would like to detect a formula when x is