[Rd] download.file() online help

2005-12-04 Thread Philippe Grosjean
Hello,

Online help of download.file() refers to CRAN.packages() (in R 2.2.0) 
which is deprecated in favor of available.packages(). May be should it 
be better updated?
Best,

Philippe Grosjean
-- 
..<°}))><
  ) ) ) ) )
( ( ( ( (Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons-Hainaut University, Pentagone (3D08)
( ( ( ( (Academie Universitaire Wallonie-Bruxelles
  ) ) ) ) )   8, av du Champ de Mars, 7000 Mons, Belgium
( ( ( ( (
  ) ) ) ) )   phone: + 32.65.37.34.97, fax: + 32.65.37.30.54
( ( ( ( (email: [EMAIL PROTECTED]
  ) ) ) ) )
( ( ( ( (web:   http://www.umh.ac.be/~econum
  ) ) ) ) )  http://www.sciviews.org
( ( ( ( (
..

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


Re: [Rd] download.file() online help

2005-12-04 Thread Duncan Murdoch
On 12/4/2005 6:49 AM, Philippe Grosjean wrote:
> Hello,
> 
> Online help of download.file() refers to CRAN.packages() (in R 2.2.0) 
> which is deprecated in favor of available.packages(). May be should it 
> be better updated?
> Best,
> 
> Philippe Grosjean

Yes, there and in ?package.dependencies.  I'll fix it.  Thanks!

Duncan Murdoch

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


[Rd] font inclusions in pdf files

2005-12-04 Thread ivo welch
I am stumbling into external font issues here and there.  I presume using
external lucida fonts is fairly rare, so I am more likely to stumble onto
issues here.  (of course, I often think I have stumbled onto bugs/features
that are not.)  So, I hope I am not imposing by reporting the following.

[1] can R please not include fonts that it is not using?

luafmfiles <- c("/usr/share/texmf/fonts/afm/yandy/lubright/lbr.afm",
"/usr/share/texmf/fonts/afm/yandy/lubright/lbd.afm",
"/usr/share/texmf/fonts/afm/yandy/lubright/lbi.afm",
"/usr/share/texmf/fonts/afm/yandy/lucida/lbc.afm",
#
"/usr/share/texmf/fonts/afm/yandy/lumath/lbms.afm",
"/usr/share/texmf/fonts/afm/yandy/lubright/lbr.afm")
grDevices::postscriptFonts(lucida=grDevices::postscriptFont("Lucida",
metrics=luafmfiles));
pdf(file="testincfonts.pdf");
par(family="lucida");
plot( c(0,0), c(1,1) );
dev.off();

# pdffonts testincfonts.pdf
name type emb sub uni object ID
  --- --- --- -
ZapfDingbats Type 1   no  no  no   5  0
HelveticaType 1   no  no  no  10  0
Helvetica-Bold   Type 1   no  no  no  11  0
Helvetica-ObliqueType 1   no  no  no  12  0
Helvetica-BoldObliqueType 1   no  no  no  13  0
Symbol   Type 1   no  no  no  14  0
LucidaBright Type 1   no  no  no  15  0
LucidaBright-DemiType 1   no  no  no  16  0
LucidaBright-Italic  Type 1   no  no  no  17  0
LucidaCalligraphy-Italic Type 1   no  no  no  18  0
LucidaBright Type 1   no  no  no  19  0

distill from testincfonts.pdf into testincfonts.pdf.pdf to see what is
really used:

# pdffonts testincfonts.pdf.pdf
name type emb sub uni object ID
  --- --- --- -
KWYJNC+LucidaBright  Type 1C  yes yes no   9  0

(Including unused fonts can trip up programs that check whether pdf
documents have embedded all fonts, and which are not smart enough to typeset
[incl. all recursively embedded pdf files] to realize when a font is never
used.)


[2] I do not believe this is an R bug, but I want to mention it anyway
because it comes from interacting the R-created graphics with gs.  for some
odd reason, when I include these external lucida fonts, and create graphics
in R, the R-created pdf can no longer be distilled by gs 8.53, because it
stumbles into a safety issue.  that is, all the gs scripts named 'ps2pdf*'
have the option -dSAFER on by default, which disables the renamefile and
deletefile operators, and it somehow prevents finding the fonts.   (the bug
does not appear if I do not use the external fonts.)

http://groups.google.com/group/comp.lang.postscript/browse_frm/thread/3613c16aec64a9ed/a7c40582a0b5be1b?lnk=st&q=ivowel&rnum=1&hl=en#a7c40582a0b5be1b

regards,

/iaw

[[alternative HTML version deleted]]

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


Re: [Rd] Enlightenment sought and a possible buglet in vector.Rd

2005-12-04 Thread Berwin A Turlach
G'day Brian,

> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> writes:

BDR> On Fri, 2 Dec 2005, Berwin A Turlach wrote: [...]

>> The second behaviour that I cannot explain was produced by code
>> written by somebody else, namely:
[...]
>> The documentation of function() says that if "the end of a
>> function is reached without calling 'return', the value of the
>> last evaluated expression is returned."  And this seems to
>> happen in this case:

BDR> Yes, but that value can be returned with R_Visible set to 0,
BDR> by calling invisible() _or otherwise_.
Thanks for the clarification.  I had the sneaking suspicion that
something like this was happening, but couldn't find anything in the
documentation.

I vaguely remember that S has a mechanism to switch auto-printing
on/off via a variable, whose name started with ".", but couldn't find
anything in the blue book (by now I found .Auto.print in Suesselbeck
and VR "S programming).  Since we don't have a license for S-plus
anymore, I couldn't check S-Plus and I didn't find anything similar in
R.  I take it that R handles all this via R_Visible at the C level?

BDR> R does not print the value of a while() loop.  [...]  (Look
BDR> up the code of do_while for why.)
I can see that in the code of do_while the variable R_Visible is set
to zero, but there is no explanation for why this is done.  But I
guess it is for compatibility reasons with S, since by now I found in
various books on the S language that the  while() loop returns its
value invisible.

Thanks for adding the value section to the help page to clarify this
issue in the R documentation.

Cheers,

Berwin

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


Re: [Rd] Enlightenment sought and a possible buglet in vector.Rd

2005-12-04 Thread Berwin A Turlach
G'day Brian,

> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> writes:

>> I found in the R language definition manual the passage that
>> discourages users of assigning objects within function calls
>> since it is not guaranteed that the assignment is ever made
>> because of R's lazy evaluation model.  But this does not seem
>> to explain the above behaviour since the argument to print is
>> evaluated.  If I replace sys.on.exit() with, say, ls() in both
>> functions, then they produce the same output (and the output
>> that I expect).  Why does f2() not work with sys.on.exit()?

BDR> It does work, but you seems to have misunderstood what it
BDR> does.  See e.g.  the `bug' report discussed at
BDR> http://tolstoy.newcastle.edu.au/~rking/R/devel/05/02/2112.html
Mmh, mea culpa, I am a bit red-faced here, in my quest to find out
what was going on, I checked about everything (including a private
e-mail to an R-core member) but the bug repository and the help page
of sys.on.exit().  I guess that if I have read the latter, I would
have figured out what was going on.  Instead I was satisfied with what
the on.exit() help page stated in its "see also" section:

 \seealso{
 \code{\link{sys.on.exit}} to see the current expression.
 }

May I request that this help page is changed according to the patch
attached below to clarify on the on.exit() help page what it is that
sys.on.exit() is returning?

BDR> You might find

BDR> g <- function(test) {}
BDR> f2 <- function(){
BDR> par.def <- par(no.readonly=TRUE)
BDR> on.exit(par(par.def))
BDR> g(tt <- sys.on.exit())
BDR> str(tt)
BDR> invisible()
BDR> }
BDR> f2()

BDR> illuminating.
Mmh, in this code the function g is not evaluating its argument.  So I
would expect an error message in f2() that tt is not defined no matter
which function (sys.on.exit, ls, ...) I am using in the call to g()
within f().  Exactly the situation about which the R language
definition is warning, so this seems to be a different trap than the
one I stepped into

Cheers,

Berwin

Index: src/library/base/man/on.exit.Rd
===
--- src/library/base/man/on.exit.Rd (revision 36611)
+++ src/library/base/man/on.exit.Rd (working copy)
@@ -19,7 +19,8 @@
 \arguments{
   \item{expr}{an expression to be executed.}
   \item{add}{if TRUE, add \code{expr} to be executed after any previously
-set expressions.}
+set expressions; otherwise (the default) \code{expr} will overwrite
+any previously set expressions.}
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
@@ -27,7 +28,9 @@
   Wadsworth \& Brooks/Cole.
 }
 \seealso{
-  \code{\link{sys.on.exit}} to see the current expression.
+  \code{\link{sys.on.exit}} which returns the expression stored for use
+  by \code{on.exit()} in the function in which \code{sys.on.exit()} is
+  evaluated.  
 }
 \examples{
 opar <- par(mai = c(1,1,1,1))
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel