Forum: help
Monitor Forum | Start New ThreadRE: q function in distr package [ Reply ] By: Peter Ruckdeschel on 2017-11-19 17:55 | [forum:45469] |
This has been answered off list Jan 21 2016; for completeness, I am filling my answer from Jan 2016 to this forum: Hi Laurie, usage of our accessor q() for arguments of class distribution is a bit of a problem in RStudio, because they catch calls to q() and treat them separately. I talked to them in this issue, but they refused to allow to overload q() as a method [which per se is allowed in R], so we cannot do much about this. That said, distr::q should work --- try this: require(distr) N <- Norm() distr::q(N)(0.4) ## ## and for distr-2.6 # q.l(N)(0.4) In addition, from distr-2.6 onward, there are synonyma p.r and q.l for accessors p, q for slots p and q of distributions. p.r and q.l are to complement the left [right] continuous variants p.l and q.r, which have been there for a while --- you might know that p and q always have been the right [left] continuous variants as is standard in most textbooks nowadays, so names p.r and q.l are just a little more specific than their still valid synonyma p and q, and, in addition, will not cause problems in RStudio. I hope this helps, best regards, Peter |
q function in distr package [ Reply ] By: Laurie Berrie on 2016-01-21 10:48 | [forum:45466] |
Hi there, I am having some issues using the q function in distr as this is also used to quit R. I was wondering if there is a work around to this. I have tried using distr:: to specify the package and embedding it in another function but neither of these have proved successful. Any help would be greatly appreciated. Many thanks, Laurie |