Re: [Rd] R CMD build processes inst/doc/Makefile only if there are vignette files?

2011-04-29 Thread Prof Brian Ripley

On Fri, 29 Apr 2011, Hervé Pagès wrote:


On 11-03-30 01:55 AM, Prof Brian Ripley wrote:

What R CMD build (and check) does is to call tools::buildVignettes.
That has been true for a while, and buildVignettes() returns if no
vignettes are found. The docs are out-of-date.

My view is that you are misusing inst/doc: it is intended *only* for
files which are going to be installed and hence report.tex should not
really be there. So you should be doing this in another source directory
and copying report.pdf to inst/doc. Use configure to arrange this.

Shortly vignettes to be built will be moved out of inst/doc.


Could you please elaborate on this? I just found this in the NEWS for
R 2.14.0:

 o The preferred location for vignette sources is now the directory
   ‘vignettes’ and not ‘inst/doc’: R CMD build will now re-build
   vignettes in ‘vignettes’ and copy the ‘.Rnw’ (etc) files and
   the corresponding PDFs to ‘inst/doc’.

Sounds like an important move. What are the long term plans: keep
both inst/doc/ and vignettes/ as places for vignettes to be built?
Or drop inst/doc/ at some point?


Drop inst/doc at some point.  It doesn't make much difference to the 
codebase: all the work is done in pkgVignettes().




Thanks!
H.




On Tue, 29 Mar 2011, Henrik Bengtsson wrote:


Hi,

in Section 'Writing package vignettes' of 'Writing R Extensions' it says:

"Whenever a Makefile is found, then R CMD build will try to run make
after the Sweave runs, so PDF manuals can be created from arbitrary
source formats (plain LaTeX files, ...). [...] Note that the make step
is executed even if there are no files in Sweave format, [...]".

In my package, inst/doc/ file contains two files: Makefile, and
report.tex. However, when running 'Rcmd build' on Windows with R
v2.13.0 alpha (2011-03-27 r55091) I can only get 'make' to run
(process inst/doc/Makefile) if I add a inst/doc/dummy.Rnw file,
otherwise nothing happens. My Makefile contains:

all: pdf

pdf: report.tex
texi2dvi --pdf report.tex

clean:
rm dummy.Rnw dummy.tex
rm *.aux *.log *.toc

Is it really necessary to add dummy.Rnw? Am I missing something?

/Henrik


sessionInfo()

R version 2.13.0 alpha (2011-03-27 r55091)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_2.13.0

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






--
Hervé Pagès

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

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



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Dario Strbenac
The intention was more to have another place to make the user aware of a 
real-sized data package I made, since the package only comes with trivially 
sized data. The help examples and vignette only use the small sized data, and 
never the realistic dataset. I suppose it is better just to put a reference to 
it in the vignette and describe its availability in there.

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


Re: [Rd] grid stringHeight

