[Rd] C macros and Makevars/package building

2005-09-08 Thread Kasper Daniel Hansen
Hi We are currently embedding a rather large C++ library in R (BioC), and we want some comments on the portability of how we have approach this. First of, we are not really able to do much about the portability of the basic library, which of course is the main question :) We have an appro

Re: [Rd] simulate in stats

2005-09-15 Thread Kasper Daniel Hansen
I agree: no function should per default touch the random number stream. Otherwise this will undoubtedly lead to misuse. And while one may want to include a seed argument in case a user wants to set it explicitly, I would argue that the preferred usage is to do set.seed(SOMETHING) someFu

[Rd] cross-compiling tools

2005-10-18 Thread Kasper Daniel Hansen
Hi We have been cross-compiling windows packages under Linux using the excellent Makefile and instructions by Tony Rossini and Jun Yan. Specifically we have been cross-compiling c++ code and it used to work. Now the minGW tools located at www.stats.ox.ac.uk/pub/Rtools have changed from vers

Re: [Rd] cross-compiling tools

2005-10-19 Thread Kasper Daniel Hansen
t; sure someone else knows. > > On 10/18/05, Kasper Daniel Hansen <[EMAIL PROTECTED]> wrote: > >> Hi >> >> We have been cross-compiling windows packages under Linux using the >> excellent Makefile and instructions by Tony Rossini and Jun Yan. >> Specifically w

Re: [Rd] [R-gui] R GUI considerations (was: R, Wine, and multi-threadedness)

2005-10-21 Thread Kasper Daniel Hansen
On Oct 21, 2005, at 8:53 AM, Peter Kleiweg wrote: > James Wettenhall schreef op de 21e dag van de wijnmaand van het > jaar 2005: > > >> We may have to agree to disagree about some things, but I hope >> this has made my point of view a little clearer. >> > > Actually, your elaborate response mak

Re: [Rd] Packages that require other packages - How?

2005-11-09 Thread Kasper Daniel Hansen
On Nov 9, 2005, at 9:22 AM, Duncan Murdoch wrote: > On 11/9/2005 11:50 AM, Gavin Simpson wrote: >> Dear list, >> >> The help page for library/require contains the following paragraph in >> the section "Packages that require other packages": >> >> The source code for a package that requires o

Re: [Rd] Makefiles and other customization

2005-11-23 Thread Kasper Daniel Hansen
Well you can have a look at etc/Makeconf. I have had some troubles understanding the make process myself (which probably reveals I am not a make guru), but it really depends on what you want to accomplish - and from a certain perspective it is all documented in the sources. I think you nee

Re: [Rd] R for Windows GUI Front-End Problem (PR#3364)

2005-12-17 Thread Kasper Daniel Hansen
Please use the BioC list for questions such as this. It has been discussed numerous times there. I am cc: my answer to that list. On Dec 15, 2005, at 12:42 PM, Pathik wrote: > Dear Programmers, > > I encounter following error,while loading vector. > >> pam_Test<- ReadAffy() > Error: cannot

Re: [Rd] checkpointing

2006-01-03 Thread Kasper Daniel Hansen
On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote: > I use save.image() or save(), which seem exactly what you are > asking for. I have the (perhaps unsupported) impression that Ross wanted to save the progress during the optim run. Since it spends most of its time in the .Internal(optim(***

Re: [Rd] checkpointing

2006-01-03 Thread Kasper Daniel Hansen
On Jan 3, 2006, at 2:26 PM, Prof Brian Ripley wrote: > On Tue, 3 Jan 2006, Kasper Daniel Hansen wrote: > >> On Jan 3, 2006, at 9:36 AM, Brian D Ripley wrote: >> >>> I use save.image() or save(), which seem exactly what you are >>> asking for. >> >

Re: [Rd] Linux and proxy problem (PR#8488)

2006-01-15 Thread Kasper Daniel Hansen
Christian 1. This is not a bug, please read the posting rules. 2. You have submitted two bug reports This means a member of R-core has to spend valuable time cleaning up after you. Behavior like this is not going to help you getting an answer. Nevertheless, I will try: you are probably behin

Re: [Rd] e1071: using svm with sparse matrices (PR#8527)

2006-01-27 Thread Kasper Daniel Hansen
First: this is not a bug, more a feature request. Secondly, even if it was a bug, it is _not_ a bug in R, please read the posting rules for bugs. Now a member of R-core has to use valuable time to clean up after your bug report. Correspondence such as this such really be sent to the package

[Rd] pmax and long vector

2019-01-21 Thread Kasper Daniel Hansen
I see that base::pmax() does not support long vectors. Is R-devel interested in reports like this; ie. is there a goal of full support for long vectors in "basic" functions, something I at least would greatly appreciate? MRE: > pmax(rep(1L, 3*10^9), 0) Error in pmax(rep(1L, 3 * 10^9), 0) : lo

Re: [Rd] pmax and long vector

2019-01-21 Thread Kasper Daniel Hansen
on, Jan 21, 2019 at 3:09 PM Gabriel Becker wrote: > Kasper, > > If you're not interested or dont have time to create said patch yourself > let me know and i can do it. > > Best, > ~G > > On Mon, Jan 21, 2019, 11:36 AM Duncan Murdoch wrote: > >> On 21/01/2019

Re: [Rd] gfortran 9 quantreg bug

2019-08-06 Thread Kasper Daniel Hansen
Dirk, Thanks for the blog post on this, and the pointers in this email. I have a question: it seems to me that you end up using a different compiler for the package (quantreg) than was used to build R itself. As I understand ABI changes, this is considered unsupported (ok, that depends on what ve

[Rd] possible bug in R's configure check for C++11 features

2019-09-03 Thread Kasper Daniel Hansen
I am trying to compile R under a new setup, and frankly, I have had a lot of problems, but I think the stuff below points to a possible bug in R's (custom) configure checks for C++11/14/17, but not for C++98. This is a report about R from the R-3-6 branch, with a svn checkout from today, revision

Re: [Rd] possible bug in R's configure check for C++11 features

2019-09-04 Thread Kasper Daniel Hansen
ing > CXX11=g++ so it is doing what you asked it to. Since the settings are > inherited upwards, this implies that you are setting both CXX14 and CXX17 > to g++. So I’m not quite sure I understand your concern. > > Cheers, > Simon > > > > > On Sep 3, 2019, at 9:02

Re: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?

2010-08-19 Thread Kasper Daniel Hansen
I have read a significant number of vignettes from Bioconductor packages and I have never seen it used. Kasper On Thu, Aug 19, 2010 at 3:17 PM, Marc Schwartz wrote: > On Aug 19, 2010, at 2:07 PM, Duncan Murdoch wrote: > >> I am trying to improve the error reporting in Sweave documents, so that i

Re: [Rd] Speeding up matrix multiplies

2010-08-23 Thread Kasper Daniel Hansen
On Mon, Aug 23, 2010 at 10:39 PM, Radford Neal wrote: >> On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: > >> > In particular, all matrix x vector and vector x matrix products will >> > in this version be done in the matprod routine, not the Fortran routine. >> > And this is the right thing to do

Re: [Rd] How to add a slot to S4 class of an existing package?

2010-09-07 Thread Kasper Daniel Hansen
Seb That thread and the resources in Biobase assumes that you have a class that extends "Versioned". Doing so will help you in the long run by providing you with updateObject (at the cost of some complexity). However, it does not really help you if the existing class does not extend Versioned. I

Re: [Rd] a small suggestion for improving the building of packages

2010-09-16 Thread Kasper Daniel Hansen
I agree with Kevin, I never run package.skeleton more than once. But one advantage to running it over and over again is if you change the names or the ordering of function arguments. That gets autowritten and I could see that being convenient if you change those a lot (as you sometime do in devel

[Rd] possible bug in summaryRprof with memory.profiling=TRUE

2010-10-06 Thread Kasper Daniel Hansen
I apologize for the somewhat brief bug report, but we are getting close to the release of 2.12 and I thought it was better to send something brief than to stay silent. R version 2.12.0 beta (2010-10-06 r53205) compiled with memory-profiling enabled. I have very little experience with memory prof

Re: [Rd] Recursion error after upgrade to R_2.11.1 [Sec=Unclassified] [Sec=Unclassified]

2010-10-07 Thread Kasper Daniel Hansen
Troy For what it's worth, the ExpressionSet / eSet class in Biobase from Bioconductor has for a long time implemented a pass-by-reference system, using amongst other stuff locked environments to make sure things are read only. You might find this useful to look at. In general it is hard to compl

Re: [Rd] problem building R from svn repo

2010-11-13 Thread Kasper Daniel Hansen
Before make'ing you need to get the recommended packages. I do (with your paths) ../svn/tools/sync-recommended ../svn/tools/sync-recommended You should not run configure or make with sudo. If you need to install system-wide, you only need to run make install under sudo, like ./configure make sud

Re: [Rd] Error in generating sweave-tex -> pdf file

2010-12-23 Thread Kasper Daniel Hansen
Hi Carol As you now know, this is because per default R/Sweave puts the line \usepackage{Sweave} in the generated tex file. This means the tex file is "portable", but it also implies that Sweave.sty needs to be "installed" in your tex installation. Or you can put the Sweave.sty in the director

Re: [Rd] setGeneric for residuals, etc

2011-01-24 Thread Kasper Daniel Hansen
Johann, whether S4 is "better" than S3 is a heated subject. No-one (I think) disputes that S4 is in some sense more flexible (for some suitable definition of flexible), but it does incur some performance overhead (how much is debatable) and some would argue that it also makes code more complicate

[Rd] removing files on windows as part of vignette building

2011-03-04 Thread Kasper Daniel Hansen
This is about the Bioconductor package Genominator. As part of the vignette building process, we create two sizable sqlite3 databases, in the vignette directory (inst/doc). When we build the source tarball, these databases are deleted, but when a Windows binary is being made on the Bioconductor b

Re: [Rd] duplicates() function

2011-04-08 Thread Kasper Daniel Hansen
On Fri, Apr 8, 2011 at 11:08 AM, Joshua Ulrich wrote: > How about: > > y <- rep(NA,length(x)) > y[duplicated(x)] <- match(x[duplicated(x)] ,x) > I use Joshua's trick all the time. But it might still be nice with a C implementation. While we are discussing duplication, I would also like to see s

Re: [Rd] Problem with dyn.load in R 2.13.0 -- the real problem

2011-04-13 Thread Kasper Daniel Hansen
Terry You may not be aware of this, but the "new" default in R is to use a user library which is architecture and R-version dependent. Ie. if you do not play around with R_USER_LIBS or .Rprofile, functions like R CMD INSTALL or install.packages will default to something like (from my current vers

Re: [Rd] R CMD Sweave versus Sweave() on Windows

2011-04-21 Thread Kasper Daniel Hansen
Bernd .Renviron is not being read when you do R CMD ... This is documented, but still puzzling to me. I solved this by using Sys.setenv("SWEAVE_STYLEPATH_DEFAULT" = "TRUE") in my .Rprofile (which is being read by R CMD ...). If you were on linux you could also put it inside your shell profile

Re: [Rd] Loading a package

2011-04-24 Thread Kasper Daniel Hansen
On Sun, Apr 24, 2011 at 10:08 AM, Orin Richards wrote: > > > Hello All, > I heard of the First() function in R. but am not sure entirely how it is used. >  I would like to load an R package at startup, instead of having to manually > load each time I run R. How is the first() function used to achi

[Rd] r-2.13 fails make check

2011-05-19 Thread Kasper Daniel Hansen
I am only reporting this because it is the current release branch and not devel. R-2.13 from svn revision 55957 builds fine, but fails make check. This happened with a fresh svn checkout 12 hours ago and it still happens as of now. Two days ago I could build R-2.13 and it passed make check on the

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-06 Thread Kasper Daniel Hansen
On Mon, Jul 4, 2011 at 8:08 AM, Prof Brian Ripley wrote: > In the near future all packages will have a name space.  If the sources do > not contain one, a default NAMESPACE file will be added. This again will > simplify the descriptions and also a lot of internal code.  Maintainers of > packages w

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-06 Thread Kasper Daniel Hansen
On Wed, Jul 6, 2011 at 9:42 AM, Duncan Murdoch wrote: > On 11-07-06 9:25 AM, Kasper Daniel Hansen wrote: >> >> On Mon, Jul 4, 2011 at 8:08 AM, Prof Brian Ripley >>  wrote: >>> >>> In the near future all packages will have a name space.  If the source

[Rd] NAMESPACE imports

2011-08-08 Thread Kasper Daniel Hansen
Is there some functionality for NAMSPACE files where I can import a package, except a couple of functions, something like importExcept The situation is that I import from two different packages, A and B . A (Biobase) is quite big and I essentially want to import all of the package. B (matrixSta

Re: [Rd] Referencing 'inst' directory in installed package

2011-08-17 Thread Kasper Daniel Hansen
On Tue, Aug 16, 2011 at 11:17 PM, Jonathan Malmaud wrote: > Hi, > My R package has files in the 'inst' directory that it needs to reference. > How can the R scripts in my package find out the full path to the 'inst' > directory after the package is installed, given that different users may have

Re: [Rd] NEWS.md support on CRAN

2015-06-02 Thread Kasper Daniel Hansen
This is supported by the NEWS.Rd mechanism, but many authors don't use it. I agree; it would be wonderful if everyone used it and I think the main (potential) advantage of this thread is to make it used (both by developers and users) more broadly. Kasper On Tue, Jun 2, 2015 at 11:42 AM, Michael D

Re: [Rd] Why not pthreads on Windows in 'parallel' package?

2015-08-14 Thread Kasper Daniel Hansen
mclapply uses fork which is different from pthreads. As I understand it, pthreads requires you to rewrite code, fork is a system call which takes care of completely replicating the current state of the process. Kasper On Fri, Aug 14, 2015 at 5:00 PM, Henrik Bengtsson wrote: > On Windows there

Re: [Rd] summary( prcomp(*, tol = .) ) -- and 'rank.'

2016-03-24 Thread Kasper Daniel Hansen
Martin, I fully agree. This becomes an issue when you have big matrices. (Note that there are awesome methods for actually only computing a small number of PCs (unlike your code which uses svn which gets all of them); these are available in various CRAN packages). Best, Kasper On Thu, Mar 24, 2

Re: [Rd] src/Makevars ignored ?

2016-09-27 Thread Kasper Daniel Hansen
As a package author, it is in my opinion irresponsible to override these system settings (which is why it is also impossible). You have no idea what system it is being deployed on, I mean, you don't even know if the compiler is gcc. If a user wants (say) heavy optimization they will compile R with

Re: [Rd] src/Makevars ignored ?

2016-09-27 Thread Kasper Daniel Hansen
s, it seems to me like it should be included in the package source by the package maintainer, perhaps using a configure script, but that is ultimately something which is up to the package maintainer. Best, Kasper On Tue, Sep 27, 2016 at 10:52 AM, Eric Deveaud wrote: > Le 27/09/16 à 16:17, Ka

Re: [Rd] On implementing zero-overhead code reuse

2016-10-03 Thread Kasper Daniel Hansen
On Mon, Oct 3, 2016 at 10:18 AM, wrote: > Hi Kynn, > > Thanks for expanding. > > I wrote a function like yours when I first started using R. It's > basically the same up to your "new.env()" line, I don't do anything > with environmentns. I just called my function "mysource" and it's > essentially

Re: [Rd] How to handle INT8 data

2017-01-20 Thread Kasper Daniel Hansen
Have you benchmarked these potential drawbacks for your usecase? Eg. memory depends on the structure of the identifies, given how R stores characters internally. Given all the issues raised here, I would 100% provide a script for reading the data into R, if this is for distribution. Best, Kasper

[Rd] complex tests failure

2017-05-04 Thread Kasper Daniel Hansen
For a while I have been getting that the complex tests fails on RHEL 6. The specific issue has to do with tanh (see below for full output from complex.Rout.fail). This is both with the stock compiler (GCC 4.4.7) and a compiler supplied through the conda project (GCC 4.8.5). The compiler supplied

Re: [Rd] complex tests failure

2017-05-04 Thread Kasper Daniel Hansen
Kalibera wrote: > > As a quick fix, you can undefine HAVE_CTANH in complex.c, somewhere after > including config.h > An internal substitute, which is implemented inside complex.c, will be > used. > > Best > Tomas > > > > > On 05/04/2017 02:57 PM, Kasper Daniel Han

Re: [Rd] complex tests failure

2017-05-07 Thread Kasper Daniel Hansen
ote: > > > There is no way to control this at runtime. > We will probably have to add a configure test. > > Best, > Tomas > > On 05/04/2017 03:23 PM, Kasper Daniel Hansen wrote: > > Thanks. > > I assume there is no way to control this via. environment variables or >

[Rd] test fails when requesting LC_CTYPE

2017-05-19 Thread Kasper Daniel Hansen
On RedHat Enterprise Linux 6, the test below fails (this is using the stock GCC 4.4.7) from R-devel r72707. LC_CTYPE is unset when I run it, but LANG=en_US.UTF-8 It also failed "yesterday" where as far as I recall the test code looked a bit different. Best, Kasper > ## Results differed by platf

Re: [Rd] test fails when requesting LC_CTYPE

2017-05-19 Thread Kasper Daniel Hansen
not(identical(Sys.setlocale("LC_CTYPE", mbyte.lc), mbyte.lc)) > oloc [1] "en_US.UTF-8" > mbyte.lc [1] "en_US.UTF-8" On Fri, May 19, 2017 at 7:29 PM, Kasper Daniel Hansen < kasperdanielhan...@gmail.com> wrote: > On RedHat Enterprise Linux 6, the test belo

Re: [Rd] test fails when requesting LC_CTYPE

2017-05-21 Thread Kasper Daniel Hansen
Thanks, works for me. Best, Kasper On Sat, May 20, 2017 at 9:35 AM, Martin Maechler wrote: > >>>>> Kasper Daniel Hansen > >>>>> on Fri, 19 May 2017 20:09:24 -0400 writes: > > > I rebuilt R with > > export LC_CTYPE=en_US.UTF-8 >

[Rd] possible bug in R CMD Rd2pdf

2017-09-26 Thread Kasper Daniel Hansen
When I include the macros \packageAuthor, \packageDescription, \packageTitle, \packageMaintainer in a XX-package.Rd file, R CMD Rd2pdf fails with $ R CMD Rd2pdf mpra Hmm ... looks like a package Converting Rd files to LaTeX Error : mpra/man/mpra-package.Rd:6: file './DESCRIPTION' does not exist T

Re: [Rd] possible bug in R CMD Rd2pdf

2017-09-27 Thread Kasper Daniel Hansen
10:27 PM, Kasper Daniel Hansen wrote: > >> When I include the macros \packageAuthor, \packageDescription, >> \packageTitle, \packageMaintainer in a XX-package.Rd file, R CMD Rd2pdf >> fails with >> >> $ R CMD Rd2pdf mpra >> Hmm ... looks like a package >&g

[Rd] R CMD Rd2pdf and macros

2017-10-03 Thread Kasper Daniel Hansen
When I run R CMD Rd2pdf on the man pages of a package, ie R CMD Rd2pdf man I get Converting Rd files to LaTeX Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown", fragment = FALSE, : man/mpra-package.Rd:6: unknown macro '\packageTitle' Warning in parse_Rd("man/mpra-package.Rd", e

Re: [Rd] R CMD Rd2pdf and macros

2017-10-04 Thread Kasper Daniel Hansen
(C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin16.7.0 (64-bit) On Wed, Oct 4, 2017 at 3:56 AM, Kurt Hornik wrote: > >>>>> Kasper Daniel Hansen writes: > > Interesting. When I take e.g. zTree as the last CRAN package using the > \packageTitl

Re: [Rd] R CMD Rd2pdf and macros

2017-10-05 Thread Kasper Daniel Hansen
ces is the existence (or not) of pkgname/build/partial.rdb Best, Kasper On Wed, Oct 4, 2017 at 10:12 AM, Kasper Daniel Hansen < kasperdanielhan...@gmail.com> wrote: > No, I do not get the same as you. > > I have tested with R-devel and R-patched compiled today. When I do > >

[Rd] timezone tests and R-devel

2020-10-01 Thread Kasper Daniel Hansen
The return value of Sys.time() today with a timezone of US/Eastern is unchanged between 4.0.3-patched and devel, but on devel the following test fails all.equal(x, as.POSIXlt(x)) with x = Sys.time() This means that devel does not complete make tests (failure on tests/reg-tests-2.R) It is enti

Re: [Rd] timezone tests and R-devel

2020-10-02 Thread Kasper Daniel Hansen
and 'Europe/Berlin')" > > > So as.POSIXlt() sets a 'tzone' attribute if TZ is set, but this > behaviour is not new. Even with old R 3.6.3, I see > > > R-3.6.3 --vanilla --slave -e 'attr(as.POSIXlt(Sys.time()), "tzone")' > [1] "&

Re: [Rd] timezone tests and R-devel

2020-10-23 Thread Kasper Daniel Hansen
an error. Best, Kasper On Fri, Oct 2, 2020 at 11:28 AM Kasper Daniel Hansen < kasperdanielhan...@gmail.com> wrote: > Yes, the potential issue I see is that > make check > fails when I explicitly set TZ. However, I set it to be the same as what > the system reports when I login

Re: [Rd] timezone tests and R-devel

2020-10-30 Thread Kasper Daniel Hansen
On Fri, Oct 23, 2020 at 11:10 AM Sebastian Meyer wrote: > Yes, you are absolutely right and I'm pretty sure this will be fixed in > one way or another. > > IMO, the failing test should simply use all.equal.POSIXt's new argument > check.tzone=FALSE. > I agree that this is a simple fix and I am wo

[Rd] bug report for make check

2020-10-30 Thread Kasper Daniel Hansen
I would like to request access to bugzilla to file a bug report on make check for R-devel. Following changes to all.equal.POSIXt, make check now reports an error if the environment variable TZ is set to TZ="US/Eastern" (and likely other values). This can be addressed by using the argument chec

Re: [Rd] bug report for make check

2020-10-30 Thread Kasper Daniel Hansen
to fix this. > > Thanks for your patience, > Tomas > > On 10/30/20 11:24 AM, Kasper Daniel Hansen wrote: > > I would like to request access to bugzilla to file a bug report on make > > check for R-devel. > > > > Following changes to all.equal.POSIXt, > >

Re: [Rd] custom allocators, Valgrind and uninitialized memory

2021-03-30 Thread Kasper Daniel Hansen
On Tue, Mar 30, 2021 at 9:39 AM Tomas Kalibera wrote: > appropriate to tell valgrind about it. As this is becoming rather too > technical and specific to the internals, feel free to take this offline > with Simon and me. > Respectfully, this seems to me to be exactly the kind of exchange R-dev

Re: [Rd] codetools wrongly complains about lazy evaluation in S4 methods

2023-06-13 Thread Kasper Daniel Hansen
On Sat, Jun 3, 2023 at 11:51 AM Mikael Jagan wrote: > The formals of the newly generic 'qr.X' are inherited from the non-generic > function in the base namespace. Notably, the inherited default value of > formal argument 'ncol' relies on lazy evaluation: > > > formals(qr.X)[["ncol"]] >

Re: [Rd] legitimate use of :::

2013-08-24 Thread Kasper Daniel Hansen
On Thu, Aug 22, 2013 at 8:27 PM, Peter Meilstrup Using ::: on a package you don't control can be more dangerous. For a > > package author to choose to export a function to the public interface > represents at least some assurance that that interface will be stable or > slow-moving. But there are no

Re: [Rd] legitimate use of :::

2013-08-26 Thread Kasper Daniel Hansen
It seems that several people in this thread assumes that it is easy or even possible to convince an author of a package to export a given function. This is clearly not always true, partly because as an author you gain additional work by doing this. The downsides to using ::: is really about the p

Re: [Rd] ‘:::’ call

2013-08-28 Thread Kasper Daniel Hansen
My point of view is that if you have a core package where you need access to "hidden" functions for making a plugin, you should probably export these hidden functions in the first place. Chances are that if you need access to these hidden functions (for expert use), other (expert) users might want

Re: [Rd] ‘:::’ call

2013-08-28 Thread Kasper Daniel Hansen
On Wed, Aug 28, 2013 at 3:22 PM, Duncan Murdoch wrote: > On 28/08/2013 3:06 PM, Kasper Daniel Hansen wrote: > >> My point of view is that if you have a core package where you need access >> to "hidden" functions for making a plugin, you should probably export >>

Re: [Rd] directives to explicitely exclude objects from import into namespaces

2013-09-06 Thread Kasper Daniel Hansen
Well, it makes sense to me, since I have had the same issue. Suppose you have two packages A and B. You would really like to import both of them since it is too much work to figure out exactly which functions you use, and you consider both of them fundamental to your own work. So you would like

[Rd] processing of /vignettes and /inst/doc

2013-09-17 Thread Kasper Daniel Hansen
It is stated in R-exts that Sweave files (.Rnw) are either processed in /vignettes or /inst/doc, not both. Furthermore, it is stated that external manuals and other files in /inst/doc will be installed. This behaviour has been used to deal with the situation where a package has two "vignettes", o

Re: [Rd] processing of /vignettes and /inst/doc

2013-09-17 Thread Kasper Daniel Hansen
Thanks a lot for the speedy fix. It is a little unclear to me what "considers it to be a vignette" implies. Re-reading R-exts, it is pretty clear on vignettes, Sweave format vignettes, non-Sweave but a little unclear on manuals, arbitrary format except mentioning that they should go in /inst

Re: [Rd] Problems when moving to Imports from Depends

2013-09-27 Thread Kasper Daniel Hansen
Peter, This is a relatively "new" warning from R CMD check (for some definition of new). The authors of Hmisc have clearly not yet gone through the process of cleaning it up, as you are doing right now (and there are many other packages that still need to address this, including several of mine).

Re: [Rd] Problems when moving to Imports from Depends

2013-09-27 Thread Kasper Daniel Hansen
On Sat, Sep 28, 2013 at 12:05 AM, Peter Langfelder < peter.langfel...@gmail.com> wrote: > On Fri, Sep 27, 2013 at 2:50 PM, Kasper Daniel Hansen > wrote: > > Peter, > > > > This is a relatively "new" warning from R CMD check (for some definition > of &

[Rd] user defined macros in Rd files

2013-10-09 Thread Kasper Daniel Hansen
R-exts, in "2.13 User-defined macros", discusses user-defined macros. Is it possible to have macros defined in one file, be used by another (within a package)? This would increase the usefulness substantially, IMHO. Best, Kasper [[alternative HTML version deleted]]

[Rd] advise on Depends

2013-10-23 Thread Kasper Daniel Hansen
This is about the new note Depends: includes the non-default packages: ‘BiocGenerics’ ‘Biobase’ ‘lattice’ ‘reshape’ ‘GenomicRanges’ ‘Biostrings’ ‘bumphunter’ Adding so many packages to the search path is excessive and importing selectively is preferable. Let us say my package A either uses a

Re: [Rd] how to unbreak a circular package dependence (S4 class data)

2014-01-28 Thread Kasper Daniel Hansen
This question is quite common in Bioconductor because of the extensive use of S4 and because our data are often too big to stay within the size requirements on software packages (we separate packages into software and data, with size limits (5MB total size of final source tar ball) on software, but

Re: [Rd] how to unbreak a circular package dependence (S4 class data)

2014-01-28 Thread Kasper Daniel Hansen
This is a great comment if the primary use of the data is to make the data available. It is clear that a change in the internals of the class structure requires changing the data package, and that is a clear drawback to my recommendation. I have had to do this on several occasions. One issue wit

Re: [Rd] R CMD check, NOTEs, & S4-dependent packages

2014-02-04 Thread Kasper Daniel Hansen
You don't need this .onLoad anymore. Just Depends on methods and use import(methods) (or perhaps be more specific) in NAMESPACE Kasper On Tue, Feb 4, 2014 at 7:13 PM, Roebuck,Paul L wrote: > As I was running "R CMD check" on one of my older packages > (matlab), I was attempting to fix one of t

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-19 Thread Kasper Daniel Hansen
Our experience in Bioconductor is that this is a pretty hard problem. What the OP presumably wants is some guarantee that all packages on CRAN work well together. A good example is when Rcpp was updated, it broke other packages (quick note: The Rcpp developers do a incredible amount of work to de

Re: [Rd] Problem with Renaming R object

2014-04-30 Thread Kasper Daniel Hansen
save(list = Objectout, file = filename) On Wed, Apr 30, 2014 at 12:11 PM, Kamal wrote: > Hi, > > I have a problem in renaming R object and saving them within a loop. For > ex: > > for (i in 1:length(all_files)) > { > uncov_GR <- "variable created in loop" > fil

Re: [Rd] R CMD check for the R code from vignettes

2014-05-31 Thread Kasper Daniel Hansen
The Bioconductor project has a substantial amount of teaching material in the form of Sweave files. For teaching, it can be extremely convenient to give people an R script which they can copy and paste from (or do something else with). This is especially true for inexperienced R users. Best, Kas

[Rd] feature request: print.bibentry

2014-06-07 Thread Kasper Daniel Hansen
I have discovered that CITATION files now allow for bibentry objects and supports printing in various formats. For a package implementing methods described in >1 articles, it is nice to have something like the following in the bibentry: header = "If you're using feature X, please cite the foll

Re: [Rd] operation on ‘numsels’ may be undefined

2014-06-23 Thread Kasper Daniel Hansen
You're getting this message because you are using an undefined aspect of ++. Depending on compiler convention re. the interpretation of ++, your code may be interpreted differently; ie. different compilers will interpret the code differently. This is a bad thing. You're presumably getting the wa

Re: [Rd] operation on ‘numsels’ may be undefined

2014-06-23 Thread Kasper Daniel Hansen
I am not an expert on this, but I note that the section on -Wsequence-point at http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html specifically mentions ? and :. Perhaps some more work on tracking down their definitions and precedence might lead to insights. Best, Kasper On Mon, Jun 23, 20

Re: [Rd] how to list external dependencies (i.e., non-R packages)?

2014-07-13 Thread Kasper Daniel Hansen
Several packages in Bioconductor (and possibly CRAN) uses SystemRequirements in DESCRIPTION, but unless the user reads the DESCRIPTION file, this is for naught. Still useful to some people I think. Best, Kasper On Sun, Jul 13, 2014 at 9:13 PM, Greg Minshall wrote: > hi. i'm working on a pa

Re: [Rd] Is using devtools::release no longer allowed?

2014-08-19 Thread Kasper Daniel Hansen
Given the seeming need for automated submission to CRAN, perhaps the repos maintainers could consider making a function available that allows one to do so, for example source("http://www.cran.r-project.org/submit_to_cran.R";) submit_to_cran("PACKAGE.TARBALL", REQUIRED_ARGUMENTS) or perhaps be i

Re: [Rd] gsl package on mavericks

2014-10-01 Thread Kasper Daniel Hansen
I have only skimmed this issue. But you check gsl version by compiling a program with #include This assumes, as far as I can see, that gsl/gsl.h is in the search path (I know, it is the wrong technical term) of the compiler, which may not be the case for a non-standard installation. Above this c

Re: [Rd] Code tools for identifying which package A functions package B use?

2014-11-14 Thread Kasper Daniel Hansen
The best thing I have found is codetoolsBioC in the Bioconductor subversion repository. Best, Kasper On Fri, Nov 14, 2014 at 9:57 PM, Henrik Bengtsson wrote: > Hi, > > I'd like to list all package PkgA functions that another package PkgB > use via Depends or Imports (ignoring Suggests for simpl

Re: [Rd] gsub with perl=TRUE results in 'this version of PCRE is not compiled with Unicode property support' in R-devel

2015-01-08 Thread Kasper Daniel Hansen
Dan, for OS X, there is a new pcre library posted at http://r.research.att.com/libs/ with a date stamp of Dec 28. This fixes this problem. You can test for this by running make check post compilation. It'll bang out with a failure if this is not in order. (And I know that all of this is descr

Re: [Rd] error code 1 from Lapack routine 'dsyevr'

2015-02-02 Thread Kasper Daniel Hansen
fortune candidate On Mon, Feb 2, 2015 at 8:54 AM, peter dalgaard wrote: > > On 02 Feb 2015, at 04:08 , eigen wrote: > > > Thank you for your reply. Do you have any idea of how to get rid of the > > errors? I tried Null function to calculate eigenvectors and nearPD to get > > approximate positiv

Re: [Rd] Proposing a change in the base::sink interface for type argument

2015-03-18 Thread Kasper Daniel Hansen
In other words: this is a standard programming paradigm in R/S which (unfortunately) is not widely known, based on my network. It is really nice for developers. Best, Kasper On Wed, Mar 18, 2015 at 5:42 PM, MacQueen, Don wrote: > It's only an illusion until one actually tries providing a vecto

Re: [Rd] About removing zlib from R-devel

2015-03-27 Thread Kasper Daniel Hansen
Related to this question: I have installed bzip2 1.0.6 by hand, but configure still fails. When I look at config.log I get the following configure:34150: /usr/bin/gcc -std=gnu99 -o conftest -g -O2 -march=amdfam10 -g -O2 -march=amdfam10 -L/usr/local/lib64 confte st.c -lbz2 -lz -lrt -ldl -lm >&

Re: [Rd] About removing zlib from R-devel

2015-03-30 Thread Kasper Daniel Hansen
being picked up). Best, Kasper On Fri, Mar 27, 2015 at 11:19 AM, Kasper Daniel Hansen < kasperdanielhan...@gmail.com> wrote: > Related to this question: > > I have installed bzip2 1.0.6 by hand, but configure still fails. When I > look at config.log I get the following > > c

Re: [Rd] multiple defines of diag

2011-10-06 Thread Kasper Daniel Hansen
Terry, if you're using two packages that both define a diag function/method you absolutely _have_ to resolve this using your NAMESPACE. [Update: I see both are methods. I actually don't know what happens when you have the same generic in both packages] And yes, there is both an importClassesFro

Re: [Rd] multiple defines of diag

2011-10-06 Thread Kasper Daniel Hansen
On Thu, Oct 6, 2011 at 1:19 PM, Terry Therneau wrote: > > On Thu, 2011-10-06 at 10:00 -0400, Kasper Daniel Hansen wrote: >> if you're using two packages that both define a diag function/method >> you absolutely _have_ to resolve this using your NAMESPACE.  [Update: >&g

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-10-31 Thread Kasper Daniel Hansen
Martin, I am pretty sure (but I will probably be proven wrong) that when r-announce was created it was stated that every email got sent to both r-help and r-devel, and I see I have received emails from r-announce in the past despite only being subscribed to r-devel and not r-help. For example, I c

Re: [Rd] Error in documentation of "merge"

2011-11-04 Thread Kasper Daniel Hansen
On Fri, Nov 4, 2011 at 8:20 AM, peter dalgaard wrote: > > On Nov 4, 2011, at 13:11 , Rainer M Krug wrote: > >> Hi >> >> there seems to be an error in the documentation of the "merge" function: >> >> Arguments: >> >>    x, y: data frames, or objects to be coerced to one. >> >>  by, by.x, by.y: spec

Re: [Rd] problems with iconv

2011-12-13 Thread Kasper Daniel Hansen
Roger, Since Ripley is usually right, if I was you, I would focus on "You need to ensure that GNU libiconv is actually used: you are obviously not finding it, and I suspect your error is in not setting the path to its header file." Based on your description "I've downloaded and compiled iconv v

[Rd] configure-args for R CMD build

2012-01-15 Thread Kasper Daniel Hansen
When I build a package containing a vignette, the package gets installed to build the vignette. However, it appears that R CMD build does not allow for --configure-args. In my case, I have a C library installed in a non-standard position, and I need to tell the package where it is. It works fine

Re: [Rd] configure-args for R CMD build

2012-01-15 Thread Kasper Daniel Hansen
r R CMD check, which I forgot to mention in my original post. Kasper > On 2012-01-15, at 7:43 AM, "Kasper Daniel Hansen" > wrote: > > When I build a package containing a vignette, the package gets > installed to build the vignette.  However, it appears that R CMD build &

Re: [Rd] text(1:10, col=NA) is not transparent

2012-02-20 Thread Kasper Daniel Hansen
Peter, not all devices support transparency. My guess is that you are plotting to a device which does not, but it is hard to know from your email. Kasper On Mon, Feb 20, 2012 at 6:09 AM, Peter Ruckdeschel wrote: > Maybe I am missing something, but according to the help page > to par (section

Re: [Rd] I wish xlim=c(0, NA) would work. How about I send you a patch?

2012-04-16 Thread Kasper Daniel Hansen
On Mon, Apr 16, 2012 at 4:29 PM, baptiste auguie wrote: > Hi, > > Using range wouldn't help if you wanted to restrict one of the limits, > not stretch it > > plot(1:11, y <- seq(-5, 5), ylim= range(0, y)) range(pmin(0,y)) Kasper > > baptiste > > On 17 April 2012 08:20, Greg Snow <538...@gmail.

  1   2   >