Hi there; I am a neophyte to R though I have been messing around with programming in other languages and environments for some years (my dog's name is punchcard to give you some idea of how many years). I have been trying to make a package and install it, to no avail. The functions I have written all work as expected (by me, that is). But I cannot get the html help pages to work. The failure appears to be in creating the INDEX file. No matter how carefully I check all of my *.Rd pages, the error message that I have "unbalanced braces" keeps showing up. I cannot find any error in matching braces. I am using Alpha as the editor, and it identifies mismatched braces - there are none in the *.Rd file. Another aspect of this problem is that the INDEX file only contains one line, that of the first file. However, the html dir has an index file (00Index.html) that contains all of the functions I have documented, but they are all linked to the same identical function web page - the first one. Please give me a hint. There are no mismatched braces as far as I can tell. Even when I try to check a single function and its Rd file, I get the same error message. And there are no other error messages. The package can be attached and the functions work, but the help pages do not. I must be doing something really simple, but very wrong. What are the 5 most common first mistakes some one makes in Rd files? thanks -ph
Hi! If I have similar problem. I first run R CMD check. Then I change to the directory mypackage.Rcheck where R CMD check generated a file mypackage-manual.tex. Then I try to compile the file using latex by myself. In addition I am using a latex error aware editor (texniccenter on windows). When I have the error pinned down in tex file, its usually quite easy to find the corresponding Rd file and then the error in the Rd file. Sincerely Eryk. *********** REPLY SEPARATOR *********** On 6/15/2004 at 3:14 AM Pamela Hall wrote:>>>Hi there; >>> >>>I am a neophyte to R though I have been messing around with programming >>>in other languages and environments for some years (my dog's name is >>>punchcard to give you some idea of how many years). I have been trying >>>to make a package and install it, to no avail. The functions I have >>>written all work as expected (by me, that is). But I cannot get the >>>html help pages to work. >>> >>>The failure appears to be in creating the INDEX file. No matter how >>>carefully I check all of my *.Rd pages, the error message that I have >>>"unbalanced braces" keeps showing up. I cannot find any error in >>>matching braces. I am using Alpha as the editor, and it identifies >>>mismatched braces - there are none in the *.Rd file. >>> >>>Another aspect of this problem is that the INDEX file only contains one >>>line, that of the first file. However, the html dir has an index file >>>(00Index.html) that contains all of the functions I have documented, but >>>they are all linked to the same identical function web page - the first >>>one. >>> >>>Please give me a hint. There are no mismatched braces as far as I can >>>tell. Even when I try to check a single function and its Rd file, I get >>>the same error message. And there are no other error messages. The >>>package can be attached and the functions work, but the help pages do >>>not. >>> >>>I must be doing something really simple, but very wrong. What are the 5 >>>most common first mistakes some one makes in Rd files? >>> >>>thanks >>>-ph >>> >>>______________________________________________ >>>R-help at stat.math.ethz.ch mailing list >>>https://www.stat.math.ethz.ch/mailman/listinfo/r-help >>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlDipl. bio-chem. Eryk Witold Wolski @ MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: wolski at molgen.mpg.de ---W-W---- http://www.molgen.mpg.de/~wolski
Pamela Hall wrote:> Hi there; > > I am a neophyte to R though I have been messing around with programming in other languages and environments for some years (my dog's name is punchcard to give you some idea of how many years). I have been trying to make a package and install it, to no avail. The functions I have written all work as expected (by me, that is). But I cannot get the html help pages to work. > > The failure appears to be in creating the INDEX file. No matter how carefully I check all of my *.Rd pages, the error message that I have "unbalanced braces" keeps showing up. I cannot find any error in matching braces. I am using Alpha as the editor, and it identifies mismatched braces - there are none in the *.Rd file.Have you checked really carefully for "Unbalanced braces"? Many editors Please do so an look whether opening and closing of barces happens in the correct order. Also, watch out for escaped braces and stuff like that. Some appropriate editor might help, but don't rely on it (since it's not the parser itself). Uwe Ligges> Another aspect of this problem is that the INDEX file only contains one line, that of the first file. However, the html dir has an index file (00Index.html) that contains all of the functions I have documented, but they are all linked to the same identical function web page - the first one. > > Please give me a hint. There are no mismatched braces as far as I can tell. Even when I try to check a single function and its Rd file, I get the same error message. And there are no other error messages. The package can be attached and the functions work, but the help pages do not. > > I must be doing something really simple, but very wrong. What are the 5 most common first mistakes some one makes in Rd files? > > thanks > -ph > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Maybe you can show us one of the Rd files that doesn't work, so some one on this list can see what the problem might be? Cheers, Andy> From: Pamela Hall > > >Have you checked really carefully for "Unbalanced braces"? > Many editors Please do so an look whether opening and closing > of barces happens in the correct order. Also, watch out for > escaped braces and stuff like that. Some appropriate editor > might help, but don't rely on it (since it's not the parser itself). > > > >Uwe Ligges > > Yes. Alpha is a good editor, designed for programming and has > a tec mode (and an R/S mode, along with many many others). > It also colourizes everything so its easy to see what you're > doing. I made the skeleton of the Rd file with the prompt() > so I believe I have the correct structure. I have even tried > to build a package of 1 function and 1 Rd file. With 1 Rd > file I can count the braces! I know the file is correct. > > At 10:11 +0200 6/15/04, Wolski wrote: > >Hi! > > > >If I have similar problem. > > > >I first run R CMD check. Then I change to the directory > mypackage.Rcheck where R CMD check generated a file > mypackage-manual.tex. > >Then I try to compile the file using latex by myself. In > addition I am using a latex error aware editor (texniccenter > on windows). > >When I have the error pinned down in tex file, its usually > quite easy to find the corresponding Rd file and then the > error in the Rd file. > > > >Sincerely Eryk. > > > I am not creating latex versions of the help pages. This > package is for a small group of people (about 40) and only > works on a specific set of non-public data, so I'm not trying > to make this package work for everyone. It seems that my > installation of latex is a bit skiddly-whumpus, but I haven't > the time to mess with it now as I have a deadline for the R > package completion. HTML files are sufficient. So, I have > used the option that doesn't make latex files. > > however, the editor I use, alpha, has a tex mode and I've > been using that since it keeps track of matching braces, > indentation and colours text so I know what part of the code it is. > > The problem really isn't one of braces - as I said, I have > tried to build it with a single function and a single Rd > file,and it still gives me the same error. If I build it > with 2 functions and 2 Rd file, then the same error shows up > AND only the first function is indexed and the help page for > the second function points to the help page for the first function. > > I must be doing something else wrong. Its not the braces. > > This is what I have done that may not be right? > > 1. I put all of the Rd files into 1 file with a \eof > separating them. This is how it appears in already built > packages, however, I haven't seen any reference to that in > the R manual. But if I don't do that, R CMD check completely fails. > > 2. What about the functions themselves? I have tried them > as separate files or concatenated into one file. The > functions always appear to have been sourced and are > available in R, but the help pages fail either way. > > 3. \keyword. Very few of my functions really fit into any > of the keyword.db options. I note that there also appears to > be keywords for packages that can be added (eg spatial). Can > I make my own keyword and add it to the keyword.db? > > -ph > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >
YEAH YEAH YEAH!! I got a bunch of functions to install with their help pages and even help.search works!!! The INDEX file is just fine. YEAH YEAH YEAH! This is what I have learned: 1. DO NOT concatenate the *.Rd files. This happens in the installation process. This is probably completely evident to y'all, but since the only working examples one has to look at are already installed packages which have concatenated Rd files...its a wee bit confusing to novices. But NOW, I get it. 2. When one does not concatenate *.Rd files, (and adds a few print lines to R CMD check when messing around to try and figure out what R CMD check is doing...) then the error messages make much more sense and I was able to find errors. And as you suspected there were many more than just a missing bracket. so, now I can mess around with the quality of the package since at least it now EXISTS! ...time for a different subject header. Thank y'all very much. -ph
> From: Pamela Hall > > YEAH YEAH YEAH!! I got a bunch of functions to install with > their help pages and even help.search works!!! The INDEX > file is just fine. YEAH YEAH YEAH! > > This is what I have learned: > > 1. DO NOT concatenate the *.Rd files. This happens in the > installation process. This is probably completely evident to > y'all, but since the only working examples one has to look at > are already installed packages which have concatenated Rd > files...its a wee bit confusing to novices. But NOW, I get it.If you had looked at any of the _source_ package on CRAN (.tar.gz) instead of the installed packages, you will see that the Rd files are one topic per file. Andy> 2. When one does not concatenate *.Rd files, (and adds a > few print lines to R CMD check when messing around to try and > figure out what R CMD check is doing...) then the error > messages make much more sense and I was able to find errors. > And as you suspected there were many more than just a missing bracket. > > so, now I can mess around with the quality of the package > since at least it now EXISTS! > ...time for a different subject header. > > Thank y'all very much. > -ph > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >