Dear list,
Just upgraded to MacOS Mavericks, fresh install of R 3.0.2 and trying to
install a previous version of my QCA package (the most recent one source
file, which passed the R CMD check --as-cran with R 3.0.1)
I seem to have some difficulties in the C code, apparently it doesn't find
some
Apologies for my late reply, I've been away for a few days.
Everything is working fine now, thank you again for your advice.
Best wishes,
Adrian
On Thu, Feb 6, 2014 at 10:49 AM, Adrian DuÈa dusa.adr...@unibuc.ro wrote:
Dear list,
Just upgraded to MacOS Mavericks, fresh install of R 3.0.2
Dear devels,
I need to create a (short) vector in C, which contains potentially very
large numbers, exponentially to the powers of 2.
This is my test example:
lgth = 35;
int power[lgth];
power[lgth - 1] = 1;
for (j = 1; j lgth; j++) {
power[lgth - j - 1] = 2*power[lgth - j];
}
Everything
Dear Prof. Ripley,
Once again, thank you for your replies.
I must confess not being a genuine C programmer, having learned how to use
C only in connection to R (and the macros provided are almost a separate
language to learn).
I'll try to read more about the types you've indicated, and will keep
On Wed, May 14, 2014 at 5:35 PM, Simon Urbanek
simon.urba...@r-project.orgwrote:
[...]
How do you print them? It seems like you're printing 32-bit value instead
... (powers of 2 are simply shifts of 1).
I am simply using Rprintf():
long long int power[lgth];
power[lgth - 1] = 1;
On Wed, May 14, 2014 at 6:24 PM, Martyn Plummer plumm...@iarc.fr wrote:
[...]
Your numbers are being coerced to int when you print them. Try the
format , %lld instead.
Oh my goodness, this was a printing issue...!
(feeling embarrassed, but learned something new)
Problem solved, thanks very
Dear list,
On a follow up from my previous email, I am now trying to allocate vectors
of length larger than 32-bit in C.
From the R internals documentation, I read that:
The sxpinfo header is defined as a 32-bit C structure...
and
A SEXPREC is a C structure containing the 32-bit header...
The
On Fri, May 16, 2014 at 2:15 PM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote:
On 16/05/2014 11:06, Duncan Murdoch wrote:
[...]
I've looked at all SEXPTYPEs in the R internals, and the only one
specific
to integer vectors is INTSXP. Can this be used for vectors of length
larger
than
Dear r-devel,
I am trying to automatically check if two successive versions of a
package have the same results (i.e. code not broken), by parsing the
example sections for each function against a previously tested
version.
While trying to replicate the code from example(), I am facing an
error
versions installed?
~G
On Sun, Jun 15, 2014 at 6:22 PM, Adrian Dușa dusa.adr...@unibuc.ro wrote:
Dear r-devel,
I am trying to automatically check if two successive versions of a
package have the same results (i.e. code not broken), by parsing the
example sections for each function against
On Mon, Jun 16, 2014 at 6:36 AM, Brian Lee Yung Rowe r...@muxspace.com wrote:
Adrian,
You might consider using a unit testing framework such as RUnit or testthat,
which does this but in a more structured manner. Essentially you codify the
behavior in a set of tests as opposed to comparing
On Mon, Jun 16, 2014 at 6:37 AM, Gabriel Becker gmbec...@ucdavis.edu wrote:
[...]
You can. This is valid R source, so the parser will understand it
expr = parse(text= example(deMorgan, package=QCA, give.lines=TRUE))
You can then evaluate some or all of that expression using either R's own
Oh my... this is so simple, why didn't I think of that...?
Thanks a lot Martin, beautiful,
Adrian
On Mon, Jun 16, 2014 at 10:32 AM, Martin Maechler
maech...@stat.math.ethz.ch wrote:
Adrian Duºa dusa.adr...@unibuc.ro
on Mon, 16 Jun 2014 08:33:59 +0300 writes:
On Mon, Jun 16, 2014 at
On Mon, Jun 16, 2014 at 10:32 AM, Martin Maechler
maech...@stat.math.ethz.ch wrote:
[...]
Apropos not the right tool. I'm a bit astonished that nobody
mentioned the fact R already provides the tool to
automatically compare all example outputs with a previous
version (of the packages example
Dear All,
While wanting to create a package using the name DDI (which stands for Data
Documentation Initiative), I sent an email to the DDI Alliance and ask if
they would mind, knowing they are now in the process of copyrighting this
brand.
The answer I got was negative (due to possible
On Fri, Jul 11, 2014 at 1:59 AM, Uwe Ligges
lig...@statistik.tu-dortmund.de wrote:
On 10.07.2014 23:46, Adrian Dușa wrote:
Dear All,
[...]
Well, you cannot reserve a package name. Actually you can choose any legal
name.
The story is different if you want to submit it to BioConductor
On Fri, Jul 11, 2014 at 10:01 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
On 11/07/2014 12:11 PM, Adrian Dușa wrote:
[...]
You have a little bit of control of the order of topics in the PDF reference
manual (e.g. see the lattice package), but the HTML help page is produced by
R
Dear R-devel,
In the example block of the documentation for a package, I need to use
a single quote in a string:
foo - Don't know
After building the package, it gets printed as:
foo - Dont know
I read the Writing R Extensions and Parsing Rd files from top to
bottom, but didn't find
On Thu, Jul 31, 2014 at 12:55 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
On 31/07/2014, 4:27 AM, Adrian Dușa wrote:
Dear R-devel,
[...]
I don't see this. Can you give more details, i.e. R version, how you
printed it, etc.?
It may be that you're not using an ascii single quote
On Thu, Jul 31, 2014 at 2:01 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
On 31/07/2014, 6:40 AM, Adrian Dușa wrote:
[...]
Okay, now I see it in the PDF output of R CMD Rd2pdf on MacOS.
This is an Inconsolata font issue. If you look at the .tex file
(available with R CMD Rd2pdf
Dear R developers,
This is a rather peculiar question, but nevertheless I would still need an
answer for.
It is about an R package which I created (namely QCA), and from versions
1.0-0 to 1.1-4 I had a co-author.
The co-author recently withdrawn from the package development, but still
requires to
Hi Gabriel,
On Tue, Oct 6, 2015 at 10:59 PM, Gabriel Becker
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 enforce
> acknowledgement of the contributions of all copyright
On Tue, Oct 6, 2015 at 11:58 PM, Adrian Dușa <dusa.adr...@unibuc.ro> wrote:
>
> [...]
> If the spirit of the CRAN policies is to enforce citing each and every
one of the authors, then I don't understand why the citation from package
Rcmdr meets this spirit, while my suggestion
Dear Gabriel,
On Wed, Oct 7, 2015 at 12:39 AM, Gabriel Becker
wrote:
> [...]
>
>>
>> I apologize for pushing this topic to the limit, but I haven't got an
>> answer to this question yet...
>>
>
> With respect, not receiving the answer you wanted isn't the same as not
>
On Wed, Oct 7, 2015 at 1:07 AM, Gabriel Becker wrote:
>
> [...]
>
>>
>> The work of the other author is duly acknowledged in his position in the
>> authors' list.
>> As I previously wrote, citing Dusa and Other (2015) implies equal
>> citation rights for unequal work, a
On Tue, Oct 6, 2015 at 3:06 AM, Simon Urbanek
wrote:
>
> [...]
>
> To clarify, legally, you can fork a standard GPL package and make any
> changes you want, including changing authors fields etc. If you don't own
> copyright for the entire work then you cannot change
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
Apologies if this is a non question, but I am trying to document some
functions, where the author of the function itself is different from the
author of the Rd file (one person did the programming, the other dealt with
the documentation).
In the Writing R Extensions document, section 2.1.1
Hi Dmitri,
I was thinking about something similar for my packages. There might be
other (more clever) ways, but one way is to:
- make package A dependent on package B (so that the namespace of B is
automatically available when loading package A)
- make package B "Suggest" package A (not "Depend"
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
On Fri, Apr 8, 2016 at 10:34 PM, Hadley Wickham wrote:
> In that scenario, I would expect that QCA would suggest Venn and Venn
> would suggest QCA. Then there's no circular dependency problem.
>
Right, this is exactly what I was pointing myself in the first email:
- make
as
>
> an
>
> option that I think is worth thinking about -- it is easy to overlook the
>
> obvious :-). Since we have no further info on the package's structure we
>
> can't be sure..
>
>
>
>
>
> Op vr 8 apr. 2016 om 13:59 schreef Adrian Dușa <dusa.adr...@uni
I am not able to replicate this:
> center <- function(x,FUN) FUN(x)
> center(1:10, mean)
[1] 5.5
> mean <- 4
> center(1:10, mean)
Error in center(1:10, mean) : could not find function "FUN"
Using a fresh install of version 3.3.1 under MacOS, and tested before with
3.3.0 with the same result.
Hi Michael,
On Tue, Jun 27, 2017 at 5:31 PM, Michael Lawrence
wrote:
>
> To do this in C, it would probably be easier and faster to just do the
> string manipulation directly. Luckily, there are already packages that
> have done this for you. See an example below using
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,]102
[2,]021
And I would like to produce:
On Mon, Mar 12, 2018 at 2:18 PM, Martin Maechler
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
>
>
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
> On 15 Apr 2020, at 18:13, William Dunlap wrote:
>
> You are right. >= is not as evocative as =>. Perhaps > and < would do?
> %=>% and %<=% would work.
I thought about > and < too, but as you rightly observed > is way less
evocative as =>
There is a certain level of clarity which an
detecting "->".
Best,
Adrian
> On 13 Apr 2020, at 19:19, William Dunlap wrote:
>
> Using => and <= instead of -> and <- would make things easier, although the
> precedence would be different.
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.c
> On 15 Apr 2020, at 13:20, Ivan Krylov wrote:
>
> On Wed, 15 Apr 2020 10:41:41 +0300
> Adrian Dușa 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
>
I searched and tried for hours, to no avail although it looks simple.
(function(x) substitute(x))(A <- B)
#A <- B
(function(x) substitute(x))(A -> B)
# B <- A
In the first example, A occurs on the LHS, but in the second example A is
somehow evaluated as if it occured on the RHS, despite my
rote:
> That parser already flips -> to <- before creating the parse tree.
>
> Gabor
>
> On Mon, Apr 13, 2020 at 8:39 AM Adrian Dușa wrote:
> >
> > I searched and tried for hours, to no avail although it looks simple.
> >
> > (function(x) substitute(x)
On Sat, May 23, 2020 at 10:01 AM Prof Brian Ripley
wrote:
> 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
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:
On Wed, May 26, 2021 at 6:43 PM Duncan Murdoch
wrote:
> [...]
> > In the best case scenario, it unnecessarily triples the size of the
> > data, but perhaps this is the only way forward.
>
> I don't see how it could triple the size. Surely an integer has enough
> values to cover all possible
invisible(x)
> }
>
> This still needs a lot of improvement to be a good print method, but
> I'll leave that to you.
>
> Duncan Murdoch
>
> On 26/05/2021 11:43 a.m., Duncan Murdoch wrote:
> > On 26/05/2021 10:22 a.m., Adrian Dușa wrote:
> >> Dear Duncan,
> >>
On Wed, May 26, 2021 at 4:13 AM Gregory Warnes wrote:
> As a side note, for floating point values, the IEEE 754 standard provides
> for a large set of NaN values, making it possible to have multiple types of
> NAs for floating point values...
>
That is interesting, but how does one use
Dear Duncan,
On Wed, May 26, 2021 at 2:27 AM Duncan Murdoch
wrote:
> You've already been told how to solve this: just add attributes to the
> objects. Use the standard NA to indicate that there is some kind of
> missingness, and the attribute to describe exactly what it is. Stick a
> class on
ter a while, how many cached results can there be?
>
> -Original Message-
> From: R-devel On Behalf Of
> luke-tier...@uiowa.edu
> Sent: Monday, May 24, 2021 9:15 AM
> To: Adrian Dușa
> Cc: Greg Minshall ; r-devel
> Subject: Re: [Rd] [External] Re: 1954 from NA
>
On Tue, May 25, 2021 at 4:14 PM wrote:
> [...]
>
> Yes, it should be discarded.
>
> You can of course do what you like in code you keep to yourself. But
> please do not distribute code that does this. via CRAN or any other
> means. It will only create problems for those maintaining R.
>
> >
use such
> NAs become NaNs at any time.
>
> Best
> Tomas
>
> On 5/23/21 9:56 AM, Adrian Dușa wrote:
> > Dear R devs,
> >
> > I am probably missing something obvious, but still trying to understand
> why
> > the 1954 from the definition of an NA has to f
On Sun, May 23, 2021 at 4:33 PM brodie gaslam via R-devel <
r-devel@r-project.org> wrote:
> I should add, I don't know that you can rely on this
> particular encoding of R's NA. If I were trying to restore
> an NA from some external format, I would just generate an
> R NA via e.g NA_real_ in the
Dear R devs,
I am probably missing something obvious, but still trying to understand why
the 1954 from the definition of an NA has to fill 32 bits when it normally
doesn't need more than 16.
Wouldn't the code below achieve exactly the same thing?
typedef union
{
double value;
unsigned
On Mon, May 24, 2021 at 2:11 PM Greg Minshall wrote:
> [...]
> if you have 500 columns of possibly-NA'd variables, you could have one
> column of 500 "bits", where each bit has one of N values, N being the
> number of explanations the corresponding column has for why the NA
> exists.
>
The mere
the data to an analysis function. This is
> also important because in surveys like this, different values should be
> excluded at different times. For example, you might want to include all
> responses in a data quality report, but exclude interviewer error and
> refusals when conducting
On Sun, May 23, 2021 at 10:14 PM Tomas Kalibera
wrote:
> [...]
>
> Good, but unfortunately the delineation between computation and
> non-computation is not always transparent. Even if an operation doesn't
> look like "computation" on the high-level, it may internally involve
> computation - so,
On Mon, May 24, 2021 at 1:31 PM Tomas Kalibera
wrote:
> [...]
>
> For the reasons I explained, I would be against such a change. Keeping the
> data on the side, as also recommended by others on this list, would allow
> you for a reliable implementation. I don't want to support fragile package
>
Hmm...
If it was only one column then your solution is neat. But with 5-600
variables, each of which can contain multiple missing values, to double
this number of variables just to describe NA values seems to me excessive.
Not to mention we should be able to quickly convert / import / export from
Hi Taras,
On Mon, May 24, 2021 at 4:20 PM Taras Zakharko
wrote:
> Hi Adrian,
>
> Have a look at vctrs package — they have low-level primitives that might
> simplify your life a bit. I think you can get quite far by creating a
> custom type that stores NAs in an attribute and utilizes vctrs
On Mon, May 24, 2021 at 4:40 PM Bertram, Alexander via R-devel <
r-devel@r-project.org> wrote:
> Dear Adrian,
> SPSS and other packages handle this problem in a very similar way to what I
> described: they store additional metadata for each variable. You can see
> this in the way that SPSS
On Mon, May 24, 2021 at 5:47 PM Gabriel Becker
wrote:
> Hi Adrian,
>
> I had the same thought as Luke. It is possible that you can develop an
> ALTREP that carries around the tagging information you're looking for in a
> way that is more persistent (in some cases) than R-level attributes and
>
Dear Avi,
That was quite a lengthy email...
What you write makes sense of course. I try hard not to deviate from the
base R, and thought my solution does just that but apparently no such luck.
I suspect, however, that something will have to eventually change: since
one of the R building blocks
en something like
>
> . . .
> capture <- match.arg(capture)
> . . .
> if (capture == "output"){
> toreturn$output <- capture.output(output$value)
> } else if (capture == "value"){
> toreturn$value <- output
On Fri, 3 Dec 2021 at 00:37, Fox, John wrote:
> Dear Henrik, Simon, and Adrian,
>
> As it turns out Adrian's admisc::tryCatchWEM() *almost* does what I want,
> which is both to capture all messages and the result of the expression
> (rather than the visible representation of the result). I was
Dear R wizards,
I have recently been informed about some build errors of my package QCA,
which I was able to trace down to the base function substitute(), with the
following replication example:
foo <- function(x) return(substitute(x))
In the stable R version 4.0.5, I get the expected result:
>
232
>
> I think you should probably wait until that settles down before worrying
> about it.
>
> Duncan Murdoch
>
> On 15/11/2021 12:18 p.m., Adrian Dușa wrote:
> > Dear R wizards,
> >
> > I have recently been informed about some build errors of my package QCA
Dear John,
I have a function in package admisc called tryCatchWEM (catches warnings,
errors and messages):
> tryCatchWEM(foo())
$warning
[1] "warning1" "warning2"
Hope this helps,
Adrian
On Thu, 2 Dec 2021 at 23:04, Fox, John wrote:
> Dear R-devel list members,
>
> Is it possible to capture
Dear All,
I learned how to include a static pdf vignette into an R package, using a
dummy .Rnw file to include an already produced "vignette.pdf" file:
\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-, fitpaper=true]{vignette.pdf}
\end{document}
I wonder if it
Thanks Henrik and Bill,
Indeed, but I do have a function called tryCatchWEM() in package admisc
that captures all that.
My use case was to test for different architectures (for instance, arm64 vs
Intel MacOS) embedding R in cross-platform applications.
I needed to test if the package could be
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
That would have been an elegant solution, but it doesn't seem to work:
> `->` <- `+`
> 1 -> 3 # expecting 4
Error in 3 <- 1 : invalid (do_set) left-hand side to assignment
It is possible to reassign other multiple character operators:
> `%%` <- `+`
> 1 %% 3
[1] 4
The assignment operator `->` is
On Thu, Jan 4, 2024 at 10:44 PM Uwe Ligges
wrote:
> On 04.01.2024 21:23, Duncan Murdoch wrote:[...]
> > Users aren't forced to install "Suggests" packages. That's a choice
> > they make. The default for `install.packages()` is `dependencies = NA`,
> > which says to install hard dependencies
(Moved here following Ivan's suggestion)
On Thu, Jan 4, 2024 at 12:55 PM Ivan Krylov wrote:
> On Thu, 4 Jan 2024 11:57:15 +0200
> Adrian Dușa wrote:
>
> > I wonder if it would be possible to include an html static vignette.
>
> I would say that static vignettes a
73 matches
Mail list logo