NAMESPACE and imports

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

NAMESPACE and imports

Frank Harrell
I am cleaning up the rms package to not export functions not to be called directly by users.  rms uses generic functions defined in other packages.  For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms.  I use:

export(asis,bj,bjplot,bootBCa,bootcov,bootplot,bplot,calibrate,cph,catg,combineRelatedPredictors,confplot,contrast,coxphFit,cph,cr.setup,datadist,effective.df,fastbw,formatNP,gendata,gIndex,GiniMd,Glm,Gls,groupkm,Hazard,hazard.ratio.plot,histdensity,"%ia%",ie.setup,interactions.containing,legend.nomabbrev,lm.pfit,lrm,lrtest,lsp,matinv,matrx,Newlabels,Newlevels,nomogram,num.intercepts,ols,ols.influence,oos.loglik,pantext,Penalty.matrix,Penalty.setup,pentrace,perimeter,perlcode,plot.xmean.ordinaly,pol,pphsm,predab.resample,Predict,psm,rcs,related.predictors,reVector,robcov,Rq,sascode,scored,sensuc,setPb,show.influence,specs,strat,Surv,"[.Surv",survdiffplot,survest,Survival,survplot,univarLR,validate,val.prob,val.probg,val.surv,vif,which.influence)

importFrom(Hmisc)
S3method(anova, rms)
S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols, pphsm, psm, rms, Rq, summary.rms, validate)

When doing R CMD INSTALL I get: [using R 2.15.3]

** preparing package for lazy loading
Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols, pphsm, psm, rms, Rq, summary.rms, validate)")
ERROR: lazy loading failed for package ‘rms’

Any advice appreciated.
Frank
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

hadley wickham
Hi Frank,

The problem is you can't lump together multiple S3 methods.  Instead of:

> S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols,
> pphsm, psm, rms, Rq, summary.rms, validate)

You need

S3method(latex, anova.rms)
S3method(latex, bj)
S3method(latex, cph)

etc.

Hadley

--
Chief Scientist, RStudio
http://had.co.nz/

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

Blaser Nello
In reply to this post by Frank Harrell
Not sure this fixes your problem, but as far as I can know (and can tell from the manual: http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf), importFrom needs to know what functions you are importing [e.g. importFrom(Hmisc, "latex") importFrom(stats, "anova")].


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Frank Harrell
Sent: Freitag, 19. April 2013 16:26
To: [hidden email]
Subject: [R] NAMESPACE and imports

I am cleaning up the rms package to not export functions not to be called directly by users.  rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms.  I use:

export(asis,bj,bjplot,bootBCa,bootcov,bootplot,bplot,calibrate,cph,catg,combineRelatedPredictors,confplot,contrast,coxphFit,cph,cr.setup,datadist,effective.df,fastbw,formatNP,gendata,gIndex,GiniMd,Glm,Gls,groupkm,Hazard,hazard.ratio.plot,histdensity,"%ia%",ie.setup,interactions.containing,legend.nomabbrev,lm.pfit,lrm,lrtest,lsp,matinv,matrx,Newlabels,Newlevels,nomogram,num.intercepts,ols,ols.influence,oos.loglik,pantext,Penalty.matrix,Penalty.setup,pentrace,perimeter,perlcode,plot.xmean.ordinaly,pol,pphsm,predab.resample,Predict,psm,rcs,related.predictors,reVector,robcov,Rq,sascode,scored,sensuc,setPb,show.influence,specs,strat,Surv,"[.Surv",survdiffplot,survest,Survival,survplot,univarLR,validate,val.prob,val.probg,val.surv,vif,which.influence)

importFrom(Hmisc)
S3method(anova, rms)
S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols, pphsm, psm, rms, Rq, summary.rms, validate)

When doing R CMD INSTALL I get: [using R 2.15.3]

** preparing package for lazy loading
Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph,
Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols, pphsm,
psm, rms, Rq, summary.rms, validate)")
ERROR: lazy loading failed for package ‘rms’

Any advice appreciated.
Frank




-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.
______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

Frank Harrell
Right, I should have said import(Hmisc) instead of importFrom(Hmisc), but that does not explain the error message.
Blaser Nello wrote
Not sure this fixes your problem, but as far as I can know (and can tell from the manual: http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf), importFrom needs to know what functions you are importing [e.g. importFrom(Hmisc, "latex") importFrom(stats, "anova")].


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Frank Harrell
Sent: Freitag, 19. April 2013 16:26
To: [hidden email]
Subject: [R] NAMESPACE and imports

I am cleaning up the rms package to not export functions not to be called directly by users.  rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms.  I use:

export(asis,bj,bjplot,bootBCa,bootcov,bootplot,bplot,calibrate,cph,catg,combineRelatedPredictors,confplot,contrast,coxphFit,cph,cr.setup,datadist,effective.df,fastbw,formatNP,gendata,gIndex,GiniMd,Glm,Gls,groupkm,Hazard,hazard.ratio.plot,histdensity,"%ia%",ie.setup,interactions.containing,legend.nomabbrev,lm.pfit,lrm,lrtest,lsp,matinv,matrx,Newlabels,Newlevels,nomogram,num.intercepts,ols,ols.influence,oos.loglik,pantext,Penalty.matrix,Penalty.setup,pentrace,perimeter,perlcode,plot.xmean.ordinaly,pol,pphsm,predab.resample,Predict,psm,rcs,related.predictors,reVector,robcov,Rq,sascode,scored,sensuc,setPb,show.influence,specs,strat,Surv,"[.Surv",survdiffplot,survest,Survival,survplot,univarLR,validate,val.prob,val.probg,val.surv,vif,which.influence)

importFrom(Hmisc)
S3method(anova, rms)
S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols, pphsm, psm, rms, Rq, summary.rms, validate)

When doing R CMD INSTALL I get: [using R 2.15.3]

** preparing package for lazy loading
Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph,
Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols, pphsm,
psm, rms, Rq, summary.rms, validate)")
ERROR: lazy loading failed for package ‘rms’

Any advice appreciated.
Frank




-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.
______________________________________________
[hidden email] 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.
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

Frank Harrell
Now I see it.  S3method() wants two arguments so I need to create multiple S3method() statements for each generic.
Frank
Frank Harrell wrote
Right, I should have said import(Hmisc) instead of importFrom(Hmisc), but that does not explain the error message.
Blaser Nello wrote
Not sure this fixes your problem, but as far as I can know (and can tell from the manual: http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf), importFrom needs to know what functions you are importing [e.g. importFrom(Hmisc, "latex") importFrom(stats, "anova")].


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Frank Harrell
Sent: Freitag, 19. April 2013 16:26
To: [hidden email]
Subject: [R] NAMESPACE and imports

I am cleaning up the rms package to not export functions not to be called directly by users.  rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms.  I use:

export(asis,bj,bjplot,bootBCa,bootcov,bootplot,bplot,calibrate,cph,catg,combineRelatedPredictors,confplot,contrast,coxphFit,cph,cr.setup,datadist,effective.df,fastbw,formatNP,gendata,gIndex,GiniMd,Glm,Gls,groupkm,Hazard,hazard.ratio.plot,histdensity,"%ia%",ie.setup,interactions.containing,legend.nomabbrev,lm.pfit,lrm,lrtest,lsp,matinv,matrx,Newlabels,Newlevels,nomogram,num.intercepts,ols,ols.influence,oos.loglik,pantext,Penalty.matrix,Penalty.setup,pentrace,perimeter,perlcode,plot.xmean.ordinaly,pol,pphsm,predab.resample,Predict,psm,rcs,related.predictors,reVector,robcov,Rq,sascode,scored,sensuc,setPb,show.influence,specs,strat,Surv,"[.Surv",survdiffplot,survest,Survival,survplot,univarLR,validate,val.prob,val.probg,val.surv,vif,which.influence)

importFrom(Hmisc)
S3method(anova, rms)
S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols, pphsm, psm, rms, Rq, summary.rms, validate)

When doing R CMD INSTALL I get: [using R 2.15.3]

** preparing package for lazy loading
Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph,
Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols, pphsm,
psm, rms, Rq, summary.rms, validate)")
ERROR: lazy loading failed for package ‘rms’

Any advice appreciated.
Frank




-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.
______________________________________________
[hidden email] 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.
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

Prof Brian Ripley
On 19/04/2013 19:16, Frank Harrell wrote:
> Now I see it.  S3method() wants two arguments so I need to create multiple
> S3method() statements for each generic.

Sort of.  It actually accepts two or three arguments: see package
'tools' for an example of using three.

> Frank
>
> Frank Harrell wrote
>> Right, I should have said import(Hmisc) instead of importFrom(Hmisc), but
>> that does not explain the error message.
>> Blaser Nello wrote
>>> Not sure this fixes your problem, but as far as I can know (and can tell
>>> from the manual:
>>> http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf), importFrom
>>> needs to know what functions you are importing [e.g. importFrom(Hmisc,
>>> "latex") importFrom(stats, "anova")].
>>>
>>>
>>> -----Original Message-----
>>> From:
>
>>> r-help-bounces@
>
>>>   [mailto:
>
>>> r-help-bounces@
>
>>> ] On Behalf Of Frank Harrell
>>> Sent: Freitag, 19. April 2013 16:26
>>> To:
>
>>> r-help@
>
>>> Subject: [R] NAMESPACE and imports
>>>
>>> I am cleaning up the rms package to not export functions not to be called
>>> directly by users.  rms uses generic functions defined in other packages.
>>> For example there is a latex method in the Hmisc package, and rms has a
>>> latex method for objects of class "anova.rms" so there are anova.rms and
>>> latex.anova.rms functions in rms.  I use:
>>>
>>> export(asis,bj,bjplot,bootBCa,bootcov,bootplot,bplot,calibrate,cph,catg,combineRelatedPredictors,confplot,contrast,coxphFit,cph,cr.setup,datadist,effective.df,fastbw,formatNP,gendata,gIndex,GiniMd,Glm,Gls,groupkm,Hazard,hazard.ratio.plot,histdensity,"%ia%",ie.setup,interactions.containing,legend.nomabbrev,lm.pfit,lrm,lrtest,lsp,matinv,matrx,Newlabels,Newlevels,nomogram,num.intercepts,ols,ols.influence,oos.loglik,pantext,Penalty.matrix,Penalty.setup,pentrace,perimeter,perlcode,plot.xmean.ordinaly,pol,pphsm,predab.resample,Predict,psm,rcs,related.predictors,reVector,robcov,Rq,sascode,scored,sensuc,setPb,show.influence,specs,strat,Surv,"[.Surv",survdiffplot,survest,Survival,survplot,univarLR,validate,val.prob,val.probg,val.surv,vif,which.influence)
>>>
>>> importFrom(Hmisc)
>>> S3method(anova, rms)
>>> S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols,
>>> pphsm, psm, rms, Rq, summary.rms, validate)
>>>
>>> When doing R CMD INSTALL I get: [using R 2.15.3]
>>>
>>> ** preparing package for lazy loading
>>> Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph,
>>> Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols,
>>> pphsm,
>>> psm, rms, Rq, summary.rms, validate)")
>>> ERROR: lazy loading failed for package ‘rms’
>>>
>>> Any advice appreciated.
>>> Frank
>>>
>>>
>>>
>>>
>>> -----
>>> Frank Harrell
>>> Department of Biostatistics, Vanderbilt University
>>> --
>>> View this message in context:
>>> http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html
>>> Sent from the R help mailing list archive at Nabble.com.
>>>
>>> ______________________________________________
>
>>> R-help@
>
>>>   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@
>
>>>   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.
>
>
>
>
>
> -----
> Frank Harrell
> Department of Biostatistics, Vanderbilt University
> --
> View this message in context: http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718p4664744.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.
>


--
Brian D. Ripley,                  [hidden email]
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, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

Santosh-14
Dear Rxperts,
I am trying to use pdflatex from Hmisc, I get the error message. "pdflatex
is not available"... The version of R is
> version

platform       i386-w64-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          15.2
year           2012
month          10
day            26
svn rev        61015
language       R
version.string R version 2.15.2 (2012-10-26)
nickname       Trick or Treat
>

Is it not available anymore? I created a latex file using "tables" package
and am unable to create the pdf file ...

Any suggestions welcome!
Thanks,
Santosh


On Fri, Apr 19, 2013 at 11:30 AM, Prof Brian Ripley
<[hidden email]>wrote:

> On 19/04/2013 19:16, Frank Harrell wrote:
>
>> Now I see it.  S3method() wants two arguments so I need to create multiple
>> S3method() statements for each generic.
>>
>
> Sort of.  It actually accepts two or three arguments: see package 'tools'
> for an example of using three.
>
>
>  Frank
>>
>> Frank Harrell wrote
>>
>>> Right, I should have said import(Hmisc) instead of importFrom(Hmisc), but
>>> that does not explain the error message.
>>> Blaser Nello wrote
>>>
>>>> Not sure this fixes your problem, but as far as I can know (and can tell
>>>> from the manual:
>>>> http://cran.r-project.org/doc/**manuals/r-release/R-exts.pdf<http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf>),
>>>> importFrom
>>>> needs to know what functions you are importing [e.g. importFrom(Hmisc,
>>>> "latex") importFrom(stats, "anova")].
>>>>
>>>>
>>>> -----Original Message-----
>>>> From:
>>>>
>>>
>>  r-help-bounces@
>>>>
>>>
>>    [mailto:
>>>>
>>>
>>  r-help-bounces@
>>>>
>>>
>>  ] On Behalf Of Frank Harrell
>>>> Sent: Freitag, 19. April 2013 16:26
>>>> To:
>>>>
>>>
>>  r-help@
>>>>
>>>
>>  Subject: [R] NAMESPACE and imports
>>>>
>>>> I am cleaning up the rms package to not export functions not to be
>>>> called
>>>> directly by users.  rms uses generic functions defined in other
>>>> packages.
>>>> For example there is a latex method in the Hmisc package, and rms has a
>>>> latex method for objects of class "anova.rms" so there are anova.rms and
>>>> latex.anova.rms functions in rms.  I use:
>>>>
>>>> export(asis,bj,bjplot,bootBCa,**bootcov,bootplot,bplot,**
>>>> calibrate,cph,catg,**combineRelatedPredictors,**
>>>> confplot,contrast,coxphFit,**cph,cr.setup,datadist,**
>>>> effective.df,fastbw,formatNP,**gendata,gIndex,GiniMd,Glm,Gls,**
>>>> groupkm,Hazard,hazard.ratio.**plot,histdensity,"%ia%",ie.**
>>>> setup,interactions.containing,**legend.nomabbrev,lm.pfit,lrm,**
>>>> lrtest,lsp,matinv,matrx,**Newlabels,Newlevels,nomogram,**
>>>> num.intercepts,ols,ols.**influence,oos.loglik,pantext,**
>>>> Penalty.matrix,Penalty.setup,**pentrace,perimeter,perlcode,**
>>>> plot.xmean.ordinaly,pol,pphsm,**predab.resample,Predict,psm,**
>>>> rcs,related.predictors,**reVector,robcov,Rq,sascode,**
>>>> scored,sensuc,setPb,show.**influence,specs,strat,Surv,"[.**
>>>> Surv",survdiffplot,survest,**Survival,survplot,univarLR,**
>>>> validate,val.prob,val.probg,**val.surv,vif,which.influence)
>>>>
>>>> importFrom(Hmisc)
>>>> S3method(anova, rms)
>>>> S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols,
>>>> pphsm, psm, rms, Rq, summary.rms, validate)
>>>>
>>>> When doing R CMD INSTALL I get: [using R 2.15.3]
>>>>
>>>> ** preparing package for lazy loading
>>>> Error : c("bad 'S3method' directive: S3method(latex, anova.rms, bj, cph,
>>>> Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:     ols,
>>>> pphsm,
>>>> psm, rms, Rq, summary.rms, validate)")
>>>> ERROR: lazy loading failed for package ‘rms’
>>>>
>>>> Any advice appreciated.
>>>> Frank
>>>>
>>>>
>>>>
>>>>
>>>> -----
>>>> Frank Harrell
>>>> Department of Biostatistics, Vanderbilt University
>>>> --
>>>> View this message in context:
>>>> http://r.789695.n4.nabble.com/**NAMESPACE-and-imports-**tp4664718.html<http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html>
>>>> Sent from the R help mailing list archive at Nabble.com.
>>>>
>>>> ______________________________**________________
>>>>
>>>
>>  R-help@
>>>>
>>>
>>    mailing list
>>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>> ______________________________**________________
>>>>
>>>
>>  R-help@
>>>>
>>>
>>    mailing list
>>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>
>>
>>
>>
>> -----
>> Frank Harrell
>> Department of Biostatistics, Vanderbilt University
>> --
>> View this message in context: http://r.789695.n4.nabble.com/**
>> NAMESPACE-and-imports-**tp4664718p4664744.html<http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718p4664744.html>
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________**________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> --
> Brian D. Ripley,                  [hidden email]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~**ripley/<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, UK                Fax:  +44 1865 272595
>
>
> ______________________________**________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
        [[alternative HTML version deleted]]


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: NAMESPACE and imports

