boost-R / gamboostLSS

Boosting models for fitting generalized additive models for location, shape and scale (GAMLSS) to potentially high dimensional data. The current relase version can be found on CRAN (https://cran.r-project.org/package=gamboostLSS).
26 stars 11 forks source link

example code in families.Rd failes #53

Closed sbrockhaus closed 5 years ago

sbrockhaus commented 5 years ago

For me, devtools::run_examples() fails for families.Rd, with

## families object for new distribution
newStudentT <- Families(mu= newStudentTMu(mu=mu, df=df),
                        df=newStudentTDf(mu=mu, df=df))

#  Error in body(x@response) : 
#   trying to get slot "response" from an object of a basic class ("function") with no slots

To be honest, I am not into Families. So can someone else please check?

PS: I run on: R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) gamboostLSS_2.0-1

mayrandy commented 5 years ago

Thanks! I'll take a look into this...

mayrandy commented 5 years ago

I did have some problems replicating this - for me everything worked fine.

However, then I loaded the 'gamlss' package

The following object is masked from ‘package:mboost’:

    Family

which then leads to the error. So this a problem that only occurs when tha 'gamlss' package is loaded after 'gamboostLSS' and therefore 'mboost' as Family() exists both in 'gamlss.dist' and 'mboost'.

mayrandy commented 5 years ago

I just fix that by using mboost::Family in the examples -> that is not a very elegant way but solves the problem...

sbrockhaus commented 5 years ago

thank you very much. yes, I had loaded the gamlss package as well. old mistake I should have started a completely empty R session and check again...