Re: [R-pkg-devel] some notes

2018-04-24 Thread Spencer Graves


On 2018-04-24 12:23, Uwe Ligges wrote:
>
>
> On 24.04.2018 19:15, Spencer Graves wrote:
>>
>>
>> On 2018-04-24 12:01, Duncan Murdoch wrote:
>>> On 24/04/2018 12:48 PM, Uwe Ligges wrote:


 On 24.04.2018 18:45, Spencer Graves wrote:
>>> [... deleting irrelevant stuff...]
>
>
>     If it becomes infeasible to find smaller datasets, etc., 
> you can
> cut out certain tests with a construct like the following:
>
>
> if(!fda::CRAN()){
> # ... tests to run on other computers but to skip on CRAN. ...
> }

 Ummm, how should fda::CRAN() now that it runs on CRAN?

 CRAN prefers to ship a set of examples/tests etc. that meet our
 requirements. If you want to ru addtional tests and/or examples, then
 run them conditionally on something that is true for your local 
 machine,
 e.g. some defined environment variable.
>>
>>
>>    The fda::CRAN() function tests a "defined environmental 
>> variable", as you suggest:  It is TRUE with "R CMD check –as-cran" 
>> and FALSE if "-as-cran" (or something like that)
>
>
> The something like that is rather relevant. For example, I never use 
> --as-cran on my machine, and most CRAN machines do only on incoming 
> check but not the regular daily checks ...


   I very much appreciate your time and effort in maintaining CRAN.  
The precise code used is as follows:


CRAN <- function (CRAN_pattern, n_R_CHECK4CRAN){
     gete <- Sys.getenv()
     ngete <- names(gete)
     i <- seq(along = gete)
     if (missing(CRAN_pattern)) {
     if ("_CRAN_pattern_" %in% ngete) {
     CRAN_pattern <- gete["_CRAN_pattern_"]
     }
     else CRAN_pattern <- "^_R_"
     }
     if (missing(n_R_CHECK4CRAN)) {
     if ("_n_R_CHECK4CRAN_" %in% ngete) {
     n_R_CHECK4CRAN <- as.numeric(gete["_n_R_CHECK4CRAN_"])
     }
     else n_R_CHECK4CRAN <- 5
     }
     for (pati in CRAN_pattern) i <- i[grep(pati, ngete[i])]
     cran. <- (length(i) >= n_R_CHECK4CRAN)
     attr(cran., "Sys.getenv") <- gete
     attr(cran., "matches") <- i
     cran.
}


   This seems to do what I think we both wanted:  not run the longer 
examples on CRAN but still allow them to be run elsewhere. If you want 
something different here, Uwe, please tell me what you want.  If it's 
reasonably easy to implement, I will.


   FYI, I just checked the "CRAN Package Check Results for Package 
fda":  It returned "OK" on 8 of the 12 "flavors", but returned "ERROR" 
on the other four.  NONE of those errors were for excess time.  Instead, 
they were for <>.   The NAMESPACE file for "fda" includes both 
"export(knots.fd)" and "S3method(knots, fd)".


   What should I do about this intermittent error?


   Thanks,
   Spencer

>
> Best,
> Uwe
>  is not set.  It has been
>> several years since I wrote that code, and I'm not prepared at the 
>> moment to defend exactly how it works. It was how I resolved a 
>> conflict between Jim Ramsay, the maintainer and lead author of "fda", 
>> CRAN maintainers like Uwe, and other contributors to "fda", 
>> especially Giles Hooker and me:  It allowed us to keep examples in 
>> "fda" help files without excessive work trying to find examples that 
>> would illustrate the same points with less compute time.
>>
>>>
>>> For Xubo Yue, who may not be aware of all of the players:
>>>
>>> Uwe Ligges is one of the individuals who runs CRAN.  When you submit 
>>> a package to CRAN, you are asking Uwe and others to distribute your 
>>> work. You should listen to what he says.
>>>
>>> Spencer Graves and I are not involved in running CRAN.  We will give 
>>> you advice that we think is good advice, but if it conflicts with 
>>> Uwe's, follow his.
>>>
>>> Duncan Murdoch
>>
>>
>>    Moreover, Duncan's contributions to the R Project vastly 
>> exceed mine.  If any of my suggestions seem to conflict with Duncan's 
>> comments, follow his (unless they conflict with someone like Uwe, as 
>> Duncan noted).
>>
>>
>>    Spencer Graves
>>
>>


[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Xubo Yue
Oh thanks for clarification. You are so nice!

On Tue, Apr 24, 2018 at 1:53 PM, Uwe Ligges  wrote:

>
>
> On 24.04.2018 19:50, Xubo Yue wrote:
>
>> Hey
>>
>> I am a little bit confused. Must I use vignette to show example of plot?
>> Or I can simple ignore vignette?
>>
>
> You can ignore the vignette suggestion, it was just a proposal to present
> longer runing stuff more elaborated as in your examples.
>
> Best,
> Uwe Ligges
>
>
>
> Thank you!
>>
>>
>> On Tue, Apr 24, 2018 at 1:44 PM, Uwe Ligges <
>> lig...@statistik.tu-dortmund.de >
>> wrote:
>>
>>
>>
>> On 24.04.2018 19:40, Duncan Murdoch wrote:
>>
>> On 24/04/2018 1:07 PM, Xubo Yue wrote:
>>
>> Everyone, I appreciate for your help!
>>
>> Hey Uwe Ligges:
>>
>> There are four examples in my package: read data, calculate
>> correlation, plot, and summarize connection network. The
>> plot is the slowest one and I have to use donttest{} to
>> avoid testing it on CRAN. All other examples are fast and
>> take less than 10s, so I can let CRAN test it.
>>
>> Also Swetlana suggest me to write a vignette to demonstrate
>> plot. However, my plot is in rgl device (an rgl window
>> separated from default R plot window) and cannot be
>> integrated into rmarkdown.
>>
>>
>> That's not true -- see the rgl vignettes, and the rglwidget()
>> function. The main limitation is that the output needs to be
>> HTML rather than LaTeX/PDF.  (There are ways to incorporate
>> interactive rgl graphics into PDF documents, but they are
>> limited and fragile, so I don't recommend them.)
>>
>>
>> Same from here, note that Swetlana generally suggested to move
>> things that are slightly longer than the 5sec threshhold for
>> examples to tests *or* perhaps in vignettes, this was not intended
>> as a specific advice for this particular example.
>>
>> Best,
>> Uwe
>>
>>
>> Duncan Murdoch
>>
>>
>> So in a nutshell: can I just use donttest{} to my plot
>> example and comment that it takes a long time to run?
>>
>> It is my first time to submit r package, sorry for any
>> inconvenience!
>>
>> Thank you very much for your help!
>>
>> On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch
>> mailto:murdoch.dun...@gmail.com>
>> >
>> >> wrote:
>>
>>  On 24/04/2018 12:48 PM, Uwe Ligges wrote:
>>
>>
>>
>>  On 24.04.2018 18:45, Spencer Graves wrote:
>>
>>  [... deleting irrelevant stuff...]
>>
>>
>>
>>   If it becomes infeasible to find
>> smaller datasets,
>>  etc., you can
>>  cut out certain tests with a construct like the
>> following:
>>
>>
>>  if(!fda::CRAN()){
>>  # ... tests to run on other computers but to
>> skip on CRAN.  ...
>>  }
>>
>>
>>  Ummm, how should fda::CRAN() now that it runs on
>> CRAN?
>>
>>  CRAN prefers to ship a set of examples/tests etc.
>> that meet our
>>  requirements. If you want to ru addtional tests
>> and/or examples,
>>  then
>>  run them conditionally on something that is true
>> for your local
>>  machine,
>>  e.g. some defined environment variable.
>>
>>
>>  For Xubo Yue, who may not be aware of all of the players:
>>
>>  Uwe Ligges is one of the individuals who runs CRAN.
>>When you submit
>>  a package to CRAN, you are asking Uwe and others to
>> distribute your
>>  work. You should listen to what he says.
>>
>>  Spencer Graves and I are not involved in running CRAN.
>>We will give
>>  you advice that we think is good advice, but if it
>> conflicts with
>>  Uwe's, follow his.
>>
>>  Duncan Murdoch
>>
>>
>>
>>
>> -- *Xubo (Max) YUE, *PhD Student,
>> /The Industrial and Operation Engineering Department,/
>> /College of Engineering,/
>> /The University of Michigan, Ann Arbor, MI, USA/
>>
>>
>>
>>
>>
>>
>> --
>> *Xubo (Max) YUE, *PhD Student,
>> /The Industrial and Operation Engineering Department,/
>> /College of Engineering,/
>> /The University of Michigan, Ann Arbor, MI, USA/
>>
>>
>>


-- 
*Xubo (Max) YUE, *PhD Student,
*The Industrial and Operation Engineering Department,*
*College of Engineering,*
*The Univ

Re: [R-pkg-devel] some notes

2018-04-24 Thread Uwe Ligges



On 24.04.2018 19:50, Xubo Yue wrote:

Hey

I am a little bit confused. Must I use vignette to show example of plot? 
Or I can simple ignore vignette?


You can ignore the vignette suggestion, it was just a proposal to 
present longer runing stuff more elaborated as in your examples.


Best,
Uwe Ligges




Thank you!

On Tue, Apr 24, 2018 at 1:44 PM, Uwe Ligges 
> wrote:




On 24.04.2018 19:40, Duncan Murdoch wrote:

On 24/04/2018 1:07 PM, Xubo Yue wrote:

Everyone, I appreciate for your help!

Hey Uwe Ligges:

There are four examples in my package: read data, calculate
correlation, plot, and summarize connection network. The
plot is the slowest one and I have to use donttest{} to
avoid testing it on CRAN. All other examples are fast and
take less than 10s, so I can let CRAN test it.

Also Swetlana suggest me to write a vignette to demonstrate
plot. However, my plot is in rgl device (an rgl window
separated from default R plot window) and cannot be
integrated into rmarkdown.


That's not true -- see the rgl vignettes, and the rglwidget()
function. The main limitation is that the output needs to be
HTML rather than LaTeX/PDF.  (There are ways to incorporate
interactive rgl graphics into PDF documents, but they are
limited and fragile, so I don't recommend them.)


Same from here, note that Swetlana generally suggested to move
things that are slightly longer than the 5sec threshhold for
examples to tests *or* perhaps in vignettes, this was not intended
as a specific advice for this particular example.

Best,
Uwe


Duncan Murdoch


So in a nutshell: can I just use donttest{} to my plot
example and comment that it takes a long time to run?

It is my first time to submit r package, sorry for any
inconvenience!

Thank you very much for your help!

On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch
mailto:murdoch.dun...@gmail.com>
>> wrote:

     On 24/04/2018 12:48 PM, Uwe Ligges wrote:



     On 24.04.2018 18:45, Spencer Graves wrote:

     [... deleting irrelevant stuff...]



      If it becomes infeasible to find
smaller datasets,
     etc., you can
     cut out certain tests with a construct like the
following:


     if(!fda::CRAN()){
     # ... tests to run on other computers but to
skip on CRAN.  ...
     }


     Ummm, how should fda::CRAN() now that it runs on CRAN?

     CRAN prefers to ship a set of examples/tests etc.
that meet our
     requirements. If you want to ru addtional tests
and/or examples,
     then
     run them conditionally on something that is true
for your local
     machine,
     e.g. some defined environment variable.


     For Xubo Yue, who may not be aware of all of the players:

     Uwe Ligges is one of the individuals who runs CRAN. 
When you submit

     a package to CRAN, you are asking Uwe and others to
distribute your
     work. You should listen to what he says.

     Spencer Graves and I are not involved in running CRAN. 
We will give

     you advice that we think is good advice, but if it
conflicts with
     Uwe's, follow his.

     Duncan Murdoch




-- 
*Xubo (Max) YUE, *PhD Student,

/The Industrial and Operation Engineering Department,/
/College of Engineering,/
/The University of Michigan, Ann Arbor, MI, USA/






--
*Xubo (Max) YUE, *PhD Student,
/The Industrial and Operation Engineering Department,/
/College of Engineering,/
/The University of Michigan, Ann Arbor, MI, USA/




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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Xubo Yue
Hey

I am a little bit confused. Must I use vignette to show example of plot? Or
I can simple ignore vignette?

Thank you!

On Tue, Apr 24, 2018 at 1:44 PM, Uwe Ligges  wrote:

>
>
> On 24.04.2018 19:40, Duncan Murdoch wrote:
>
>> On 24/04/2018 1:07 PM, Xubo Yue wrote:
>>
>>> Everyone, I appreciate for your help!
>>>
>>> Hey Uwe Ligges:
>>>
>>> There are four examples in my package: read data, calculate correlation,
>>> plot, and summarize connection network. The plot is the slowest one and I
>>> have to use donttest{} to avoid testing it on CRAN. All other examples are
>>> fast and take less than 10s, so I can let CRAN test it.
>>>
>>> Also Swetlana suggest me to write a vignette to demonstrate plot.
>>> However, my plot is in rgl device (an rgl window separated from default R
>>> plot window) and cannot be integrated into rmarkdown.
>>>
>>
>> That's not true -- see the rgl vignettes, and the rglwidget() function.
>> The main limitation is that the output needs to be HTML rather than
>> LaTeX/PDF.  (There are ways to incorporate interactive rgl graphics into
>> PDF documents, but they are limited and fragile, so I don't recommend them.)
>>
>
> Same from here, note that Swetlana generally suggested to move things that
> are slightly longer than the 5sec threshhold for examples to tests *or*
> perhaps in vignettes, this was not intended as a specific advice for this
> particular example.
>
> Best,
> Uwe
>
>
> Duncan Murdoch
>>
>>
>>> So in a nutshell: can I just use donttest{} to my plot example and
>>> comment that it takes a long time to run?
>>>
>>> It is my first time to submit r package, sorry for any inconvenience!
>>>
>>> Thank you very much for your help!
>>>
>>> On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch <
>>> murdoch.dun...@gmail.com > wrote:
>>>
>>> On 24/04/2018 12:48 PM, Uwe Ligges wrote:
>>>
>>>
>>>
>>> On 24.04.2018 18:45, Spencer Graves wrote:
>>>
>>> [... deleting irrelevant stuff...]
>>>
>>>
>>>
>>>  If it becomes infeasible to find smaller datasets,
>>> etc., you can
>>> cut out certain tests with a construct like the following:
>>>
>>>
>>> if(!fda::CRAN()){
>>> # ... tests to run on other computers but to skip on CRAN.
>>> ...
>>> }
>>>
>>>
>>> Ummm, how should fda::CRAN() now that it runs on CRAN?
>>>
>>> CRAN prefers to ship a set of examples/tests etc. that meet our
>>> requirements. If you want to ru addtional tests and/or examples,
>>> then
>>> run them conditionally on something that is true for your local
>>> machine,
>>> e.g. some defined environment variable.
>>>
>>>
>>> For Xubo Yue, who may not be aware of all of the players:
>>>
>>> Uwe Ligges is one of the individuals who runs CRAN.  When you submit
>>> a package to CRAN, you are asking Uwe and others to distribute your
>>> work. You should listen to what he says.
>>>
>>> Spencer Graves and I are not involved in running CRAN.  We will give
>>> you advice that we think is good advice, but if it conflicts with
>>> Uwe's, follow his.
>>>
>>> Duncan Murdoch
>>>
>>>
>>>
>>>
>>> --
>>> *Xubo (Max) YUE, *PhD Student,
>>> /The Industrial and Operation Engineering Department,/
>>> /College of Engineering,/
>>> /The University of Michigan, Ann Arbor, MI, USA/
>>>
>>>
>>>
>>


-- 
*Xubo (Max) YUE, *PhD Student,
*The Industrial and Operation Engineering Department,*
*College of Engineering,*
*The University of Michigan, Ann Arbor, MI, USA*

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Uwe Ligges



On 24.04.2018 19:40, Duncan Murdoch wrote:

On 24/04/2018 1:07 PM, Xubo Yue wrote:

Everyone, I appreciate for your help!

Hey Uwe Ligges:

There are four examples in my package: read data, calculate 
correlation, plot, and summarize connection network. The plot is the 
slowest one and I have to use donttest{} to avoid testing it on CRAN. 
All other examples are fast and take less than 10s, so I can let CRAN 
test it.


Also Swetlana suggest me to write a vignette to demonstrate plot. 
However, my plot is in rgl device (an rgl window separated from 
default R plot window) and cannot be integrated into rmarkdown.


That's not true -- see the rgl vignettes, and the rglwidget() function. 
The main limitation is that the output needs to be HTML rather than 
LaTeX/PDF.  (There are ways to incorporate interactive rgl graphics into 
PDF documents, but they are limited and fragile, so I don't recommend 
them.)


Same from here, note that Swetlana generally suggested to move things 
that are slightly longer than the 5sec threshhold for examples to tests 
*or* perhaps in vignettes, this was not intended as a specific advice 
for this particular example.


Best,
Uwe


Duncan Murdoch



So in a nutshell: can I just use donttest{} to my plot example and 
comment that it takes a long time to run?


It is my first time to submit r package, sorry for any inconvenience!

Thank you very much for your help!

On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch 
mailto:murdoch.dun...@gmail.com>> wrote:


    On 24/04/2018 12:48 PM, Uwe Ligges wrote:



    On 24.04.2018 18:45, Spencer Graves wrote:

    [... deleting irrelevant stuff...]



     If it becomes infeasible to find smaller datasets,
    etc., you can
    cut out certain tests with a construct like the following:


    if(!fda::CRAN()){
    # ... tests to run on other computers but to skip on 
CRAN.  ...

    }


    Ummm, how should fda::CRAN() now that it runs on CRAN?

    CRAN prefers to ship a set of examples/tests etc. that meet our
    requirements. If you want to ru addtional tests and/or examples,
    then
    run them conditionally on something that is true for your local
    machine,
    e.g. some defined environment variable.


    For Xubo Yue, who may not be aware of all of the players:

    Uwe Ligges is one of the individuals who runs CRAN.  When you submit
    a package to CRAN, you are asking Uwe and others to distribute your
    work. You should listen to what he says.

    Spencer Graves and I are not involved in running CRAN.  We will give
    you advice that we think is good advice, but if it conflicts with
    Uwe's, follow his.

    Duncan Murdoch




--
*Xubo (Max) YUE, *PhD Student,
/The Industrial and Operation Engineering Department,/
/College of Engineering,/
/The University of Michigan, Ann Arbor, MI, USA/






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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Duncan Murdoch

On 24/04/2018 1:07 PM, Xubo Yue wrote:

Everyone, I appreciate for your help!

Hey Uwe Ligges:

There are four examples in my package: read data, calculate correlation, 
plot, and summarize connection network. The plot is the slowest one and 
I have to use donttest{} to avoid testing it on CRAN. All other examples 
are fast and take less than 10s, so I can let CRAN test it.


Also Swetlana suggest me to write a vignette to demonstrate plot. 
However, my plot is in rgl device (an rgl window separated from default 
R plot window) and cannot be integrated into rmarkdown.


That's not true -- see the rgl vignettes, and the rglwidget() function. 
The main limitation is that the output needs to be HTML rather than 
LaTeX/PDF.  (There are ways to incorporate interactive rgl graphics into 
PDF documents, but they are limited and fragile, so I don't recommend them.)


Duncan Murdoch



So in a nutshell: can I just use donttest{} to my plot example and 
comment that it takes a long time to run?


It is my first time to submit r package, sorry for any inconvenience!

Thank you very much for your help!

On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch 
mailto:murdoch.dun...@gmail.com>> wrote:


On 24/04/2018 12:48 PM, Uwe Ligges wrote:



On 24.04.2018 18:45, Spencer Graves wrote:

[... deleting irrelevant stuff...]



     If it becomes infeasible to find smaller datasets,
etc., you can
cut out certain tests with a construct like the following:


if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN.  ...
}


Ummm, how should fda::CRAN() now that it runs on CRAN?

CRAN prefers to ship a set of examples/tests etc. that meet our
requirements. If you want to ru addtional tests and/or examples,
then
run them conditionally on something that is true for your local
machine,
e.g. some defined environment variable.


For Xubo Yue, who may not be aware of all of the players:

Uwe Ligges is one of the individuals who runs CRAN.  When you submit
a package to CRAN, you are asking Uwe and others to distribute your
work. You should listen to what he says.

Spencer Graves and I are not involved in running CRAN.  We will give
you advice that we think is good advice, but if it conflicts with
Uwe's, follow his.

Duncan Murdoch




--
*Xubo (Max) YUE, *PhD Student,
/The Industrial and Operation Engineering Department,/
/College of Engineering,/
/The University of Michigan, Ann Arbor, MI, USA/




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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Xubo Yue
Yes! Thank you very much!

On Tue, Apr 24, 2018 at 1:24 PM, Uwe Ligges  wrote:

>
>
> On 24.04.2018 19:07, Xubo Yue wrote:
>
>> Everyone, I appreciate for your help!
>>
>> Hey Uwe Ligges:
>>
>> There are four examples in my package: read data, calculate correlation,
>> plot, and summarize connection network. The plot is the slowest one and I
>> have to use donttest{} to avoid testing it on CRAN. All other examples are
>> fast and take less than 10s, so I can let CRAN test it.
>>
>> Also Swetlana suggest me to write a vignette to demonstrate plot.
>> However, my plot is in rgl device (an rgl window separated from default R
>> plot window) and cannot be integrated into rmarkdown.
>>
>> So in a nutshell: can I just use donttest{} to my plot example and
>> comment that it takes a long time to run?
>>
>
> Yes, perfect.
>
> Best,
> Uwe Ligges
>
>
>> It is my first time to submit r package, sorry for any inconvenience!
>>
>> Thank you very much for your help!
>>
>> On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch > > wrote:
>>
>> On 24/04/2018 12:48 PM, Uwe Ligges wrote:
>>
>>
>>
>> On 24.04.2018 18:45, Spencer Graves wrote:
>>
>> [... deleting irrelevant stuff...]
>>
>>
>>
>>  If it becomes infeasible to find smaller datasets,
>> etc., you can
>> cut out certain tests with a construct like the following:
>>
>>
>> if(!fda::CRAN()){
>> # ... tests to run on other computers but to skip on CRAN.
>> ...
>> }
>>
>>
>> Ummm, how should fda::CRAN() now that it runs on CRAN?
>>
>> CRAN prefers to ship a set of examples/tests etc. that meet our
>> requirements. If you want to ru addtional tests and/or examples,
>> then
>> run them conditionally on something that is true for your local
>> machine,
>> e.g. some defined environment variable.
>>
>>
>> For Xubo Yue, who may not be aware of all of the players:
>>
>> Uwe Ligges is one of the individuals who runs CRAN.  When you submit
>> a package to CRAN, you are asking Uwe and others to distribute your
>> work. You should listen to what he says.
>>
>> Spencer Graves and I are not involved in running CRAN.  We will give
>> you advice that we think is good advice, but if it conflicts with
>> Uwe's, follow his.
>>
>> Duncan Murdoch
>>
>>
>>
>>
>> --
>> *Xubo (Max) YUE, *PhD Student,
>> /The Industrial and Operation Engineering Department,/
>> /College of Engineering,/
>> /The University of Michigan, Ann Arbor, MI, USA/
>>
>>
>>


-- 
*Xubo (Max) YUE, *PhD Student,
*The Industrial and Operation Engineering Department,*
*College of Engineering,*
*The University of Michigan, Ann Arbor, MI, USA*

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Uwe Ligges



On 24.04.2018 19:07, Xubo Yue wrote:

Everyone, I appreciate for your help!

Hey Uwe Ligges:

There are four examples in my package: read data, calculate correlation, 
plot, and summarize connection network. The plot is the slowest one and 
I have to use donttest{} to avoid testing it on CRAN. All other examples 
are fast and take less than 10s, so I can let CRAN test it.


Also Swetlana suggest me to write a vignette to demonstrate plot. 
However, my plot is in rgl device (an rgl window separated from default 
R plot window) and cannot be integrated into rmarkdown.


So in a nutshell: can I just use donttest{} to my plot example and 
comment that it takes a long time to run?


Yes, perfect.

Best,
Uwe Ligges



It is my first time to submit r package, sorry for any inconvenience!

Thank you very much for your help!

On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch 
mailto:murdoch.dun...@gmail.com>> wrote:


On 24/04/2018 12:48 PM, Uwe Ligges wrote:



On 24.04.2018 18:45, Spencer Graves wrote:

[... deleting irrelevant stuff...]



     If it becomes infeasible to find smaller datasets,
etc., you can
cut out certain tests with a construct like the following:


if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN.  ...
}


Ummm, how should fda::CRAN() now that it runs on CRAN?

CRAN prefers to ship a set of examples/tests etc. that meet our
requirements. If you want to ru addtional tests and/or examples,
then
run them conditionally on something that is true for your local
machine,
e.g. some defined environment variable.


For Xubo Yue, who may not be aware of all of the players:

Uwe Ligges is one of the individuals who runs CRAN.  When you submit
a package to CRAN, you are asking Uwe and others to distribute your
work. You should listen to what he says.

Spencer Graves and I are not involved in running CRAN.  We will give
you advice that we think is good advice, but if it conflicts with
Uwe's, follow his.

Duncan Murdoch




--
*Xubo (Max) YUE, *PhD Student,
/The Industrial and Operation Engineering Department,/
/College of Engineering,/
/The University of Michigan, Ann Arbor, MI, USA/




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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Uwe Ligges



On 24.04.2018 19:15, Spencer Graves wrote:



On 2018-04-24 12:01, Duncan Murdoch wrote:

On 24/04/2018 12:48 PM, Uwe Ligges wrote:



On 24.04.2018 18:45, Spencer Graves wrote:

[... deleting irrelevant stuff...]



    If it becomes infeasible to find smaller datasets, etc., you 
can

cut out certain tests with a construct like the following:


if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN. ...
}


Ummm, how should fda::CRAN() now that it runs on CRAN?

CRAN prefers to ship a set of examples/tests etc. that meet our
requirements. If you want to ru addtional tests and/or examples, then
run them conditionally on something that is true for your local machine,
e.g. some defined environment variable.



   The fda::CRAN() function tests a "defined environmental 
variable", as you suggest:  It is TRUE with "R CMD check –as-cran" and 
FALSE if "-as-cran" (or something like that)



The something like that is rather relevant. For example, I never use 
--as-cran on my machine, and most CRAN machines do only on incoming 
check but not the regular daily checks ...


Best,
Uwe
 is not set.  It has been
several years since I wrote that code, and I'm not prepared at the 
moment to defend exactly how it works.  It was how I resolved a conflict 
between Jim Ramsay, the maintainer and lead author of "fda", CRAN 
maintainers like Uwe, and other contributors to "fda", especially Giles 
Hooker and me:  It allowed us to keep examples in "fda" help files 
without excessive work trying to find examples that would illustrate the 
same points with less compute time.




For Xubo Yue, who may not be aware of all of the players:

Uwe Ligges is one of the individuals who runs CRAN.  When you submit a 
package to CRAN, you are asking Uwe and others to distribute your 
work. You should listen to what he says.


Spencer Graves and I are not involved in running CRAN.  We will give 
you advice that we think is good advice, but if it conflicts with 
Uwe's, follow his.


Duncan Murdoch



   Moreover, Duncan's contributions to the R Project vastly exceed 
mine.  If any of my suggestions seem to conflict with Duncan's comments, 
follow his (unless they conflict with someone like Uwe, as Duncan noted).



   Spencer Graves




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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Spencer Graves



On 2018-04-24 12:01, Duncan Murdoch wrote:

On 24/04/2018 12:48 PM, Uwe Ligges wrote:



On 24.04.2018 18:45, Spencer Graves wrote:

[... deleting irrelevant stuff...]



    If it becomes infeasible to find smaller datasets, etc., you 
can

cut out certain tests with a construct like the following:


if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN. ...
}


Ummm, how should fda::CRAN() now that it runs on CRAN?

CRAN prefers to ship a set of examples/tests etc. that meet our
requirements. If you want to ru addtional tests and/or examples, then
run them conditionally on something that is true for your local machine,
e.g. some defined environment variable.



  The fda::CRAN() function tests a "defined environmental 
variable", as you suggest:  It is TRUE with "R CMD check –as-cran" and 
FALSE if "-as-cran" (or something like that) is not set.  It has been 
several years since I wrote that code, and I'm not prepared at the 
moment to defend exactly how it works.  It was how I resolved a conflict 
between Jim Ramsay, the maintainer and lead author of "fda", CRAN 
maintainers like Uwe, and other contributors to "fda", especially Giles 
Hooker and me:  It allowed us to keep examples in "fda" help files 
without excessive work trying to find examples that would illustrate the 
same points with less compute time.




For Xubo Yue, who may not be aware of all of the players:

Uwe Ligges is one of the individuals who runs CRAN.  When you submit a 
package to CRAN, you are asking Uwe and others to distribute your 
work. You should listen to what he says.


Spencer Graves and I are not involved in running CRAN.  We will give 
you advice that we think is good advice, but if it conflicts with 
Uwe's, follow his.


Duncan Murdoch



  Moreover, Duncan's contributions to the R Project vastly exceed 
mine.  If any of my suggestions seem to conflict with Duncan's comments, 
follow his (unless they conflict with someone like Uwe, as Duncan noted).



  Spencer Graves

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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Xubo Yue
Everyone, I appreciate for your help!

Hey Uwe Ligges:

There are four examples in my package: read data, calculate correlation,
plot, and summarize connection network. The plot is the slowest one and I
have to use donttest{} to avoid testing it on CRAN. All other examples are
fast and take less than 10s, so I can let CRAN test it.

Also Swetlana suggest me to write a vignette to demonstrate plot. However,
my plot is in rgl device (an rgl window separated from default R plot
window) and cannot be integrated into rmarkdown.

So in a nutshell: can I just use donttest{} to my plot example and comment
that it takes a long time to run?

It is my first time to submit r package, sorry for any inconvenience!

Thank you very much for your help!

On Tue, Apr 24, 2018 at 1:01 PM, Duncan Murdoch 
wrote:

> On 24/04/2018 12:48 PM, Uwe Ligges wrote:
>
>>
>>
>> On 24.04.2018 18:45, Spencer Graves wrote:
>>
> [... deleting irrelevant stuff...]
>
>>
>>>
>>> If it becomes infeasible to find smaller datasets, etc., you can
>>> cut out certain tests with a construct like the following:
>>>
>>>
>>> if(!fda::CRAN()){
>>> # ... tests to run on other computers but to skip on CRAN.  ...
>>> }
>>>
>>
>> Ummm, how should fda::CRAN() now that it runs on CRAN?
>>
>> CRAN prefers to ship a set of examples/tests etc. that meet our
>> requirements. If you want to ru addtional tests and/or examples, then
>> run them conditionally on something that is true for your local machine,
>> e.g. some defined environment variable.
>>
>
> For Xubo Yue, who may not be aware of all of the players:
>
> Uwe Ligges is one of the individuals who runs CRAN.  When you submit a
> package to CRAN, you are asking Uwe and others to distribute your work. You
> should listen to what he says.
>
> Spencer Graves and I are not involved in running CRAN.  We will give you
> advice that we think is good advice, but if it conflicts with Uwe's, follow
> his.
>
> Duncan Murdoch
>



-- 
*Xubo (Max) YUE, *PhD Student,
*The Industrial and Operation Engineering Department,*
*College of Engineering,*
*The University of Michigan, Ann Arbor, MI, USA*

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Duncan Murdoch

On 24/04/2018 12:48 PM, Uwe Ligges wrote:



On 24.04.2018 18:45, Spencer Graves wrote:

[... deleting irrelevant stuff...]



    If it becomes infeasible to find smaller datasets, etc., you can
cut out certain tests with a construct like the following:


if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN.  ...
}


Ummm, how should fda::CRAN() now that it runs on CRAN?

CRAN prefers to ship a set of examples/tests etc. that meet our
requirements. If you want to ru addtional tests and/or examples, then
run them conditionally on something that is true for your local machine,
e.g. some defined environment variable.


For Xubo Yue, who may not be aware of all of the players:

Uwe Ligges is one of the individuals who runs CRAN.  When you submit a 
package to CRAN, you are asking Uwe and others to distribute your work. 
You should listen to what he says.


Spencer Graves and I are not involved in running CRAN.  We will give you 
advice that we think is good advice, but if it conflicts with Uwe's, 
follow his.


Duncan Murdoch

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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Uwe Ligges



On 24.04.2018 18:45, Spencer Graves wrote:



On 2018-04-24 09:50, Duncan Murdoch wrote:

On 24/04/2018 10:29 AM, Xubo Yue wrote:

Hey

I just got feedback from CRAN auto-checking and here are some notes I
cannot resolve:

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Jian Kang '

New submission

Possibly mis-spelled words in DESCRIPTION:
   Kang (7:196)

I am not sure how to solve this.



You can ignore those.


Also, here are some running time notes:

** running examples for arch 'i386' ... [250s] NOTE
Examples with CPU or elapsed time > 10s
   user system elapsed
multipleRegion_plot 190.35   1.92  205.61
summary_kcca  1.40   0.17   14.79
permkCCA_multipleRegion   1.19   0.11   14.51
nii2RData 0.40   0.20   13.84
** running examples for arch 'x64' ... [79s] NOTE
Examples with CPU or elapsed time > 10s
  user system elapsed
multipleRegion_plot 18.36   2.06   33.66
permkCCA_multipleRegion  1.47   0.20   14.88
summary_kcca 1.48   0.16   14.85
nii2RData    0.62   0.23   14.09
* checking PDF version of manual ... OK
* DONE
Status: 3 NOTEs

My total running time is less than 10 minutes. I am wondering is it 
ok to

ignore these two NOTEs?


You shouldn't ignore those.  Your package will be tested many, many 
times, and it will take more than 3 minutes for just one example.  (It 
will be tested whenever any package you depend on is changed, to make 
sure the change doesn't break yours.)


Use a smaller dataset, do less, or whatever you can to get the 
multipleRegion_plot example down to a time similar to the other ones, 
i.e. well below 10s in user+system time.



   If it becomes infeasible to find smaller datasets, etc., you can 
cut out certain tests with a construct like the following:



if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN.  ...
}


Ummm, how should fda::CRAN() now that it runs on CRAN?

CRAN prefers to ship a set of examples/tests etc. that meet our 
requirements. If you want to ru addtional tests and/or examples, then 
run them conditionally on something that is true for your local machine, 
e.g. some defined environment variable.


Best,
Uwe Ligges





   Obviously, you'll need fda::CRAN.  I found it infeasible to meet 
that requirement and so disabled the tests that violated CRAN's rule on 
this.



   I've been told that this is a suboptimal solution and should be 
avoided.  I agree.



   Hope this helps.
   Spencer Graves



You don't have a lot of control of elapsed time because it will depend 
on what else is happening on the test machine, but if the other times 
are short, usually elapsed time will also be short.


Duncan Murdoch

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


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


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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Spencer Graves



On 2018-04-24 09:50, Duncan Murdoch wrote:

On 24/04/2018 10:29 AM, Xubo Yue wrote:

Hey

I just got feedback from CRAN auto-checking and here are some notes I
cannot resolve:

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Jian Kang '

New submission

Possibly mis-spelled words in DESCRIPTION:
   Kang (7:196)

I am not sure how to solve this.



You can ignore those.


Also, here are some running time notes:

** running examples for arch 'i386' ... [250s] NOTE
Examples with CPU or elapsed time > 10s
   user system elapsed
multipleRegion_plot 190.35   1.92  205.61
summary_kcca  1.40   0.17   14.79
permkCCA_multipleRegion   1.19   0.11   14.51
nii2RData 0.40   0.20   13.84
** running examples for arch 'x64' ... [79s] NOTE
Examples with CPU or elapsed time > 10s
  user system elapsed
multipleRegion_plot 18.36   2.06   33.66
permkCCA_multipleRegion  1.47   0.20   14.88
summary_kcca 1.48   0.16   14.85
nii2RData    0.62   0.23   14.09
* checking PDF version of manual ... OK
* DONE
Status: 3 NOTEs

My total running time is less than 10 minutes. I am wondering is it 
ok to

ignore these two NOTEs?


You shouldn't ignore those.  Your package will be tested many, many 
times, and it will take more than 3 minutes for just one example.  (It 
will be tested whenever any package you depend on is changed, to make 
sure the change doesn't break yours.)


Use a smaller dataset, do less, or whatever you can to get the 
multipleRegion_plot example down to a time similar to the other ones, 
i.e. well below 10s in user+system time.



  If it becomes infeasible to find smaller datasets, etc., you can 
cut out certain tests with a construct like the following:



if(!fda::CRAN()){
# ... tests to run on other computers but to skip on CRAN.  ...
}


  Obviously, you'll need fda::CRAN.  I found it infeasible to meet 
that requirement and so disabled the tests that violated CRAN's rule on 
this.



  I've been told that this is a suboptimal solution and should be 
avoided.  I agree.



  Hope this helps.
  Spencer Graves



You don't have a lot of control of elapsed time because it will depend 
on what else is happening on the test machine, but if the other times 
are short, usually elapsed time will also be short.


Duncan Murdoch

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


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


Re: [R-pkg-devel] some notes

2018-04-24 Thread Duncan Murdoch

On 24/04/2018 10:29 AM, Xubo Yue wrote:

Hey

I just got feedback from CRAN auto-checking and here are some notes I
cannot resolve:

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Jian Kang '

New submission

Possibly mis-spelled words in DESCRIPTION:
   Kang (7:196)

I am not sure how to solve this.



You can ignore those.


Also, here are some running time notes:

** running examples for arch 'i386' ... [250s] NOTE
Examples with CPU or elapsed time > 10s
   user system elapsed
multipleRegion_plot 190.35   1.92  205.61
summary_kcca  1.40   0.17   14.79
permkCCA_multipleRegion   1.19   0.11   14.51
nii2RData 0.40   0.20   13.84
** running examples for arch 'x64' ... [79s] NOTE
Examples with CPU or elapsed time > 10s
  user system elapsed
multipleRegion_plot 18.36   2.06   33.66
permkCCA_multipleRegion  1.47   0.20   14.88
summary_kcca 1.48   0.16   14.85
nii2RData0.62   0.23   14.09
* checking PDF version of manual ... OK
* DONE
Status: 3 NOTEs

My total running time is less than 10 minutes. I am wondering is it ok to
ignore these two NOTEs?


You shouldn't ignore those.  Your package will be tested many, many 
times, and it will take more than 3 minutes for just one example.  (It 
will be tested whenever any package you depend on is changed, to make 
sure the change doesn't break yours.)


Use a smaller dataset, do less, or whatever you can to get the 
multipleRegion_plot example down to a time similar to the other ones, 
i.e. well below 10s in user+system time.


You don't have a lot of control of elapsed time because it will depend 
on what else is happening on the test machine, but if the other times 
are short, usually elapsed time will also be short.


Duncan Murdoch

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