Re: [Rd] Confusing inheritance problem

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Sat, 16 Jul 2011 19:27:38 +0200

On 15.07.2011 23:23, Terry Therneau wrote:
> I have library in development with a function that works when called
> from the top level, but fails under R CMD check. The paricular line of
> failure is
> rsum<- rowSums(kmat>0)
> where kmat is a dsCMatrix object.
>
> I'm currently stumped and looking for some ideas.
>
> I've created a stripped down library "ktest" that has only 3
> functions: pedigree.R to create a pedigree or pedigreeList object,
> kinship.R with "kinship" methods for the two objects
> one small compute function called by the others
> along with the minimal amount of other information such that a call to
> R --vanilla CMD check ktest
> gives no errors until the fatal one.
>
> There are two test cases. A 3 line one that creates a dsCMatrix and
> call rowSums at the top level works fine, but the same call inside the
> kmat.pedigreeList function gives an error
> 'x' must be an array of at least two dimensions
> Adding a print statement above the rowSums call shows that the argument
> is a 14 by 14 dsCMatrix.
>
> I'm happy to send the library to anyone else to try and duplicate.
> Terry Therneau
>
> tmt% R --vanilla
>
>> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
> [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods
> base

Terry,

  1. Your R is not recent.
  2. You do this without having Matrix loaded (according to sessionInfo())? This may already be the cause of your problems.
  3. You may want to make your package available on some website. I am sure there are people who will take a look (including me, but not today).

Best wishes,
Uwe

> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 16 Jul 2011 - 17:32:36 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Jul 2011 - 16:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive