[R] Package design, placement of legacy functions
I have a function XOLD() from a nearly verbatim port of legacy FORTRAN in a package. I have remplemented this function as XNEW() using much cleaner native R and built-in functions of R. I have switched the package to the XNEW(), but for historical reasons would like to retain the XOLD() somewhere in the package directory structure. An assertion through a README or other will point to this historical function and the output from the two should be numerically equal. Placement in package/R is not an option as XOLD() no longer constitutes a true user level function, would package/inst/legacyR or something like that be suitable to the R community? Thanks for the guidance. . . William __ R-help@stat.math.ethz.ch 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.
Re: [R] Help for L-moment Ratio Diagram
Amina, If you can follow this code, you will see that the black dots scatter around an L-skew of zero and L-kurtosis of 0.122602, which are the theoretical L-moments of the standard normal distribution. library(lmomco) lmrdia - lmrdia() plotlmrdia(lmrdia,ylim=c(-.2,.2),xlim=c(-.2,.2)) lms - lmoms(rnorm(500)) points(lms$ratios[3],lms$ratios[4],pch=16) lms - lmoms(rnorm(500)) points(lms$ratios[3],lms$ratios[4],pch=16) lms - lmoms(rnorm(500)) points(lms$ratios[3],lms$ratios[4],pch=16) lms - lmoms(rnorm(500)) points(lms$ratios[3],lms$ratios[4],pch=16) Further interpretion of the diagram is well documented in Hosking's 1990 paper and the references shown on the help page. William On Dec 4, 2006, at 12:05 PM, Eric Thompson wrote: I think there are a few packages for doing this. I have used lmomco: the function lmom.ub() will calculate the sample lmoments, and lmrdia() gives theoretical lmoments for different distributions. Hope this is helpful. Eric On 12/4/06, amna khan [EMAIL PROTECTED] wrote: Respected Sir I have to select a probability distribution using L-moment Ratio Diagram. I am not understanding how to plot sample TAU3 and TUA4 on L-moment Ratio Diagram. Please Guide me Best Regards -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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@stat.math.ethz.ch 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] End-of-Line Problems
I am teaching grad/undergrad course in which I am introducting students to R as a side topic; however, I am simultaneously supporting Windows/MacOSX/Linux for the students. Under some conditions, the Windows users can not read files originating from MacOSX. The end-of-line differences between OSs is the cause. Windows=\r\n; Mac=\r; Unix=\n; etc. Some of the students are extremely frustrated (of course). My Windows users will not have dos2unix or perl -pi -e 's/\r\n$/\n/' or similar abilities for file conversion. read.table() does not appear to have capability to modify its end-of- line definition--is this true? Is there some R command sequence for the students to change the end-of-line? I've scanned mail archive and the Export/Importing manual, but I am stuck and need some advice from other instructors of R in classroom environments. THANKS! William A. __ R-help@stat.math.ethz.ch 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.
Re: [R] Fitting Pareto distribution to some data
Paul, Package lmomco fits generalized pareto (three parameter) using method of L-moments. I suspect that other packages that Brian identified use method of moments or other. William On Sep 3, 2006, at 10:55 AM, Paul Smith wrote: Dear All I am trying to fit Pareto distribution to some data. MASS package does not support Pareto distribution. Is there some alternative way? Thanks in advance, Paul __ R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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] Package docs for CRAN
CRAN et al., I would like to add an extented introduction or other arbitrary sections to my package lmomco. I have been shipping inst/doc/Introduction.Rd. I would like to have this content inserted to the front of the PDF build for the CRAN. The R-exts.pdf seems to be a little silent on this subject? For my purposes, I have been doing this R CMD Rd2dvi --pdf --title=lmomco---version X inst/doc/ Introduction.Rd man/*.Rd but I don't get the correct header (description) or the index built as seen in the lmomco.pdf from the CRAN. Further, is there any point in shipping a complete PDF build of the docs as in inst/doc/lmomco.pdf? Please advise on best practices for building the best docs that I can. . . William __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] MacOSX package install problem: pkgs quadprog tseries
I upgraded to R-2.2.1 on two PPC G5 computers today. Further I want to work with the tseries package for the first time. As root with R CMD INSTALL tseries_0.10-0.tar.gz I get the following gcc-3.3 -bundle -flat_namespace -undefined suppress -L/usr/local/lib - o tseries.so arma.o bdstest.o boot.o dsumsl.o garch.o ppsum.o tsutils.o -framework vecLib -L/usr/local/lib/gcc/powerpc-apple- darwin6.8/3.4.2 -lg2c -lSystem -L/usr/local/lib/gcc/powerpc-apple- darwin6.8/3.4.2 -lg2c -lSystem -lcc_dynamic -F/Library/Frameworks/ R.framework/.. -framework R ld: can't locate file for: -lcc_dynamic make: *** [tseries.so] Error 1 ERROR: compilation failed for package 'tseries' ** Removing '/Library/Frameworks/R.framework/Versions/2.2/Resources/ library/tseries' the -lcc_dynamic is also problem with quadprog. I've read the appropriate R manuals; however, I don't know where to go from here. Thanks, William Asquith (author package lmomco) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Cauchy distribution limits
I have question (curiosity) regarding returned values of R's qcauchy () function, for nonexceedance probability (F). It seems the ideal returned range of cauchy distribution should be [-Inf,Inf]. For F=0 qcauchy(0) [1] -Inf but for F=1 qcauchy(1) [1] 8.16562e+15 It seems to me that the proper return value should be Inf??? For default (location=0,scale=1) quantile function of cauchy x(F) = tan(pi * (F - 0.5)) For F = 0 tan(pi*(-0.5)) [1] -1.633124e+16 For F = 1 tan(pi*(0.5)) [1] 1.633124e+16 So I conclude that qcauchy(0) properly handles the -Inf result and the qcauchy(1) returns a very large number, curiously not equal to tan (0.5*pi), but certainly not Inf. As double check, tan(pi*(0.9-0.5)) [1] 31830.99 qcauchy(0.9) [1] 31830.99 william __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html