Re: [Bioc-devel] how can I declare that a package doesn't/can't fully support Windows

2018-10-10 Thread Hervé Pagès

And of course: the whole trick I described below only makes sense
if MTseeker doesn't rely on gmapR for its core functionality, that
is, if not having gmapR installed still allows the user to accomplish
something meaningful with MTseeker.

Otherwise the trick below will make MTseeker available on Windows
but Windows users won't be able to accomplish anything meaningful
with it. In that case, marking the package as unsupported on Windows
would be preferable.

Hope this makes sense,

H.

On 10/10/2018 10:26 PM, Hervé Pagès wrote:

Hi Tim,

No platform-specific dontrun capabilities AFAIK but you can use
something like:

   if (requireNamespace("gmapR", quietly=TRUE)) {
   ...
   ...
   }

in your man pages.

You would also need to move gmapR from Imports to Suggests.

Then make sure that MTseeker passes 'R CMD check' **without**
the gmapR package being installed. You'll need to define and set
environment variable _R_CHECK_FORCE_SUGGESTS_ to 0 for this.
Do it with:

   export _R_CHECK_FORCE_SUGGESTS_=0

on Linux or Mac, or with:

   set _R_CHECK_FORCE_SUGGESTS_=0

on Windows.

Once MTseeker is accepted, we'll add a .BBSoptions file with special
directive:

   CHECKprepend.win: set _R_CHECK_FORCE_SUGGESTS_=0&&

This will have the effect to set the environment variable on the
Windows build machines before running 'R CMD check' there.
So MTseeker will be supported and available on all platforms.

For MTseekerData: the package doesn't seem to make any use of gmapR
so you can probably remove gmapR from its Suggests field.

Hope this helps,
H.


On 10/10/2018 07:46 AM, Tim Triche, Jr. wrote:
it looks like gmapR does not support Windows, and as a result, my 
MTseeker
package cannot build on tokay1, so the Data package which requires it 
also
cannot build on tokay1.  Are there platform-specific dontrun 
capabilities?


https://urldefense.proofpoint.com/v2/url?u=http-3A__bioconductor.org_spb-5Freports_MTseekerData-5Fbuildreport-5F20181010103212.html=DwICAg=eRAMFD45gAfqt84VtBcfhQ=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA=x8fxgyra6DmetOzKCh1Zm1X25BwPM7TDr8UUNYwgV18=QNKSsmQnfEAQOTI0r8dDuW_d01XzL_cL1cb5QIElLxw= 



Short of somehow forcing gmapR to build on Windows, which I believe is
beyond my control, is there a way to declare that parts of the MTseeker
package are unsupported/unsupportable on Windows?

I suppose I could cleave off the variant-recalling portions but that 
seems
a little ridiculous. The original goal was to take the non-NuMT reads 
from

a given alignment, realign (only) those to rCRS/RSRS, and call against
that, for better mitochondrial haplogroup inference. We're still working
towards the full version, but even just calling variants against rCRS 
with
indels is hugely useful, and the ability to screen out 
haplogroup-specific

variants while retaining indels, SNVs, etc. turns out to be VERY handy.
More generally, there isn't any equivalent (AFAIK) in BioC, at all.

--t

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_bioc-2Ddevel=DwICAg=eRAMFD45gAfqt84VtBcfhQ=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA=x8fxgyra6DmetOzKCh1Zm1X25BwPM7TDr8UUNYwgV18=rzPUqLBge6xE1TymeYxIxJxkiiOHefbSgzPOLYEhvrM= 







--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] how can I declare that a package doesn't/can't fully support Windows

2018-10-10 Thread Hervé Pagès

Hi Tim,

No platform-specific dontrun capabilities AFAIK but you can use
something like:

  if (requireNamespace("gmapR", quietly=TRUE)) {
  ...
  ...
  }

in your man pages.

You would also need to move gmapR from Imports to Suggests.

Then make sure that MTseeker passes 'R CMD check' **without**
the gmapR package being installed. You'll need to define and set
environment variable _R_CHECK_FORCE_SUGGESTS_ to 0 for this.
Do it with:

  export _R_CHECK_FORCE_SUGGESTS_=0

on Linux or Mac, or with:

  set _R_CHECK_FORCE_SUGGESTS_=0

on Windows.

Once MTseeker is accepted, we'll add a .BBSoptions file with special
directive:

  CHECKprepend.win: set _R_CHECK_FORCE_SUGGESTS_=0&&

This will have the effect to set the environment variable on the
Windows build machines before running 'R CMD check' there.
So MTseeker will be supported and available on all platforms.

For MTseekerData: the package doesn't seem to make any use of gmapR
so you can probably remove gmapR from its Suggests field.

Hope this helps,
H.


On 10/10/2018 07:46 AM, Tim Triche, Jr. wrote:

it looks like gmapR does not support Windows, and as a result, my MTseeker
package cannot build on tokay1, so the Data package which requires it also
cannot build on tokay1.  Are there platform-specific dontrun capabilities?

https://urldefense.proofpoint.com/v2/url?u=http-3A__bioconductor.org_spb-5Freports_MTseekerData-5Fbuildreport-5F20181010103212.html=DwICAg=eRAMFD45gAfqt84VtBcfhQ=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA=x8fxgyra6DmetOzKCh1Zm1X25BwPM7TDr8UUNYwgV18=QNKSsmQnfEAQOTI0r8dDuW_d01XzL_cL1cb5QIElLxw=

Short of somehow forcing gmapR to build on Windows, which I believe is
beyond my control, is there a way to declare that parts of the MTseeker
package are unsupported/unsupportable on Windows?

I suppose I could cleave off the variant-recalling portions but that seems
a little ridiculous. The original goal was to take the non-NuMT reads from
a given alignment, realign (only) those to rCRS/RSRS, and call against
that, for better mitochondrial haplogroup inference. We're still working
towards the full version, but even just calling variants against rCRS with
indels is hugely useful, and the ability to screen out haplogroup-specific
variants while retaining indels, SNVs, etc. turns out to be VERY handy.
More generally, there isn't any equivalent (AFAIK) in BioC, at all.

--t

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_bioc-2Ddevel=DwICAg=eRAMFD45gAfqt84VtBcfhQ=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA=x8fxgyra6DmetOzKCh1Zm1X25BwPM7TDr8UUNYwgV18=rzPUqLBge6xE1TymeYxIxJxkiiOHefbSgzPOLYEhvrM=



--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Problem with setClassUnion and DelayedArray

2018-10-10 Thread Hervé Pagès

Hi Elizabeth,

I agree that the setClassUnion() warning is rather esoteric, especially
the "consider setClassUnion()" part.

  library(DelayedArray)
  setClassUnion("matrixOrHDF5", c("matrix", "DelayedArray"))
  # Warning message:
  # subclass "DelayedArray1" of class "DelayedArray" is not local and
  # cannot be updated for new inheritance information; consider

Furthermore, showClass("DelayedArray") reports the correct inheritance
information:

  showClass("DelayedArray1")
  # Class "DelayedArray1" [package "DelayedArray"]
  #
  # Slots:
  #
  # Name:index delayed_opsseed
  # Class:listlist ANY
  #
  # Extends:
  # Class "DelayedArray", directly
  # Class "DelayedUnaryIsoOp", by class "DelayedArray", distance 2
  # Class "matrixOrHDF5", by class "DelayedArray", distance 2
  # Class "DelayedUnaryOp", by class "DelayedArray", distance 3
  # Class "DelayedOp", by class "DelayedArray", distance 4
  # Class "Array", by class "DelayedArray", distance 5

As well as extends():

  extends("DelayedArray1")
  # [1] "DelayedArray1" "DelayedArray"  "DelayedUnaryIsoOp"
  # [4] "matrixOrHDF5"  "DelayedUnaryOp""DelayedOp"
  # [7] "Array"

  extends("DelayedArray", "matrixOrHDF5")
  # [1] TRUE

  extends("DelayedArray1", "DelayedArray")
  # [1] TRUE

  extends("DelayedArray1", "matrixOrHDF5")
  # [1] TRUE

So it might just be a spurious warning :-/

Anyway, I've exported the DelayedArray1 class in DelayedArray 0.7.48:


https://github.com/Bioconductor/DelayedArray/commit/26061a9b28b87b8a3ee26b8b81ff3334b55115c1

No more warning with this version:

  library(DelayedArray)
  setClassUnion("matrixOrHDF5", c("matrix", "DelayedArray"))

Cheers,
H.


On 10/10/2018 11:51 AM, Elizabeth Purdom wrote:

Hello,

I am using `setClassUnion` in my package `clusterExperiment` in the following 
code to allow for either matrix or DelayedArray:

setClassUnion("matrixOrHDF5",members=c("matrix", "DelayedArray"))

This causes the following warning in checking my package:

Warning: subclass "DelayedArray1" of class "DelayedArray" is not local and 
cannot be updated for new inheritance information; consider setClassUnion()

I’ve gotten this warning in other settings, and I believe it is due to the fact 
that setClassUnion works on the subclasses of the members, so if you give the 
argument `members=c(“X”,”Y”)` and you haven’t imported into your package all of 
the subclasses of “X” and “Y” it is warning you those non-imported classes 
haven’t been dealt with (though if so, I’d say the warning is awfully cryptic, 
especially since it says to use `setClassUnion` as a solution). In my other 
cases, I have just gone ahead and imported all of the subclasses from the 
package that defines the member classes and have gotten rid of the message (in 
the past it hasn’t been so many). But “DelayedArray1” is not an exported class 
of the DelayedArray package so that is not an option here.

I have been just ignoring this warning, since I understand (I think) the 
warning, I can’t do anything about it, and am not concerned about it since this 
new class is only used internally by my function for the slot definition. And I 
don’t think the user sees this generally. But given that we’re coming up on a 
release I thought I would ask if there’s anything I can do to get rid of this 
warning! Or can I go with my first instinct and safely ignore it?

Thanks,
Elizabeth Purdom

___
Bioc-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_bioc-2Ddevel=DwIFaQ=eRAMFD45gAfqt84VtBcfhQ=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA=4le20lkIbxVE8gFC4uH_tCGjq9qX1garrTomLOEFN6A=VePKILIDYgQk9KdF7u7hJQJLglF5ga8I6M5u99inEyo=



--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Problem with setClassUnion and DelayedArray

2018-10-10 Thread Michael Lawrence
This underscores how setClassUnion() can lead to unintended consequences.
Inheritance is an extreme form of coupling, and subclasses are expected to
obey the contract specified by the super class. By defining a class union,
the developer is essentially inventing a contract without any commitment of
compliance by the members of the union and all of their descendants,
including private classes. In some cases, like forming a union between some
class and "NULL" for optional slots, unions are safe and useful in
practice. In more complex cases, there is greater risk of making invalid
assumptions.

In this specific case, you might want to take the precedent set by
SummarizedExperiment and rely on duck typing for matrix-like objects and
avoid the union entirely.

Michael

On Wed, Oct 10, 2018 at 11:51 AM Elizabeth Purdom 
wrote:

> Hello,
>
> I am using `setClassUnion` in my package `clusterExperiment` in the
> following code to allow for either matrix or DelayedArray:
>
> setClassUnion("matrixOrHDF5",members=c("matrix", "DelayedArray"))
>
> This causes the following warning in checking my package:
>
> Warning: subclass "DelayedArray1" of class "DelayedArray" is not local and
> cannot be updated for new inheritance information; consider setClassUnion()
>
> I’ve gotten this warning in other settings, and I believe it is due to the
> fact that setClassUnion works on the subclasses of the members, so if you
> give the argument `members=c(“X”,”Y”)` and you haven’t imported into your
> package all of the subclasses of “X” and “Y” it is warning you those
> non-imported classes haven’t been dealt with (though if so, I’d say the
> warning is awfully cryptic, especially since it says to use `setClassUnion`
> as a solution). In my other cases, I have just gone ahead and imported all
> of the subclasses from the package that defines the member classes and have
> gotten rid of the message (in the past it hasn’t been so many). But
> “DelayedArray1” is not an exported class of the DelayedArray package so
> that is not an option here.
>
> I have been just ignoring this warning, since I understand (I think) the
> warning, I can’t do anything about it, and am not concerned about it since
> this new class is only used internally by my function for the slot
> definition. And I don’t think the user sees this generally. But given that
> we’re coming up on a release I thought I would ask if there’s anything I
> can do to get rid of this warning! Or can I go with my first instinct and
> safely ignore it?
>
> Thanks,
> Elizabeth Purdom
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Roxygen documentation under windows

2018-10-10 Thread Christian Mertes
Hi,

Thanks for the quick and helpful comments! As suggested, I used the the 
following code 

\code{\link[BiocParallel:BiocParallelParam-class]{BiocParallelParam}}

And it worked perfectly and all warnings are gone now! But im still puzzled why 
it only gave a warning on windows and not on linux. 

Thanks again,
Christian


> On 8. Oct 2018, at 07:14, Leonardo Collado Torres  wrote:
> 
> Hi,
> 
> Adding the -class part will help for most. To get the correct name,
> check the top left part of the help page for the function you want to
> link to. For example, if you type
> 
> library(GenomicRanges)
> ?GRanges
> 
> you'll see GRanges-class {GenomicRanges} on the top left (I'm on a Mac
> right now).
> 
> Here are some examples that I fixed on my packages
> https://github.com/lcolladotor/derfinder/commit/2dee40434b8916a2e8acc717e3300c07ad5236b2
> 
> Best,
> Leo
> 
> On Mon, Oct 8, 2018 at 9:00 AM Shepherd, Lori
>  wrote:
>> 
>> I think there is a reference here
>> 
>> https://stackoverflow.com/questions/48430093/how-do-i-resolve-rd-warning-missing-file-link-when-building-packages-in-rstudi
>> 
>> 
>> Where the actual name of the man file that has BiocParallelParam is  
>> BiocParallelParm-class and BiocParallelParam is an alias.
>> 
>> 
>> I believe if you change the link to be
>> 
>> \code{\link[BiocParallel:BiocParallelParam-class]{BiocParallelParam}}  It 
>> should remedy the issue.
>> 
>> 
>> 
>> 
>> Lori Shepherd
>> 
>> Bioconductor Core Team
>> 
>> Roswell Park Cancer Institute
>> 
>> Department of Biostatistics & Bioinformatics
>> 
>> Elm & Carlton Streets
>> 
>> Buffalo, New York 14263
>> 
>> 
>> From: Bioc-devel  on behalf of Christian 
>> Mertes 
>> Sent: Sunday, October 7, 2018 9:01:35 PM
>> To: bioc-devel
>> Subject: [Bioc-devel] Roxygen documentation under windows
>> 
>> Hey all,
>> 
>> I have a question. My package builds perfectly on Linux and MacOS, but fails 
>> to link my documentation correctly on Windows, which results in a warning.
>> 
>> The exact error which I get is:
>> Rd warning: 
>> C:/Users/biocbuild/bbs-3.8-bioc/tmpdir/Rtmpei0FPy/R.INSTALL215c42273ec6/OUTRIDER/man/OUTRIDER.Rd:22:
>>  file link 'BiocParallelParam' in package 'BiocParallel' does not exist and 
>> so has been treated as a topic
>> The line in my code which generates this is:
>> 
>> #' @param BPPARAM A \code{\link[BiocParallel]{BiocParallelParam}} instance
>> 
>> The error can also be found here:
>> http://bioconductor.org/checkResults/devel/bioc-LATEST/OUTRIDER/tokay1-checksrc.html
>>  
>> 
>> 
>> For me it looks odd since it compiles without any error on Linux and MacOS 
>> but not on Windows. So I�m not sure if its a bug on Windows or the way I�m 
>> linking it in my Roxygen2 documentation.
>> 
>> Any help is appreciated.
>> 
>> Thanks,
>> 
>> Christian
>> 
>> 
>>[[alternative HTML version deleted]]
>> 
>> ___
>> Bioc-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>> 
>> 
>> This email message may contain legally privileged and/or confidential 
>> information.  If you are not the intended recipient(s), or the employee or 
>> agent responsible for the delivery of this message to the intended 
>> recipient(s), you are hereby notified that any disclosure, copying, 
>> distribution, or use of this email message is prohibited.  If you have 
>> received this message in error, please notify the sender immediately by 
>> e-mail and delete this email message from your computer. Thank you.
>>[[alternative HTML version deleted]]
>> 

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] how can I declare that a package doesn't/can't fully support Windows

2018-10-10 Thread Morgan, Martin
There is .BBSoptions, which can be placed in the root of your package, 
but this is insidious, as evidenced by your own use case -- gmapR 
doesn't support windows, so your package doesn't support windows, so any 
package that Depends: or Imports: your package doesn't support windows, 
so actually 1/2 of our users can't reliably use packages we provide.


I would argue for a much more carefully defined package with specific, 
cross-platform functionality. This will be easier to maintain AND more 
useful. Generally, I think we are really seeing an explosion of 
dependencies, and that this is very bad for long-term utility of 
contributed packages -- the maintainer will either spend all their time 
responding to changes in dozens of dependent packages rather than 
innovating in new areas, or will give up and leave the users with 
software that no longer works.


Martin

On 10/10/18 10:46 AM, Tim Triche, Jr. wrote:

it looks like gmapR does not support Windows, and as a result, my MTseeker
package cannot build on tokay1, so the Data package which requires it also
cannot build on tokay1.  Are there platform-specific dontrun capabilities?

http://bioconductor.org/spb_reports/MTseekerData_buildreport_20181010103212.html

Short of somehow forcing gmapR to build on Windows, which I believe is
beyond my control, is there a way to declare that parts of the MTseeker
package are unsupported/unsupportable on Windows?

I suppose I could cleave off the variant-recalling portions but that seems
a little ridiculous. The original goal was to take the non-NuMT reads from
a given alignment, realign (only) those to rCRS/RSRS, and call against
that, for better mitochondrial haplogroup inference. We're still working
towards the full version, but even just calling variants against rCRS with
indels is hugely useful, and the ability to screen out haplogroup-specific
variants while retaining indels, SNVs, etc. turns out to be VERY handy.
More generally, there isn't any equivalent (AFAIK) in BioC, at all.

--t

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Files in the 'vignettes' directory but no files in 'inst/doc'

2018-10-10 Thread Morgan, Martin
Just to emphasize that the 'right' solution from the Bioc perspective is 
to make sure that the vignette is evaluated


  https://stackoverflow.com/a/44094582/547331

rather than to add a pdf to inst/doc -- no sense in providing the user 
with a 'picture of code' when there are no guarantees that the picture 
actually works in the current release.


Martin

On 10/10/18 5:28 PM, Bohdan Khomtchouk wrote:

Hi --

I recently diagnosed a WARNING that kept popping up in my package's build
by following the advice of: https://stackoverflow.com/a/42673584/3878253

Since I wasn't the only one who benefited from this answer, I thought I'd
share with the broader Bioconductor community my experience with it (to
raise awareness of the issue).  Perhaps some changes are needed in the
build system to avoid this issue moving forward.

All the best,
Bohdan



___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Why bioconductor?

2018-10-10 Thread Morgan, Martin

I think pull requests on


https://github.com/Bioconductor/bioconductor.org/blob/master/content/developers/package-submission.md

would be welcome.

Martin

On 10/10/18 11:51 AM, Ludwig Geistlinger wrote:

While this might be obvious to most of us, it seems to be less clear to others.

In particular, those who worked out their first package and wonder what's the 
difference between having a package available on Github, CRAN, or Bioconductor.


I wonder whether it would be helpful for the Bioc webpage to pick up on the 
benefits of submitting to CRAN by Hadley


http://r-pkgs.had.co.nz/release.html


and several considerations with respect to Bioconductor


https://bioinformatics.stackexchange.com/questions/639/why-bioconductor


(Maybe FAQ?)


  Just a thought.


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Files in the 'vignettes' directory but no files in 'inst/doc'

2018-10-10 Thread Bohdan Khomtchouk
Hi --

I recently diagnosed a WARNING that kept popping up in my package's build
by following the advice of: https://stackoverflow.com/a/42673584/3878253

Since I wasn't the only one who benefited from this answer, I thought I'd
share with the broader Bioconductor community my experience with it (to
raise awareness of the issue).  Perhaps some changes are needed in the
build system to avoid this issue moving forward.

All the best,
Bohdan
-- 
Bohdan Khomtchouk, Ph.D.
AHA Postdoctoral Fellow, Gozani & Assimes Labs
Department of Biology & Department of Medicine
Division of Cardiovascular Medicine
Stanford University
Stanford, CA 94305
https://profiles.stanford.edu/bohdan-khomtchouk


CONFIDENTIALITY NOTICE: Information contained in this me...{{dropped:9}}

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Why bioconductor?

2018-10-10 Thread Levi Waldron
On Wed, Oct 10, 2018 at 3:25 PM Turaga, Nitesh <
nitesh.tur...@roswellpark.org> wrote:

> As far as Levi’s comment about PEP8. It’s possible to design something
> similar with Jim Hester’s “lintr” package, which purely defines a style
> guide for code.
>
> https://github.com/jimhester/lintr


As I understand lintr it allows you to specify and perform syntax checks,
but you still have to write the style guide (as opposed e.g. to Swagger UI
for defining APIs)? On this thread, a couple more examples of pieces of
acquired knowledge that are non-obvious to newcomers:

   - Key elements of the "Bioconductor family tree" of core classes
   including: Annotated -> Vector -> (IRanges, GRanges, SummarizedExperiment,
   RangedSummarizedExperiment)
   - conventions like: core Bioconductor classes have constructors of the
   same name as the class
   - constructors can be called with no arguments

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Invalid Parameter - /figure-html

2018-10-10 Thread Obenchain, Valerie
Hi,

It looks like vignette in TCGAWorkflow hasn't changed except for updating to 
use BiocManager. This often points to a breaking change in an upstream 
dependency (244 in your case) or it could be a problem on the builder.

The code chunk causing problems in devel is the call to ELMER::get.TFs().

TF <- get.TFs(data = mae,
  group.col = group.col,
  group1 = group1,
  group2 =  group2,
  mode = "supervised",
  enriched.motif = enriched.motif,
  dir.out = dir.out,
  cores = cores,
  diff.dir = direction,
  label = direction)

On Windows, this either hangs and crashes the R session or produces this error 
with what looks like a bad file name:

Quitting from lines 2387-2394 (TCGAWorkflow.Rmd)
Error: processing vignette 'TCGAWorkflow.Rmd' failed with diagnostics:
unable to open 
C:/Users/biocbuild/bbs-3.8-workflows/tmpdir/RtmpuGXyPJ/.heatmap_body_DNA 
methylation level_1_2348149424d.png

It looks like you were the last one to touch ELMER:

commit fbf589501eb035138d28d69640041547f54c38a4 (HEAD -> master, origin/master, 
origin/HEAD)
Author: tiagochst 
Date:   Thu Sep 20 15:39:46 2018 -0300

fix heatmap plot

R/GetNearbyGenes.R
R/Scatter.plot.R
R/TCGA_pipe.R
R/plots.R

commit 207f80398996bef2a593e67b9e7c12f3ae10a768
Merge: 17b72e7 b8721cb
Author: Tiago Chedraoui Silva 
Date:   Thu Sep 20 11:34:34 2018 -0700

Merge branch 'master' of https://github.com/tiagochst/ELMER

commit 17b72e79b42ad19ead302bbab17272575af352e2
Author: Tiago Chedraoui Silva 
Date:   Thu Sep 20 11:34:26 2018 -0700

Fixing the cluster within groups for heatmap

R/plots.R
man/heatmapPairs.Rd

Maybe the name of the file in the error message is familiar to you or you could 
revisit recent changes to ELMER that impacted get.TFs().

Along those lines, how about setting save=FALSE when calling get.TFs()? It 
takes a significant amount of time to write out all 20+ pdf files and AFAIK 
only the file with TF ranking is used in plotting. This ranking file could be 
saved in TCGAWorkflow/data and loaded for plotting. You can point out to the 
user that save=TRUE is an option they may want but for the purpose of the 
vignette it doesn't seem necessary.

Thanks.
Valerie


On 9/27/18 7:43 AM, Tiago Chedraoui Silva wrote:

Hello,

The workflow I'm maintaining is giving this message "Invalid Parameter -
/figure-html"  in the devel and release windows environment.

http://bioconductor.org/checkResults/devel/workflows-LATEST/TCGAWorkflow/tokay1-buildsrc.html

It seems other users had the same problem before:
https://stackoverflow.com/questions/48747959/biocstyle-vignettes-invalid-parameter-figure-html?rq=1

Please, someone knows how that could be fixed?

Best regards,
Tiago Chedraoui Silva

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel





This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Why bioconductor?

2018-10-10 Thread Turaga, Nitesh
As far as Levi’s comment about PEP8. It’s possible to design something similar 
with Jim Hester’s “lintr” package, which purely defines a style guide for code. 

https://github.com/jimhester/lintr

> On Oct 10, 2018, at 3:16 PM, Levi Waldron  wrote:
> 
> A related comment came up in a conversation I recently had with a potential
> Bioconductor developer I met recently, who commented that even as an
> experienced Python or CRAN developer, it is difficult to orient oneself to
> the Bioconductor "style" and infrastructure for developers. He gave the
> example of wishing there were something like
> https://www.python.org/dev/peps/pep-0008/ available. One specific that we
> discussed was how to orient oneself to the hierarchy of Bioconductor S4
> classes and how to choose classes to develop from, something that
> http://bioconductor.org/developers/how-to/commonMethodsAndClasses/ falls
> short on because it only gives the biological contexts of some important
> classes.
> 
> 
> On Wed, Oct 10, 2018 at 11:52 AM Ludwig Geistlinger <
> ludwig.geistlin...@sph.cuny.edu> wrote:
> 
>> While this might be obvious to most of us, it seems to be less clear to
>> others.
>> 
>> In particular, those who worked out their first package and wonder what's
>> the difference between having a package available on Github, CRAN, or
>> Bioconductor.
>> 
>> 
>> I wonder whether it would be helpful for the Bioc webpage to pick up on
>> the benefits of submitting to CRAN by Hadley
>> 
>> 
>> http://r-pkgs.had.co.nz/release.html
>> 
>> 
>> and several considerations with respect to Bioconductor
>> 
>> 
>> https://bioinformatics.stackexchange.com/questions/639/why-bioconductor
>> 
>> 
>> (Maybe FAQ?)
>> 
>> 
>> Just a thought.
>> 
>> 
>>[[alternative HTML version deleted]]
>> 
>> ___
>> Bioc-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>> 
> 
> 
> -- 
> Levi Waldron
> http://www.waldronlab.io
> Associate Professor of BiostatisticsCUNY School of Public Health
> US: +1 646-364-9616   Skype:
> levi.waldron
> 
>   [[alternative HTML version deleted]]
> 
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Why bioconductor?

2018-10-10 Thread Levi Waldron
A related comment came up in a conversation I recently had with a potential
Bioconductor developer I met recently, who commented that even as an
experienced Python or CRAN developer, it is difficult to orient oneself to
the Bioconductor "style" and infrastructure for developers. He gave the
example of wishing there were something like
https://www.python.org/dev/peps/pep-0008/ available. One specific that we
discussed was how to orient oneself to the hierarchy of Bioconductor S4
classes and how to choose classes to develop from, something that
http://bioconductor.org/developers/how-to/commonMethodsAndClasses/ falls
short on because it only gives the biological contexts of some important
classes.


On Wed, Oct 10, 2018 at 11:52 AM Ludwig Geistlinger <
ludwig.geistlin...@sph.cuny.edu> wrote:

> While this might be obvious to most of us, it seems to be less clear to
> others.
>
> In particular, those who worked out their first package and wonder what's
> the difference between having a package available on Github, CRAN, or
> Bioconductor.
>
>
> I wonder whether it would be helpful for the Bioc webpage to pick up on
> the benefits of submitting to CRAN by Hadley
>
>
> http://r-pkgs.had.co.nz/release.html
>
>
> and several considerations with respect to Bioconductor
>
>
> https://bioinformatics.stackexchange.com/questions/639/why-bioconductor
>
>
> (Maybe FAQ?)
>
>
>  Just a thought.
>
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>


-- 
Levi Waldron
http://www.waldronlab.io
Associate Professor of BiostatisticsCUNY School of Public Health
US: +1 646-364-9616   Skype:
levi.waldron

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Problem with setClassUnion and DelayedArray

2018-10-10 Thread Elizabeth Purdom
Hello,

I am using `setClassUnion` in my package `clusterExperiment` in the following 
code to allow for either matrix or DelayedArray:

setClassUnion("matrixOrHDF5",members=c("matrix", "DelayedArray"))

This causes the following warning in checking my package:

Warning: subclass "DelayedArray1" of class "DelayedArray" is not local and 
cannot be updated for new inheritance information; consider setClassUnion()

I’ve gotten this warning in other settings, and I believe it is due to the fact 
that setClassUnion works on the subclasses of the members, so if you give the 
argument `members=c(“X”,”Y”)` and you haven’t imported into your package all of 
the subclasses of “X” and “Y” it is warning you those non-imported classes 
haven’t been dealt with (though if so, I’d say the warning is awfully cryptic, 
especially since it says to use `setClassUnion` as a solution). In my other 
cases, I have just gone ahead and imported all of the subclasses from the 
package that defines the member classes and have gotten rid of the message (in 
the past it hasn’t been so many). But “DelayedArray1” is not an exported class 
of the DelayedArray package so that is not an option here. 

I have been just ignoring this warning, since I understand (I think) the 
warning, I can’t do anything about it, and am not concerned about it since this 
new class is only used internally by my function for the slot definition. And I 
don’t think the user sees this generally. But given that we’re coming up on a 
release I thought I would ask if there’s anything I can do to get rid of this 
warning! Or can I go with my first instinct and safely ignore it?

Thanks,
Elizabeth Purdom

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Rd] unlockEnvironment()?

2018-10-10 Thread Tierney, Luke
On Wed, 10 Oct 2018, William Dunlap via R-devel wrote:

> R lets one lock an environment with both an R function,
> base::lockEnvironment, and a C function, R_LockEnvironment, but, as far as
> I can tell, no corresponding function to unlock an environment.  Is this
> omission on principle or just something that has not been done yet?

Absolutely on principle!

Best,

luke

>
> I ask because several packages, including the well-used R6 and rlang
> packages, fiddle with some bits in with SET_ENVFLAGS and ENVFLAGS to unlock
> an environment.  (See grep output below.)
>
> About 5000 (1/3 of CRAN) packages depend on R6 or rlang.  Should R supply a
> more disciplined way of unlocking an environment?
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> $ { find . -type f -print0 | xargs -0 grep -n -C 2 ENVFLAGS ; } 2>/dev/null
> ./R6/tests/manual/encapsulation.R-5-unlockEnvironment <-
> cfunction(signature(env = "environment"), body = '
> ./R6/tests/manual/encapsulation.R-6-  #define FRAME_LOCK_MASK (1<<14)
> ./R6/tests/manual/encapsulation.R:7:  #define FRAME_IS_LOCKED(e)
> (ENVFLAGS(e) & FRAME_LOCK_MASK)
> ./R6/tests/manual/encapsulation.R:8:  #define UNLOCK_FRAME(e)
> SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK))
> ./R6/tests/manual/encapsulation.R-9-
> ./R6/tests/manual/encapsulation.R-10-  if (TYPEOF(env) == NILSXP)
> ./BMA/R/iBMA.glm.R-21-*/
> ./BMA/R/iBMA.glm.R-22-#define FRAME_LOCK_MASK (1<<14)
> ./BMA/R/iBMA.glm.R:23:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) &
> FRAME_LOCK_MASK)
> ./BMA/R/iBMA.glm.R:24:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) &
> (~ FRAME_LOCK_MASK))
> ./BMA/R/iBMA.glm.R-25-'
> ./BMA/R/iBMA.glm.R-26-
> --
> ./BMA/R/iBMA.surv.R-22-*/
> ./BMA/R/iBMA.surv.R-23-#define FRAME_LOCK_MASK (1<<14)
> ./BMA/R/iBMA.surv.R:24:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) &
> FRAME_LOCK_MASK)
> ./BMA/R/iBMA.surv.R:25:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e)
> & (~ FRAME_LOCK_MASK))
> ./BMA/R/iBMA.surv.R-26-'
> ./BMA/R/iBMA.surv.R-27-
> ./pkgload/src/unlock.c-20-*/
> ./pkgload/src/unlock.c-21-#define FRAME_LOCK_MASK (1 << 14)
> ./pkgload/src/unlock.c:22:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) &
> FRAME_LOCK_MASK)
> ./pkgload/src/unlock.c:23:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e,
> ENVFLAGS(e) & (~FRAME_LOCK_MASK))
> ./pkgload/src/unlock.c-24-
> ./pkgload/src/unlock.c-25-extern SEXP R_TrueValue;
> ./SOD/src/tmp.cpp-11394-SEXP (ENCLOS)(SEXP x);
> ./SOD/src/tmp.cpp-11395-SEXP (HASHTAB)(SEXP x);
> ./SOD/src/tmp.cpp:11396:int (ENVFLAGS)(SEXP x);
> ./SOD/src/tmp.cpp:11397:void (SET_ENVFLAGS)(SEXP x, int v);
> ./SOD/src/tmp.cpp-11398-void SET_FRAME(SEXP x, SEXP v);
> ./SOD/src/tmp.cpp-11399-void SET_ENCLOS(SEXP x, SEXP v);
> --
> ./SOD/src/tmp.h-11393-SEXP (ENCLOS)(SEXP x);
> ./SOD/src/tmp.h-11394-SEXP (HASHTAB)(SEXP x);
> ./SOD/src/tmp.h:11395:int (ENVFLAGS)(SEXP x);
> ./SOD/src/tmp.h:11396:void (SET_ENVFLAGS)(SEXP x, int v);
> ./SOD/src/tmp.h-11397-void SET_FRAME(SEXP x, SEXP v);
> ./SOD/src/tmp.h-11398-void SET_ENCLOS(SEXP x, SEXP v);
>
>   [[alternative HTML version deleted]]
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa  Phone: 319-335-3386
Department of Statistics andFax:   319-335-3017
Actuarial Science
241 Schaeffer Hall  email:   luke-tier...@uiowa.edu
Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] unlockEnvironment()?

2018-10-10 Thread William Dunlap via R-devel
R lets one lock an environment with both an R function,
base::lockEnvironment, and a C function, R_LockEnvironment, but, as far as
I can tell, no corresponding function to unlock an environment.  Is this
omission on principle or just something that has not been done yet?

I ask because several packages, including the well-used R6 and rlang
packages, fiddle with some bits in with SET_ENVFLAGS and ENVFLAGS to unlock
an environment.  (See grep output below.)

About 5000 (1/3 of CRAN) packages depend on R6 or rlang.  Should R supply a
more disciplined way of unlocking an environment?

Bill Dunlap
TIBCO Software
wdunlap tibco.com

$ { find . -type f -print0 | xargs -0 grep -n -C 2 ENVFLAGS ; } 2>/dev/null
./R6/tests/manual/encapsulation.R-5-unlockEnvironment <-
cfunction(signature(env = "environment"), body = '
./R6/tests/manual/encapsulation.R-6-  #define FRAME_LOCK_MASK (1<<14)
./R6/tests/manual/encapsulation.R:7:  #define FRAME_IS_LOCKED(e)
(ENVFLAGS(e) & FRAME_LOCK_MASK)
./R6/tests/manual/encapsulation.R:8:  #define UNLOCK_FRAME(e)
SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK))
./R6/tests/manual/encapsulation.R-9-
./R6/tests/manual/encapsulation.R-10-  if (TYPEOF(env) == NILSXP)
./BMA/R/iBMA.glm.R-21-*/
./BMA/R/iBMA.glm.R-22-#define FRAME_LOCK_MASK (1<<14)
./BMA/R/iBMA.glm.R:23:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) &
FRAME_LOCK_MASK)
./BMA/R/iBMA.glm.R:24:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) &
(~ FRAME_LOCK_MASK))
./BMA/R/iBMA.glm.R-25-'
./BMA/R/iBMA.glm.R-26-
--
./BMA/R/iBMA.surv.R-22-*/
./BMA/R/iBMA.surv.R-23-#define FRAME_LOCK_MASK (1<<14)
./BMA/R/iBMA.surv.R:24:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) &
FRAME_LOCK_MASK)
./BMA/R/iBMA.surv.R:25:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e)
& (~ FRAME_LOCK_MASK))
./BMA/R/iBMA.surv.R-26-'
./BMA/R/iBMA.surv.R-27-
./pkgload/src/unlock.c-20-*/
./pkgload/src/unlock.c-21-#define FRAME_LOCK_MASK (1 << 14)
./pkgload/src/unlock.c:22:#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) &
FRAME_LOCK_MASK)
./pkgload/src/unlock.c:23:#define UNLOCK_FRAME(e) SET_ENVFLAGS(e,
ENVFLAGS(e) & (~FRAME_LOCK_MASK))
./pkgload/src/unlock.c-24-
./pkgload/src/unlock.c-25-extern SEXP R_TrueValue;
./SOD/src/tmp.cpp-11394-SEXP (ENCLOS)(SEXP x);
./SOD/src/tmp.cpp-11395-SEXP (HASHTAB)(SEXP x);
./SOD/src/tmp.cpp:11396:int (ENVFLAGS)(SEXP x);
./SOD/src/tmp.cpp:11397:void (SET_ENVFLAGS)(SEXP x, int v);
./SOD/src/tmp.cpp-11398-void SET_FRAME(SEXP x, SEXP v);
./SOD/src/tmp.cpp-11399-void SET_ENCLOS(SEXP x, SEXP v);
--
./SOD/src/tmp.h-11393-SEXP (ENCLOS)(SEXP x);
./SOD/src/tmp.h-11394-SEXP (HASHTAB)(SEXP x);
./SOD/src/tmp.h:11395:int (ENVFLAGS)(SEXP x);
./SOD/src/tmp.h:11396:void (SET_ENVFLAGS)(SEXP x, int v);
./SOD/src/tmp.h-11397-void SET_FRAME(SEXP x, SEXP v);
./SOD/src/tmp.h-11398-void SET_ENCLOS(SEXP x, SEXP v);

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Bioc-devel] Why bioconductor?

2018-10-10 Thread Ludwig Geistlinger
While this might be obvious to most of us, it seems to be less clear to others.

In particular, those who worked out their first package and wonder what's the 
difference between having a package available on Github, CRAN, or Bioconductor.


I wonder whether it would be helpful for the Bioc webpage to pick up on the 
benefits of submitting to CRAN by Hadley


http://r-pkgs.had.co.nz/release.html


and several considerations with respect to Bioconductor


https://bioinformatics.stackexchange.com/questions/639/why-bioconductor


(Maybe FAQ?)


 Just a thought.


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] how can I declare that a package doesn't/can't fully support Windows

2018-10-10 Thread Tim Triche, Jr.
it looks like gmapR does not support Windows, and as a result, my MTseeker
package cannot build on tokay1, so the Data package which requires it also
cannot build on tokay1.  Are there platform-specific dontrun capabilities?

http://bioconductor.org/spb_reports/MTseekerData_buildreport_20181010103212.html

Short of somehow forcing gmapR to build on Windows, which I believe is
beyond my control, is there a way to declare that parts of the MTseeker
package are unsupported/unsupportable on Windows?

I suppose I could cleave off the variant-recalling portions but that seems
a little ridiculous. The original goal was to take the non-NuMT reads from
a given alignment, realign (only) those to rCRS/RSRS, and call against
that, for better mitochondrial haplogroup inference. We're still working
towards the full version, but even just calling variants against rCRS with
indels is hugely useful, and the ability to screen out haplogroup-specific
variants while retaining indels, SNVs, etc. turns out to be VERY handy.
More generally, there isn't any equivalent (AFAIK) in BioC, at all.

--t

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-10 Thread Romain Francois
Thank you, 

I updated my example package so that it works with both. 
https://github.com/romainfrancois/altrepisode/blob/96af0548a9ecc08701d119ea427e16940a82882b/src/altrepisode.h
 


We have to do something like this unless we depend on R 3.6.0: 

#if R_VERSION < R_Version(3, 6, 0)
  #define class klass
  extern "C" {
#include 
  }
  #undef class
#else
  #include 
#endif

Romain

> Le 9 oct. 2018 à 05:09, Tierney, Luke  a écrit :
> 
> Thanks for the suggestion. Committed in R_devel.
> 
> Best,
> 
> luke
> 
> On Mon, 8 Oct 2018, Michael Sannella wrote:
> 
>> I am not able to #include "R_ext/Altrep.h" from a C++ file.  I think
>> it needs two changes:
>> 
>> 1. add the same __cplusplus check as most of the other header files:
>> #ifdef  __cplusplus
>> extern "C" {
>> #endif
>> ...
>> #ifdef  __cplusplus
>> }
>> #endif
>> 
>> 2. change the line
>> R_new_altrep(R_altrep_class_t class, SEXP data1, SEXP data2);
>>  to
>> R_new_altrep(R_altrep_class_t cls, SEXP data1, SEXP data2);
>>  since C++ doesn't like an argument named 'class'
>> 
>>   ~~ Michael Sannella
>> 
>> 
>> 
> 
> -- 
> Luke Tierney
> Ralph E. Wareham Professor of Mathematical Sciences
> University of Iowa  Phone: 319-335-3386
> Department of Statistics andFax:   319-335-3017
>Actuarial Science
> 241 Schaeffer Hall  email:   luke-tier...@uiowa.edu
> Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-10 Thread Tierney, Luke
Thanks for the suggestion. Committed in R_devel.

Best,

luke

On Mon, 8 Oct 2018, Michael Sannella wrote:

> I am not able to #include "R_ext/Altrep.h" from a C++ file.  I think
> it needs two changes:
> 
> 1. add the same __cplusplus check as most of the other header files:
>     #ifdef  __cplusplus
>     extern "C" {
>     #endif
>         ...
>     #ifdef  __cplusplus
>     }
>     #endif
> 
> 2. change the line
>     R_new_altrep(R_altrep_class_t class, SEXP data1, SEXP data2);
>  to
>     R_new_altrep(R_altrep_class_t cls, SEXP data1, SEXP data2);
>  since C++ doesn't like an argument named 'class'
> 
>   ~~ Michael Sannella
> 
> 
>

-- 
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa  Phone: 319-335-3386
Department of Statistics andFax:   319-335-3017
Actuarial Science
241 Schaeffer Hall  email:   luke-tier...@uiowa.edu
Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel