You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(distributions)
#> #> Attaching package: 'distributions'#> The following objects are masked from 'package:stats':#> #> Gamma, quantile#> The following object is masked from 'package:grDevices':#> #> pdfdistributions::Bernoulli()
#> Bernoulli distribution (p = 0.5)distributions::Beta()
#> Beta distribution (alpha = 1, beta = 1)distributions::Binomial()
#> Error in distributions::Binomial(): argument "size" is missing, with no defaultdistributions::Cauchy()
#> Cauchy distribution (location = 0, scale = 1)distributions::ChiSquare()
#> Error in distributions::ChiSquare(): argument "df" is missing, with no defaultdistributions::Exponential()
#> Exponential distribution (rate = 1)distributions::FisherF()
#> Error in distributions::FisherF(): argument "df1" is missing, with no defaultdistributions::Gamma()
#> Error in distributions::Gamma(): argument "shape" is missing, with no defaultdistributions::Geometric()
#> Geometric distribution (p = 0.5)distributions::HyperGeometric()
#> Error in distributions::HyperGeometric(): argument "m" is missing, with no defaultdistributions::Logistic()
#> Logistic distribution (location = 0, scale = 1)distributions::LogNormal()
#> Lognormal distribution (log_mu = 0, log_sigma = 1)distributions::Multinomial()
#> Error in distributions::Multinomial(): argument "size" is missing, with no defaultdistributions::NegativeBinomial()
#> Error in distributions::NegativeBinomial(): argument "size" is missing, with no defaultdistributions::Normal()
#> Normal distribution (mu = 0, sigma = 1)distributions::Poisson()
#> Error in distributions::Poisson(): argument "lambda" is missing, with no defaultdistributions::StudentsT()
#> Error in distributions::StudentsT(): argument "df" is missing, with no defaultdistributions::Tukey()
#> Error in distributions::Tukey(): argument "nmeans" is missing, with no defaultdistributions::Uniform()
#> Continuous Uniform distribution (a = 0, b = 1)distributions::Weibull()
#> Error in distributions::Weibull(): argument "shape" is missing, with no default
I think there's two options here - give every distribution a sensible default or allow distributions be initialised without any parameters. This way users (and learners) have to be explicit about the distribution they want when they create it. It's slightly less user-friendly but I think has long term benefits (for learners and code bases).
Created on 2019-06-27 by the reprex package (v0.3.0)
Is this intentional? do we want to provide a sensible default to ensure consistent behavior?
The text was updated successfully, but these errors were encountered: