%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname Compositional %global packver 7.2 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 7.2 Release: 1%{?dist}%{?buildtag} Summary: Compositional Data Analysis License: GPL (>= 2) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 4.0 Requires: R-core >= 4.0 BuildArch: noarch BuildRequires: R-CRAN-bigstatsr BuildRequires: R-CRAN-cluster BuildRequires: R-CRAN-doParallel BuildRequires: R-CRAN-emplik BuildRequires: R-CRAN-energy BuildRequires: R-CRAN-foreach BuildRequires: R-CRAN-glmnet BuildRequires: R-graphics BuildRequires: R-grDevices BuildRequires: R-CRAN-quantreg BuildRequires: R-CRAN-MASS BuildRequires: R-CRAN-Matrix BuildRequires: R-CRAN-mda BuildRequires: R-CRAN-minpack.lm BuildRequires: R-CRAN-mixture BuildRequires: R-CRAN-nnet BuildRequires: R-CRAN-quadprog BuildRequires: R-CRAN-Rfast BuildRequires: R-CRAN-Rfast2 BuildRequires: R-CRAN-Rnanoflann BuildRequires: R-CRAN-sn BuildRequires: R-stats Requires: R-CRAN-bigstatsr Requires: R-CRAN-cluster Requires: R-CRAN-doParallel Requires: R-CRAN-emplik Requires: R-CRAN-energy Requires: R-CRAN-foreach Requires: R-CRAN-glmnet Requires: R-graphics Requires: R-grDevices Requires: R-CRAN-quantreg Requires: R-CRAN-MASS Requires: R-CRAN-Matrix Requires: R-CRAN-mda Requires: R-CRAN-minpack.lm Requires: R-CRAN-mixture Requires: R-CRAN-nnet Requires: R-CRAN-quadprog Requires: R-CRAN-Rfast Requires: R-CRAN-Rfast2 Requires: R-CRAN-Rnanoflann Requires: R-CRAN-sn Requires: R-stats %description Regression, classification, contour plots, hypothesis testing and fitting of distributions for compositional data are some of the functions included. We further include functions for percentages (or proportions). The standard textbook for such data is John Aitchison's (1986) "The statistical analysis of compositional data". Relevant papers include: a) Tsagris M.T., Preston S. and Wood A.T.A. (2011). "A data-based power transformation for compositional data". Fourth International International Workshop on Compositional Data Analysis. b) Tsagris M. (2014). "The k-NN algorithm for compositional data: a revised approach with and without zero values present". Journal of Data Science, 12(3): 519--534. . c) Tsagris M. (2015). "A novel, divergence based, regression for compositional data". Proceedings of the 28th Panhellenic Statistics Conference, 15-18 April 2015, Athens, Greece, 430--444. . d) Tsagris M. (2015). "Regression analysis with compositional data containing zero values". Chilean Journal of Statistics, 6(2): 47--57. . e) Tsagris M., Preston S. and Wood A.T.A. (2016). "Improved supervised classification for compositional data using the alpha-transformation". Journal of Classification, 33(2): 243--261. . f) Tsagris M., Preston S. and Wood A.T.A. (2017). "Nonparametric hypothesis testing for equality of means on the simplex". Journal of Statistical Computation and Simulation, 87(2): 406--422. . g) Tsagris M. and Stewart C. (2018). "A Dirichlet regression model for compositional data with zeros". Lobachevskii Journal of Mathematics, 39(3): 398--412. . h) Alenazi A. (2019). "Regression for compositional data with compositional data as predictor variables with or without zero values". Journal of Data Science, 17(1): 219--238. . i) Tsagris M. and Stewart C. (2020). "A folded model for compositional data analysis". Australian and New Zealand Journal of Statistics, 62(2): 249--277. . j) Alenazi A.A. (2022). "f-divergence regression models for compositional data". Pakistan Journal of Statistics and Operation Research, 18(4): 867--882. . k) Tsagris M. and Stewart C. (2022). "A Review of Flexible Transformations for Modeling Compositional Data". In Advances and Innovations in Statistics and Data Science, pp. 225--234. . l) Alenazi A. (2023). "A review of compositional data analysis and recent advances". Communications in Statistics--Theory and Methods, 52(16): 5535--5567. . m) Tsagris M., Alenazi A. and Stewart C. (2023). "Flexible non-parametric regression models for compositional response data with zeros". Statistics and Computing, 33(106). . n) Tsagris. M. (2024). "Constrained least squares simplicial-simplicial regression". . %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}