Re: [Rd] \link{} to help pages in Debian

2004-12-01 Thread Iago Mosqueira
On Wed, 2004-12-01 at 07:38, Prof Brian Ripley wrote:

 That's guaranteed by the R install scripts, just by following `Writing R 
 Extensions'.  *If* it is not working for you, you are doing something 
 which you are not telling us.

Well, I am simply following as much as my, probably limited,
understanding allows. I am using a stock Debian install, r-base and
other packages from debian, and extra packages from CRAN. My package
follows, as far as I can tell, the manual. If I am doing something else
I am not conscious of it.

 Ah, but that is not what you actually said (an example of the lack of 
 clarity).

At least that´s what I tried to do. 

 I still don't know if you are imagining that there might be a problem that 
 you want to write a package to avoid, or that you have a current problem. 

I´ll rather use my imagination for something else. This is a problem
with my own package, that in fact passes R CMD check.

 If the latter, please start again with the full details: which packages, 
 the commands you used to install them, what happens and what the links in 
 the html file concerned are.

Here we go: The package concerned is my own, which passes check fine. I
include \code{\link{plot.default}} in a help page. After R CMD INSTALL
this page gets installed in

 /usr/local/lib/R/site-library/mypackage/html/page.html 
and when clicking on the plot.default link, it points to

 /usr/local/lib/R/site-library/graphics/html/plotdefault.html

 instead of

/usr/lib/R/library/graphics/html/plotdefault.html

where in fact lives.

Both locations appear with .libPaths().

Any other information that can be of help?

Cheers,


Iago Mosqueira

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] \link{} to help pages in Debian

2004-12-01 Thread Prof Brian Ripley
On Wed, 1 Dec 2004, Iago Mosqueira wrote:
On Wed, 2004-12-01 at 07:38, Prof Brian Ripley wrote:
That's guaranteed by the R install scripts, just by following `Writing R
Extensions'.  *If* it is not working for you, you are doing something
which you are not telling us.
Well, I am simply following as much as my, probably limited,
understanding allows. I am using a stock Debian install, r-base and
other packages from debian, and extra packages from CRAN. My package
follows, as far as I can tell, the manual. If I am doing something else
I am not conscious of it.
Ah, but that is not what you actually said (an example of the lack of
clarity).
At least that´s what I tried to do.
I still don't know if you are imagining that there might be a problem that
you want to write a package to avoid, or that you have a current problem.
I´ll rather use my imagination for something else. This is a problem
with my own package, that in fact passes R CMD check.
If the latter, please start again with the full details: which packages,
the commands you used to install them, what happens and what the links in
the html file concerned are.
Here we go: The package concerned is my own, which passes check fine. I
include \code{\link{plot.default}} in a help page. After R CMD INSTALL
this page gets installed in
/usr/local/lib/R/site-library/mypackage/html/page.html
and when clicking on the plot.default link, it points to
/usr/local/lib/R/site-library/graphics/html/plotdefault.html
instead of
/usr/lib/R/library/graphics/html/plotdefault.html
where in fact lives.
Both locations appear with .libPaths().
Any other information that can be of help?
I asked for  `what the links in the html file concerned are', so, yes, the 
information I asked for would help.

It should be a relative link like
codea href=../../stats/html/optim.htmloptim/a/code
Under Linux, all HTML links are created to the per-session directory and 
not to the original locations.

I think you are expecting to be able to open the installed html file 
directly in a browser and get the links to work.  That's what you have not 
told us you were doing, and you won't find it documented anywhere in the R 
documentation.  (Ironically, it does work under Windows with a separate 
library tree.)

To view R HTML documentation you need to use help.start().  (Otherwise
help(foo, htmlhelp=TRUE) will warn about possible incorrect links.)
Try the documented way
Start R
help.start()
help(page)
and the links will be correct, I am pretty sure.
--
Brian D. Ripley,  [EMAIL PROTECTED]
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__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] \link{} to help pages in Debian

2004-12-01 Thread Iago Mosqueira
On Wed, 2004-12-01 at 08:24, Prof Brian Ripley wrote:

 Under Linux, all HTML links are created to the per-session directory and 
 not to the original locations.

This is the key, many thanks. Maybe a mention of the mechanism on the
administration manual could be of help?

 I think you are expecting to be able to open the installed html file 
 directly in a browser and get the links to work.  

Indeed.

  and you won't find it documented anywhere in the R 
 (Ironically, it does work under Windows with a separate 
 library tree.)

That irony was puzzling me, of course. That was the reason I mentioned a
non-Debian install.

 and the links will be correct, I am pretty sure.

Not all of them. help-links.sh has problems with the permission of,
among others /usr/lib/R/doc/html/R.css. But this might be, this time, a
debian installation problem.


Cheers,


Iago

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] \link{} to help pages in Debian

2004-11-30 Thread Prof Brian Ripley
On Mon, 29 Nov 2004, Iago Mosqueira wrote:
On Mon, 2004-11-29 at 09:20, Martin Maechler wrote:
not at all!
We have been working with several libraries forever,
and I think I have n't seen your problem ever.
I have detected it only in one package, which happens to conatin links
to base and graphics. It seems they are generated at install time simply
by assuming the root of all packages is the same.
Yes, and it is true as they are all linked to the same tree when 
help.start is run.  You do need the alternative trees to be in your 
.libPath() at that time.

Obviously this is not a problem in Windows, where all packages appear to
be installed, at least by default, in the same tree.
Only by default, just as by default they are under Linux, so `obviously' 
you don't know what happens under either.  Is Windows relevant here (the 
picture is a lot more complicated there)?

--
Brian D. Ripley,  [EMAIL PROTECTED]
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
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] \link{} to help pages in Debian

2004-11-29 Thread Martin Maechler
 Iago == Iago Mosqueira [EMAIL PROTECTED]
 on Mon, 29 Nov 2004 08:41:03 + writes:

Iago Hello,
Iago In my Debian 3.0 systems, packages are installed in two different
Iago places, namely /usr/lib/R/library and /usr/local/lib/R/site-library,
Iago depending on whether they come from debian packages or CRAN ones. Help
Iago pages for my own packages, installed in the second location, cannot 
find
Iago help pages from, for example, the base package via \link{}. I also 
tried
Iago specifying the package with \link[pkg]{page}.

Iago Is the only solution to force the system to use a single library 
folder?

not at all!
We have been working with several libraries forever,
and I think I have n't seen your problem ever.

For instance, I never install extra packages into the standard
library (the one where base is in); have all CRAN packages in
one library, bioconductor in another library, etc,etc.

Iago Can I force the help system to look in both places?

Actually you forgot to specify which interface to the help system
you are using.  But I assume you mean the help.start()
{webbrowser-HTML} one (which I very rarely use, since ESS and
C-c C-v is faster; to  follow links in ESS help buffers, after
selection, often h  Return is sufficient -- ah reminds me
of an ESS improvement  I've wanted to implement...)

For me, help.start() works fine including links between pages
from packages in different libraries.

Martin

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] \link{} to help pages in Debian

2004-11-29 Thread Iago Mosqueira
On Mon, 2004-11-29 at 09:20, Martin Maechler wrote:

 not at all!
 We have been working with several libraries forever,
 and I think I have n't seen your problem ever.

I have detected it only in one package, which happens to conatin links
to base and graphics. It seems they are generated at install time simply
by assuming the root of all packages is the same.

Obviously this is not a problem in Windows, where all packages appear to
be installed, at least by default, in the same tree.

 Actually you forgot to specify which interface to the help system
 you are using.  But I assume you mean the help.start()

Yes, indeed, sorry about that.

 C-c C-v is faster; to  follow links in ESS help buffers, after

Umm, maybe I need R help in vimhelp format...

 For me, help.start() works fine including links between pages
 from packages in different libraries.

Do you know of any other example I could check where a help page in one
package contains a link to another package?


Cheers,


Iago

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] \link{} to help pages in Debian

2004-11-28 Thread Iago Mosqueira
Hello,

In my Debian 3.0 systems, packages are installed in two different
places, namely /usr/lib/R/library and /usr/local/lib/R/site-library,
depending on whether they come from debian packages or CRAN ones. Help
pages for my own packages, installed in the second location, cannot find
help pages from, for example, the base package via \link{}. I also tried
specifying the package with \link[pkg]{page}.

Is the only solution to force the system to use a single library folder?
Can I force the help system to look in both places?

Thanks


Iago Mosqueira

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel