[R] Rd files Assignment functions.

Jason Turner jasont at indigoindustrial.co.nz
Tue Dec 16 10:35:04 CET 2003


wolski wrote (using a mail client that doesn't wrap lines):
...
> Cannot handle Rd file names containing '<'.
> These are not legal file names on all R platforms.
> Please rename the following files and try again:
>   man/[[<-.caliblist.Rd
>   man/[<-.massvectorlist.Rd
>   man/[[<-.massvectorlist.Rd
> 
> 
> Ok. It does not work.
> 
> So I renamed the file "[<-.massvectorlist.Rd" in test.Rd  And replaced the 
> name and first alias field
> 
> \name{test}
> \alias{test}
> \alias{[<-.massvectorlist}
> \title{ Replace Parts of Massvectorlist}
> ....
> 
> Now a "test" entry appears in the 00Index.html but ...Of course I can give a 
> more appropriate name but...
> But unfortunately all \link to [<-. in the \seealso section does not work than either.
> Why no [<-.massvectorlist entry appears in the 00Index.html file?
> Even if i put [<-.massvector as second alias?
> 
> Is there a way to get assignments work as other functions? 
> Or is the best solution to give a name like Assign.massvector to the Rd 
> file the name and the first \alias?

For problems like this, it's often good to see how R-core dealt with it. 
  In {path to R}/library/base/man/base.Rd ...

...
\name{Extract}
\title{Extract or Replace Parts of an Object}
\alias{Extract}
\alias{Subscript}
\alias{[}
\alias{[[}
\alias{$}
\alias{[<-}
\alias{[[<-}
...

In the base package, [, [[, and $ appear in 00Index.html, and [<- and 
[[<- don't.  I haven't seen any documentation as to why that might be, 
but I don't think it's a disaster, since help("[<-") works fine.  (If I 
had to guess -- dangerous -- I'd say the reason has something to do with 
the fact that html comments often look like this: <!-- comment --> ).

So, yes, I'd say use a special "category" name for your extract and 
assignment functions, \alias them with the actual function names, and 
don't expect the assignment functions to appear directly in the html 
version.

Cheers

Jason

-- 
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
jasont at indigoindustrial.co.nz




More information about the R-help mailing list