2011-04-29 Thread baptiste auguie
On 27 April 2011 11:06, baptiste auguie  wrote:
> Dear all,
>
> I'm puzzled by the behavior of stringHeight in the grid package.
> Consider the following test,
>
> library(grid)
>
> test <- function(lab="dog", ...){
>  g1 <- textGrob(lab)
>  g2 <- rectGrob(height=grobHeight(g1), width=grobWidth(g1))
>  gg <- gTree(children=gList(g1,g2), ...)
>
>  print(c("height:", convertUnit(stringHeight(lab), "mm", "y")))
>  grid.draw(gg)
> }
>
> grid.newpage()
> test()
> test(expression(dog), vp=viewport(x=0.6))
> ## notice how the dog's tail is being cut off, where
> ## expression yields a snug cage
>
> grid.newpage()
> test("aoc")
> test(expression(aoc), vp=viewport(x=0.6))
>
> It appears that stringHeight correctly calculates the height for an
> expression, but not for a basic string. I think it used to produce the
> same output for both.
>
> Best regards,
>
> baptiste
>
> sessionInfo()
> R version 2.13.0 alpha (2011-03-27 r55076)
> Platform: i386-apple-darwin9.8.0 (32-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  grid      methods
> [8] base
>

I have now filed a bug report for this issue, though I could only
confirm it on one operating system.

https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14566

Best regards,

baptiste

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


Re: [Rd] R CMD build processes inst/doc/Makefile only if there are vignette files?

2011-04-29 Thread Hervé Pagès

On 11-03-30 01:55 AM, Prof Brian Ripley wrote:

What R CMD build (and check) does is to call tools::buildVignettes.
That has been true for a while, and buildVignettes() returns if no
vignettes are found. The docs are out-of-date.

My view is that you are misusing inst/doc: it is intended *only* for
files which are going to be installed and hence report.tex should not
really be there. So you should be doing this in another source directory
and copying report.pdf to inst/doc. Use configure to arrange this.

Shortly vignettes to be built will be moved out of inst/doc.


Could you please elaborate on this? I just found this in the NEWS for
R 2.14.0:

  o The preferred location for vignette sources is now the directory
‘vignettes’ and not ‘inst/doc’: R CMD build will now re-build
vignettes in ‘vignettes’ and copy the ‘.Rnw’ (etc) files and
the corresponding PDFs to ‘inst/doc’.

Sounds like an important move. What are the long term plans: keep
both inst/doc/ and vignettes/ as places for vignettes to be built?
Or drop inst/doc/ at some point?

Thanks!
H.




On Tue, 29 Mar 2011, Henrik Bengtsson wrote:


Hi,

in Section 'Writing package vignettes' of 'Writing R Extensions' it says:

"Whenever a Makefile is found, then R CMD build will try to run make
after the Sweave runs, so PDF manuals can be created from arbitrary
source formats (plain LaTeX files, ...). [...] Note that the make step
is executed even if there are no files in Sweave format, [...]".

In my package, inst/doc/ file contains two files: Makefile, and
report.tex. However, when running 'Rcmd build' on Windows with R
v2.13.0 alpha (2011-03-27 r55091) I can only get 'make' to run
(process inst/doc/Makefile) if I add a inst/doc/dummy.Rnw file,
otherwise nothing happens. My Makefile contains:

all: pdf

pdf: report.tex
texi2dvi --pdf report.tex

clean:
rm dummy.Rnw dummy.tex
rm *.aux *.log *.toc

Is it really necessary to add dummy.Rnw? Am I missing something?

/Henrik


sessionInfo()

R version 2.13.0 alpha (2011-03-27 r55091)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_2.13.0

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






--
Hervé Pagès

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

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

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


[Rd] Windows Rzlib.dll gzopen and friends

2011-04-29 Thread Martin Morgan
Several Bioconductor packages were expecting Windows Rzlib.dll to 
provide gzopen / gzread / gzseek / gzgets / gzrewind / gzclose. Are 
these gone for good, viz., r55624 ?


Martin
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793

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


Re: [Rd] median and data frames

2011-04-29 Thread Patrick Burns

If Martin's proposal is accepted, does
that mean that the median method for
data frames would be something like:

function (x, ...)
{
stop(paste("you probably mean to use the command: sapply(",
deparse(substitute(x)), ", median)", sep=""))
}

Pat


On 29/04/2011 15:25, Martin Maechler wrote:

Paul Johnson
 on Thu, 28 Apr 2011 00:20:27 -0500 writes:


 >  On Wed, Apr 27, 2011 at 12:44 PM, Patrick Burns
 >wrote:
 >>  Here are some data frames:
 >>
 >>  df3.2<- data.frame(1:3, 7:9)
 >>  df4.2<- data.frame(1:4, 7:10)
 >>  df3.3<- data.frame(1:3, 7:9, 10:12)
 >>  df4.3<- data.frame(1:4, 7:10, 10:13)
 >>  df3.4<- data.frame(1:3, 7:9, 10:12, 15:17)
 >>  df4.4<- data.frame(1:4, 7:10, 10:13, 15:18)
 >>
 >>  Now here are some commands and their answers:

 >>>  median(df4.4)
 >>  [1]  8.5 11.5
 >>>  median(df3.2[c(1,2,3),])
 >>  [1] 2 8
 >>>  median(df3.2[c(1,3,2),])
 >>  [1]  2 NA
 >>  Warning message:
 >>  In mean.default(X[[2L]], ...) :
 >>argument is not numeric or logical: returning NA
 >>
 >>
 >>
 >>  The sessionInfo is below, but it looks
 >>  to me like the present behavior started
 >>  in 2.10.0.
 >>
 >>  Sometimes it gets the right answer.  I'd
 >>  be grateful to hear how it does that -- I
 >>  can't figure it out.
 >>

 >  Hello, Pat.

 >  Nice poetry there!  I think I have an actual answer, as opposed to the
 >  usual crap I spew.

 >  I would agree if you said median.data.frame ought to be written to
 >  work columnwise, similar to mean.data.frame.

 >  apply and sapply  always give the correct answer

 >>  apply(df3.3, 2, median)
 >  X1.3   X7.9 X10.12
 >  2  8 11

 [...]

exactly

 >  mean.data.frame is now implemented as

 >  mean.data.frame<- function(x, ...) sapply(x, mean, ...)

exactly.

My personal oppinion is that  mean.data.frame() should never have
been written.
People should know, or learn, to use apply functions for such a
task.

The unfortunate fact that mean.data.frame() exists makes people
think that median.data.frame() should too,
and then

   var.data.frame()
sd.data.frame()
   mad.data.frame()
   min.data.frame()
   max.data.frame()
   ...
   ...

all just in order to *not* to have to know  sapply()


No, rather not.

My vote is for deprecating  mean.data.frame().

Martin



--
Patrick Burns
pbu...@pburns.seanet.com
twitter: @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of 'Some hints for the R beginner'
and 'The R Inferno')

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


Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Hadley Wickham
> Maybe also useful to distinguish between package check and INSTALL, where
> during the former the Suggests: package must be present (modulo setting
> additional flags) but in the latter may not be. The Bioconductor build
> system, for instance, would install RepitoolsExamples  before running R CMD
> check Repitools. A user might successfully install Repitools without
> installing RepitoolsExamples.

There's also the case a suggested package isn't available for a
specific platform, the CRAN builders will still build it.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

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


Re: [Rd] median and data frames

2011-04-29 Thread Hadley Wickham
> My personal oppinion is that  mean.data.frame() should never have
> been written.
> People should know, or learn, to use apply functions for such a
> task.
>
> The unfortunate fact that mean.data.frame() exists makes people
> think that median.data.frame() should too,
> and then
>
>  var.data.frame()
>   sd.data.frame()
>  mad.data.frame()
>  min.data.frame()
>  max.data.frame()
>  ...
>  ...
>
> all just in order to *not* to have to know  sapply()
> 
>
> No, rather not.
>
> My vote is for deprecating  mean.data.frame().

I totally agree!

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

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


Re: [Rd] median and data frames

2011-04-29 Thread William Dunlap
> From: r-devel-boun...@r-project.org 
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Martin Maechler
> Sent: Friday, April 29, 2011 7:25 AM
> To: Paul Johnson
> Cc: r-devel
> Subject: Re: [Rd] median and data frames
> [ ... lots of lines elided ... ] 
> My vote is for deprecating  mean.data.frame().

While R's data.frame method for mean(x) returns
the same thing as colMeans(x), Splus's (since 2005)
returns the same thing as mean(as.matrix(x)).  (Really,
it calls numerical.matrix(x), which turns non-numeric
columns into columns of numeric NA's).  I usually favor
making data.frames act more like matrices when possible
(since users often conflate the two classes) and I
like having all the methods of a generic function return
the same sort of thing (a single value in this case).

It is often nonsensical to ask for the mean of an
entire data.frame, as the columns may have different
units even when they are all numeric.  It does make
sense when you use a tool like read.table() or S+'s
importData() to import a matrix and you don't notice
it is stored as a data.frame.  It does make sense when
you have a single-column data.frame or matrix, perhaps
arising from the use of drop=FALSE when subscripting.  

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

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

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


Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Martin Morgan

On 04/29/2011 07:36 AM, Simon Urbanek wrote:


On Apr 29, 2011, at 9:52 AM, Steve Lianoglou wrote:


Hi,

On Fri, Apr 29, 2011 at 5:29 AM, Prof Brian Ripley
  wrote:

On Fri, 29 Apr 2011, Dario Strbenac wrote:


Hello,

In my description file, I have an example data package in Suggests: that
I've deleted from my library to test what the user who doesn't have it will
experience.

However, R CMD check won't even pass my package :

* checking package dependencies ... ERROR
Package required but not available: RepitoolsExamples

Why would it have to be installed, if it's only a data package, that isn't
needed in any of my code ? The manual also says "In particular, large
packages providing “only” data for examples or vignettes should be listed in
‘Suggests’ rather than ‘Depends’ in order to make lean installations
possible."


Why suggest a package that 'isn't needed in any of my code'?

I suspect that is a lie, and some of your code does use it: if some it is
needed to fully check the package.   There is a option to 'R CMD check' to
enable the check to go ahead without all the dependencies, so please do
re-read the manuals to find it.


Here's a stab in the dark:

Perhaps the OP has code in some \examples{} section for some help
(*.Rd) file that then tries to load data from the "suggested" package?



But that is a valid use of Suggests: as long as it is guarded against that 
package not being present.

The point here is that the default is to check those packages yet Dario doesn't 
like it and thus should turn it off if he feels so inclined. (That's my 
interpretation without knowing the package).

Cheers,
Simon




The code in the \examples{} sections of *.Rd files are run during R
CMD check ... so, if you're trying to load data from a suggested
package that may not be installed, perhaps you can wrap those code
blocks with \dontrun{}.



Not really - that defeats the purpose - it will never be checked int hat case!


Maybe also useful to distinguish between package check and INSTALL, 
where during the former the Suggests: package must be present (modulo 
setting additional flags) but in the latter may not be. The Bioconductor 
build system, for instance, would install RepitoolsExamples  before 
running R CMD check Repitools. A user might successfully install 
Repitools without installing RepitoolsExamples.


"if (require(RepitoolsExamples))" in an example on a man page is much 
preferred to \dontrun{}, as Simon mentions.


Martin Morgan






For more info: this is covered in the "Writing R Extensions," but is
also described here:
http://stackoverflow.com/questions/1454211/what-does-not-run-mean-in-r-help-pages

HTH,
-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
  | Memorial Sloan-Kettering Cancer Center
  | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

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




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



--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793

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


Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Simon Urbanek

On Apr 29, 2011, at 9:52 AM, Steve Lianoglou wrote:

> Hi,
> 
> On Fri, Apr 29, 2011 at 5:29 AM, Prof Brian Ripley
>  wrote:
>> On Fri, 29 Apr 2011, Dario Strbenac wrote:
>> 
>>> Hello,
>>> 
>>> In my description file, I have an example data package in Suggests: that
>>> I've deleted from my library to test what the user who doesn't have it will
>>> experience.
>>> 
>>> However, R CMD check won't even pass my package :
>>> 
>>> * checking package dependencies ... ERROR
>>> Package required but not available: RepitoolsExamples
>>> 
>>> Why would it have to be installed, if it's only a data package, that isn't
>>> needed in any of my code ? The manual also says "In particular, large
>>> packages providing “only” data for examples or vignettes should be listed in
>>> ‘Suggests’ rather than ‘Depends’ in order to make lean installations
>>> possible."
>> 
>> Why suggest a package that 'isn't needed in any of my code'?
>> 
>> I suspect that is a lie, and some of your code does use it: if some it is
>> needed to fully check the package.   There is a option to 'R CMD check' to
>> enable the check to go ahead without all the dependencies, so please do
>> re-read the manuals to find it.
> 
> Here's a stab in the dark:
> 
> Perhaps the OP has code in some \examples{} section for some help
> (*.Rd) file that then tries to load data from the "suggested" package?
> 

But that is a valid use of Suggests: as long as it is guarded against that 
package not being present.

The point here is that the default is to check those packages yet Dario doesn't 
like it and thus should turn it off if he feels so inclined. (That's my 
interpretation without knowing the package).

Cheers,
Simon



> The code in the \examples{} sections of *.Rd files are run during R
> CMD check ... so, if you're trying to load data from a suggested
> package that may not be installed, perhaps you can wrap those code
> blocks with \dontrun{}.
> 

Not really - that defeats the purpose - it will never be checked int hat case!


> For more info: this is covered in the "Writing R Extensions," but is
> also described here:
> http://stackoverflow.com/questions/1454211/what-does-not-run-mean-in-r-help-pages
> 
> HTH,
> -steve
> 
> -- 
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  | Memorial Sloan-Kettering Cancer Center
>  | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 

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


Re: [Rd] median and data frames

2011-04-29 Thread Martin Maechler
> Paul Johnson 
> on Thu, 28 Apr 2011 00:20:27 -0500 writes:

> On Wed, Apr 27, 2011 at 12:44 PM, Patrick Burns
>  wrote:
>> Here are some data frames:
>> 
>> df3.2 <- data.frame(1:3, 7:9)
>> df4.2 <- data.frame(1:4, 7:10)
>> df3.3 <- data.frame(1:3, 7:9, 10:12)
>> df4.3 <- data.frame(1:4, 7:10, 10:13)
>> df3.4 <- data.frame(1:3, 7:9, 10:12, 15:17)
>> df4.4 <- data.frame(1:4, 7:10, 10:13, 15:18)
>> 
>> Now here are some commands and their answers:

>>> median(df4.4)
>> [1]  8.5 11.5
>>> median(df3.2[c(1,2,3),])
>> [1] 2 8
>>> median(df3.2[c(1,3,2),])
>> [1]  2 NA
>> Warning message:
>> In mean.default(X[[2L]], ...) :
>>  argument is not numeric or logical: returning NA
>> 
>> 
>> 
>> The sessionInfo is below, but it looks
>> to me like the present behavior started
>> in 2.10.0.
>> 
>> Sometimes it gets the right answer.  I'd
>> be grateful to hear how it does that -- I
>> can't figure it out.
>> 

> Hello, Pat.

> Nice poetry there!  I think I have an actual answer, as opposed to the
> usual crap I spew.

> I would agree if you said median.data.frame ought to be written to
> work columnwise, similar to mean.data.frame.

> apply and sapply  always give the correct answer

>> apply(df3.3, 2, median)
> X1.3   X7.9 X10.12
> 2  8 11

[...]

exactly

> mean.data.frame is now implemented as

> mean.data.frame <- function(x, ...) sapply(x, mean, ...)

exactly.

My personal oppinion is that  mean.data.frame() should never have
been written.
People should know, or learn, to use apply functions for such a
task.

The unfortunate fact that mean.data.frame() exists makes people
think that median.data.frame() should too,
and then  

  var.data.frame()
   sd.data.frame()
  mad.data.frame()
  min.data.frame()
  max.data.frame()
  ...
  ...

all just in order to *not* to have to know  sapply() 


No, rather not.

My vote is for deprecating  mean.data.frame().

Martin

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


Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Steve Lianoglou
Hi,

On Fri, Apr 29, 2011 at 5:29 AM, Prof Brian Ripley
 wrote:
> On Fri, 29 Apr 2011, Dario Strbenac wrote:
>
>> Hello,
>>
>> In my description file, I have an example data package in Suggests: that
>> I've deleted from my library to test what the user who doesn't have it will
>> experience.
>>
>> However, R CMD check won't even pass my package :
>>
>> * checking package dependencies ... ERROR
>> Package required but not available: RepitoolsExamples
>>
>> Why would it have to be installed, if it's only a data package, that isn't
>> needed in any of my code ? The manual also says "In particular, large
>> packages providing “only” data for examples or vignettes should be listed in
>> ‘Suggests’ rather than ‘Depends’ in order to make lean installations
>> possible."
>
> Why suggest a package that 'isn't needed in any of my code'?
>
> I suspect that is a lie, and some of your code does use it: if some it is
> needed to fully check the package.   There is a option to 'R CMD check' to
> enable the check to go ahead without all the dependencies, so please do
> re-read the manuals to find it.

Here's a stab in the dark:

Perhaps the OP has code in some \examples{} section for some help
(*.Rd) file that then tries to load data from the "suggested" package?

The code in the \examples{} sections of *.Rd files are run during R
CMD check ... so, if you're trying to load data from a suggested
package that may not be installed, perhaps you can wrap those code
blocks with \dontrun{}.

For more info: this is covered in the "Writing R Extensions," but is
also described here:
http://stackoverflow.com/questions/1454211/what-does-not-run-mean-in-r-help-pages

HTH,
-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

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


Re: [Rd] request for R-exts addition

2011-04-29 Thread Martin Maechler
> Ben Bolker 
> on Thu, 28 Apr 2011 10:06:01 -0400 writes:

>   would it be possible / make sense to copy some of the
> information in ?news into the R-exts manual, where package
> writers are most likely (?)  to look for it?  

sure...

> The information therein seems more appropriate for the
> extensions manual ...

you mean when we (R core) add extensions to package handling, Rd
syntax, the C API, ... and only report it in NEWS instead of
also updating the  R Extensions  manual?
Well, that happens as you can imagine.

In some cases, the entry in NEWS will say that a feature is
experimental, so we don't want to document it yet "in stone", as
we expect the details to change.

But apart from those, I'm sure it will also happen otherwise,
since most of R core have more fun writing code than manuals 
but when we are "called to duty" we typically eventually oblige ;-)

So, yes indeed, it makes very much sense to keep the manual as
up-to-date as possible, and some of us  consider the manual to
be an important part of R's source tarball.

So, patches  and even other (concrete!) proposals for
improvement are welcome.
Ideally using texinfo syntax or even better a patch towards
a current version of the manual
 /doc/manual/R-exts.texi 
from subversion, a nightly tarball, or simply
  https://svn.r-project.org/R/trunk/doc/manual/R-exts.texi

With many thanks in advance,

Martin Maechler, 
ETH Zurich

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


Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Prof Brian Ripley

On Fri, 29 Apr 2011, Dario Strbenac wrote:


Hello,

In my description file, I have an example data package in Suggests: 
that I've deleted from my library to test what the user who doesn't 
have it will experience.


However, R CMD check won't even pass my package :

* checking package dependencies ... ERROR
Package required but not available: RepitoolsExamples

Why would it have to be installed, if it's only a data package, that 
isn't needed in any of my code ? The manual also says "In 
particular, large packages providing “only” data for examples or 
vignettes should be listed in ‘Suggests’ rather than ‘Depends’ in 
order to make lean installations possible."


Why suggest a package that 'isn't needed in any of my code'?

I suspect that is a lie, and some of your code does use it: if some it 
is needed to fully check the package.   There is a option to 'R CMD 
check' to enable the check to go ahead without all the dependencies, 
so please do re-read the manuals to find it.




--
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel