[R] DescTools::Quantile

2024-01-26 Thread Michael Meyer via R-help
oth quantiles are equal to 100! Is this function working or am I not using it correctly? Michael Meyer __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Quantiles of sums of independent discrete random variables

2024-01-25 Thread Michael Meyer via R-help
/10, FUN.VALUE=0 ))) g <- function(s) dnorm(s,mean=0,sd=0.01) cat("\n\n") for(i in 1:5){       cat("Doing convolution ",i,"\n")   g <- convolve(g,f)$density } cat("\nConvolutions finished, plotting density.") s <- seq(0,100,length.out=1024) matplot(s,g(s)

[R] Use of geometric mean .. in good data analysis

2024-01-25 Thread Michael Meyer via R-help
an all asymptotic results no longer apply. Michael Meyer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:/

[R] Quantiles of sums of independent discrete random variables

2024-01-23 Thread Michael Meyer via R-help
how I could approach this problem with the tools of R? Thanks in advance for all replies, Michael Meyer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

[R] Rcpp, function signature

2015-08-27 Thread Michael Meyer via R-help
in by value. However subsequent tests showed that it does affect x. What is going on here? Is sourceCpp rewriting this code in somne fashion?? Michael Meyer __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

[R] triangular matrix inverse

2013-12-03 Thread Michael Meyer
Greetings,   is there an algorithm which computes the inverse of a triangular matrix while being aware of its triangular form?   I know about solve() but this is probably not efficient on a triangular matrix.   Thanks, Michael Meyer [[alternative HTML version deleted

[R] S4 base class

2013-10-17 Thread Michael Meyer
would be a serious drawback to the R class mechanism. Thanks, Michael Meyer __ R-help@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

[R] S4 base class

2013-10-17 Thread Michael Meyer
the derived class? Many thanks  Michael Meyer __ R-help@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

[R] S4 base class

2013-10-17 Thread Michael Meyer
Quote By the way, your use of the syntax D::f and B::f suggests that youapos;re thinking from a C++ point of view.  Thatapos;s very likely to lead to frustration:  the S4 object system is very different from C++.  Methods donapos;t belong to classes, they belong to generics. There is no such

[R] S4 base class

2013-10-17 Thread Michael Meyer
(this),...) The question is the following: How do I refer to the base class object from the derived class? Many thanks    Michael Meyer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] S4 base class

2013-10-17 Thread Michael Meyer
@Martin Morgan, Duncan Murdoch: OK Thanks. I did not understand the callNextMethod. I will investigate this in detail. This is great! Thanks again,   Michael Meyer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] optim evils

2013-10-02 Thread Michael Meyer
? Thanks, Michael Meyer __ R-help@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] error handling

2013-09-26 Thread Michael Meyer
Greetings,   Error handling does not seem to work as expected. When a handler for general conditions is provided in first position in the handler list it will be called regardless of what condition has been signalled.   See sample code, move  condition = function(c){...} to first position in

[R] How to catch errors regarding the hessian in 'optim'

2013-09-26 Thread Michael Meyer
optim # do what you have to do if such is detected } Sorry if this answer seems trivial. Michael Meyer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] optim evils

2013-09-05 Thread Michael Meyer
to destill the code so that reproducible failure of L-BFGS-B occurs and post it here. Michael Meyer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] optim evils

2013-09-04 Thread Michael Meyer
It would take some effort to extract selfcontained code from the mass of code wherein this optimization is embedded. Moreover I would have to obtain permission from my employer to do so. This is not efficient. However some things are evident from the trace log which I have submitted: (a)

[R] optim evils

2013-09-03 Thread Michael Meyer
(as desired) but in the last iteration reverses course and returns a function value much larger than the starting value. What is going on here? All help is much appreciated. Michael Meyer [[alternative HTML version deleted]] __ R-help@r-project.org

[R] plot curve on surface

2012-08-24 Thread Michael Meyer
)   Now I would like to plot the curve z=z(x,x) in red on this surface. How do I do that?   Many thanks,   Michael Meyer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Get the filename from the given path

2012-08-17 Thread Michael Meyer
Do   splits - strsplit(filePath,file://%22,fixed=true)[[1/]] fileName - splits[length(splits)]) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] OO code organization

2012-08-07 Thread Michael Meyer
Greetings,   I found the mistake. As this may be useful to others the details are as follows:   In the source file derived_j/derived_j.R of every derived class the source of the base source(..base/base.R) was included (as you would in C or C++). This file contains the statement

[R] OO code organization

2012-08-06 Thread Michael Meyer
this=derived_j,  jn are not known.   Needless to say this makes the code useless. How can I remedy this evil?   Many thanks,   Michael Meyer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] numerical integration

2012-05-23 Thread Michael Meyer
- numericalDotProductMatrix_M()  print(Dot products, numeric:)  print(B) } testNumericalIntegration() Many thanks, Michael Meyer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] numerical integrals

2012-05-23 Thread Michael Meyer
Greetings,   I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the

[R] C interface

2010-06-18 Thread michael meyer
Greetings, I am trying to call simple C-code from R. I am on Windows XP with RTools installed. The C-function is #include R.h #include Rinternals.h #include Rmath.h #include Rdefines.h // prevent name mangling extern C { SEXP __cdecl test(SEXP s){ SEXP result; PROTECT(result =

[R] C Interface

2010-06-18 Thread michael meyer
Thanks for all replies. I will post the question on R-develop also since eventually I would like to compile more substantial C and C++ code into shared libraries. Michael [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] OOP and passing by value

2010-06-09 Thread michael meyer
Greetings, I love the R system and am sincerely grateful for the great effort the product and contributors are delivering. My question is as follows: I am trying to use S4 style classes but cannot write functions that modify an object because paramter passing is by value. For example I want to

Re: [R] OOP and passing by value

2010-06-09 Thread michael meyer
Thanks to all replies. I was able to get it running with the R.oo package. I hope this reply makes it to the proper thread. Michael [[alternative HTML version deleted]] __ R-help@r-project.org mailing list