[R] \dQuote in packages

Duncan Murdoch murdoch at stats.uwo.ca
Mon Jul 13 22:22:49 CEST 2009


On 7/13/2009 3:27 PM, Rebecca Sela wrote:
> Thank you!  (That was easy to fix.)
> 
> How does one deal with quoting (in \reference)?  The following line causes problems:
> \references{Sela, Rebecca J., and Simonoff, Jeffrey S., \dQuote{RE-EM Trees: A New Data Mining Approach for Longitudinal Data}.}
> The error given is:
> Warning in parse_Rd("./man/predict.Rd", encoding = "unknown") :
>   ./man/predict.Rd:28: unknown macro '\dquote'
> *** error on file ./man/predict.Rd
> Error : ./man/predict.Rd:28: Unrecognized macro \dquote
> 
> The manual for writing R packages said I should not just use the character ".  What should I be using here?

Are you sure you showed us the right line?  The error message says 
"\dquote", but the line contains "\dQuote".  \dquote is wrong, \dQuote 
is fine.

Duncan Murdoch

> 
> Thanks again!
> 
> Rebecca
> 
> 
> 
> ----- Original Message -----
> From: "Uwe Ligges" <ligges at statistik.tu-dortmund.de>
> To: "Rebecca Sela" <rsela at stern.nyu.edu>
> Cc: "r-help" <r-help at r-project.org>
> Sent: Friday, July 10, 2009 8:17:44 PM GMT -05:00 US/Canada Eastern
> Subject: Re: [R] \dQuote in packages
> 
> 
> 
> Rebecca Sela wrote:
>> Here is one Rd file with problems, now inline so that it can be read:
>> 
>> \name{simpleREEMdata}
>> \docType{data}
>> \alias{simpleREEMdata}
>> \title{Sample Data for RE-EM trees}
>> \description{
>> This data set is consists of a panel of 50 individuals with 12 observations per individual.  The data is based on a regression tree with an initial split based on a dummy variable (\code{D}) and a second split based on time in the branch where \code{D=1}.  The observations include both randomly generated individual-specific effects and observation-specific errors.
>> }
>> \format{
>> The data has 600 rows and 5 columns.  The columns are: 
> 
> insert here:
> 
> \itemize{
> 
>> \item{\code{Y}}{the target variable}
>> \item{\code{t}}{a numeric predictor ("time")}
>> \item{\code{D}}{a catergorical predictor with two levels, 0 and 1}
>> \item{\code{ID}}{the identifier for each individual}
>> \item{\code{X}}{another covariate (which is intentionally unrelated to the target variable)}
> 
> insert here:
> 
> }
> 
> 
> or in other words, you need an itemize environment in order to use \item 
> within \format, see the manual Writing R Extensions.
> 
> Best,
> Uwe
> 
> 
>> }
>> \references{Sela, Rebecca J., and Simonoff, Jeffrey S., \dQuote{RE-EM Trees: A New Data Mining Approach for Longitudinal Data}.}
>> \keyword{datasets}
>> 
>> Thanks again for your help!
>> 
>> Rebecca
>> 
>> ----- Original Message -----
>> From: "Uwe Ligges" <ligges at statistik.tu-dortmund.de>
>> To: "Rebecca Sela" <rsela at stern.nyu.edu>
>> Cc: "r-help" <r-help at r-project.org>
>> Sent: Thursday, July 9, 2009 6:05:46 AM GMT -05:00 US/Canada Eastern
>> Subject: Re: [R] \dQuote in packages
>> 
>> Rebecca,
>> 
>> the attachments have been stripped off by the mailing list.
>> 
>> 
>> Rebecca Sela wrote:
>>> That's good to know.  I have attached three Rd files that gave errors (others gave identical errors).  I would love to know what is wrong with them.
>>>
>>> I'm using 2.1.1 because that is what is installed on the Linux computer I have access to.  (I haven't bothered figuring out how to assemble a package in Windows.)
>> 
>> You should *really* upgrade! That version is outdated for several years now.
>> 
>> How to do it on Windows: See the R Installation and Administration 
>> manual with its corresponding section.
>> 
>> Best,
>> Uwe
>> 
>> 
>>> Thank you for your help!
>>>
>>> Rebecca
>>>
>>>
>>> ----- Original Message -----
>>> From: "Uwe Ligges" <ligges at statistik.tu-dortmund.de>
>>> To: "Rebecca Sela" <rsela at stern.nyu.edu>
>>> Cc: "r-help" <r-help at r-project.org>
>>> Sent: Wednesday, July 8, 2009 6:11:33 PM GMT -05:00 US/Canada Eastern
>>> Subject: Re: [R] \dQuote in packages
>>>
>>> The difference you are experiencing is the new Rd2 parser that is more 
>>> picky now (but also prevents to produce wrong documentation files).
>>>
>>> If you make the code of the Rd available, someone might be able to help.
>>>
>>> Are you really under R-2.1.1 ??? That is really ancient!
>>>
>>>
>>> Best,
>>> Uwe Ligges
>>>
>>>
>>>
>>> Rebecca Sela wrote:
>>>> I am in the process of submitting a package to CRAN.  R CMD check ran successfully on the package on my local computer, using R version 2.1.1.  However, on the computers for CRAN (with version 2.10.0), the following errors occurred:
>>>>
>>>> Warning in parse_Rd("./man/predict.Rd", encoding = "unknown") :
>>>>   ./man/predict.Rd:28: unknown macro '\dquote'
>>>> *** error on file ./man/predict.Rd
>>>> Error : ./man/predict.Rd:28: Unrecognized macro \dquote
>>>> Warning in parse_Rd("./man/print.Rd", encoding = "unknown") :
>>>>   ./man/print.Rd:17: unexpected UNKNOWN '\sideeffects'
>>>> Warning in parse_Rd("./man/simpleREEMdata.Rd", encoding = "unknown") :
>>>>   ./man/simpleREEMdata.Rd:10: unknown macro '\item'
>>>>
>>>> Are \dquote, \sideeffects, and \item not supported in newer versions of R?  Is there some underlying problem that I should fix that makes these show up?
>>>>
>>>> Thank you very much.
>>>>
>>>> Rebecca
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list