Jeff Newmiller
Please don't hijack a thread... start a new one with a new subject.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

Santosh <[hidden email]> wrote:

>Dear Rxperts,
>I am trying to use pdflatex from Hmisc, I get the error message.
>"pdflatex
>is not available"... The version of R is
>> version
>
>platform       i386-w64-mingw32
>arch           i386
>os             mingw32
>system         i386, mingw32
>status
>major          2
>minor          15.2
>year           2012
>month          10
>day            26
>svn rev        61015
>language       R
>version.string R version 2.15.2 (2012-10-26)
>nickname       Trick or Treat
>>
>
>Is it not available anymore? I created a latex file using "tables"
>package
>and am unable to create the pdf file ...
>
>Any suggestions welcome!
>Thanks,
>Santosh
>
>
>On Fri, Apr 19, 2013 at 11:30 AM, Prof Brian Ripley
><[hidden email]>wrote:
>
>> On 19/04/2013 19:16, Frank Harrell wrote:
>>
>>> Now I see it.  S3method() wants two arguments so I need to create
>multiple
>>> S3method() statements for each generic.
>>>
>>
>> Sort of.  It actually accepts two or three arguments: see package
>'tools'
>> for an example of using three.
>>
>>
>>  Frank
>>>
>>> Frank Harrell wrote
>>>
>>>> Right, I should have said import(Hmisc) instead of
>importFrom(Hmisc), but
>>>> that does not explain the error message.
>>>> Blaser Nello wrote
>>>>
>>>>> Not sure this fixes your problem, but as far as I can know (and
>can tell
>>>>> from the manual:
>>>>>
>http://cran.r-project.org/doc/**manuals/r-release/R-exts.pdf<http://cran.r-project.org/doc/manuals/r-release/R-exts.pdf>),
>>>>> importFrom
>>>>> needs to know what functions you are importing [e.g.
>importFrom(Hmisc,
>>>>> "latex") importFrom(stats, "anova")].
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From:
>>>>>
>>>>
>>>  r-help-bounces@
>>>>>
>>>>
>>>    [mailto:
>>>>>
>>>>
>>>  r-help-bounces@
>>>>>
>>>>
>>>  ] On Behalf Of Frank Harrell
>>>>> Sent: Freitag, 19. April 2013 16:26
>>>>> To:
>>>>>
>>>>
>>>  r-help@
>>>>>
>>>>
>>>  Subject: [R] NAMESPACE and imports
>>>>>
>>>>> I am cleaning up the rms package to not export functions not to be
>>>>> called
>>>>> directly by users.  rms uses generic functions defined in other
>>>>> packages.
>>>>> For example there is a latex method in the Hmisc package, and rms
>has a
>>>>> latex method for objects of class "anova.rms" so there are
>anova.rms and
>>>>> latex.anova.rms functions in rms.  I use:
>>>>>
>>>>> export(asis,bj,bjplot,bootBCa,**bootcov,bootplot,bplot,**
>>>>> calibrate,cph,catg,**combineRelatedPredictors,**
>>>>> confplot,contrast,coxphFit,**cph,cr.setup,datadist,**
>>>>> effective.df,fastbw,formatNP,**gendata,gIndex,GiniMd,Glm,Gls,**
>>>>> groupkm,Hazard,hazard.ratio.**plot,histdensity,"%ia%",ie.**
>>>>> setup,interactions.containing,**legend.nomabbrev,lm.pfit,lrm,**
>>>>> lrtest,lsp,matinv,matrx,**Newlabels,Newlevels,nomogram,**
>>>>> num.intercepts,ols,ols.**influence,oos.loglik,pantext,**
>>>>> Penalty.matrix,Penalty.setup,**pentrace,perimeter,perlcode,**
>>>>> plot.xmean.ordinaly,pol,pphsm,**predab.resample,Predict,psm,**
>>>>> rcs,related.predictors,**reVector,robcov,Rq,sascode,**
>>>>> scored,sensuc,setPb,show.**influence,specs,strat,Surv,"[.**
>>>>> Surv",survdiffplot,survest,**Survival,survplot,univarLR,**
>>>>> validate,val.prob,val.probg,**val.surv,vif,which.influence)
>>>>>
>>>>> importFrom(Hmisc)
>>>>> S3method(anova, rms)
>>>>> S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete,
>ols,
>>>>> pphsm, psm, rms, Rq, summary.rms, validate)
>>>>>
>>>>> When doing R CMD INSTALL I get: [using R 2.15.3]
>>>>>
>>>>> ** preparing package for lazy loading
>>>>> Error : c("bad 'S3method' directive: S3method(latex, anova.rms,
>bj, cph,
>>>>> Glm, Gls, lrm, naprint.delete, ", "bad 'S3method' directive:    
>ols,
>>>>> pphsm,
>>>>> psm, rms, Rq, summary.rms, validate)")
>>>>> ERROR: lazy loading failed for package �rms�
>>>>>
>>>>> Any advice appreciated.
>>>>> Frank
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> Frank Harrell
>>>>> Department of Biostatistics, Vanderbilt University
>>>>> --
>>>>> View this message in context:
>>>>>
>http://r.789695.n4.nabble.com/**NAMESPACE-and-imports-**tp4664718.html<http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718.html>
>>>>> Sent from the R help mailing list archive at Nabble.com.
>>>>>
>>>>> ______________________________**________________
>>>>>
>>>>
>>>  R-help@
>>>>>
>>>>
>>>    mailing list
>>>>>
>https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>>> PLEASE do read the posting guide
>>>>>
>http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>> ______________________________**________________
>>>>>
>>>>
>>>  R-help@
>>>>>
>>>>
>>>    mailing list
>>>>>
>https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>>> PLEASE do read the posting guide
>>>>>
>http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>>
>>>>
>>>
>>>
>>>
>>>
>>> -----
>>> Frank Harrell
>>> Department of Biostatistics, Vanderbilt University
>>> --
>>> View this message in context: http://r.789695.n4.nabble.com/**
>>>
>NAMESPACE-and-imports-**tp4664718p4664744.html<http://r.789695.n4.nabble.com/NAMESPACE-and-imports-tp4664718p4664744.html>
>>> Sent from the R help mailing list archive at Nabble.com.
>>>
>>> ______________________________**________________
>>> [hidden email] mailing list
>>>
>https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>> PLEASE do read the posting guide http://www.R-project.org/**
>>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>
>> --
>> Brian D. Ripley,                  [hidden email]
>> Professor of Applied Statistics,
>http://www.stats.ox.ac.uk/~**ripley/<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, UK                Fax:  +44 1865 272595
>>
>>
>> ______________________________**________________
>> [hidden email] mailing list
>>
>https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> [[alternative HTML version deleted]]
>
>
>
>------------------------------------------------------------------------
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.