%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname smacofx %global packver 1.5-3 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.5.3 Release: 1%{?dist}%{?buildtag} Summary: Flexible Multidimensional Scaling and 'smacof' Extensions License: GPL-2 | GPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.5.0 Requires: R-core >= 3.5.0 BuildArch: noarch BuildRequires: R-CRAN-smacof >= 1.10.4 BuildRequires: R-CRAN-MASS BuildRequires: R-CRAN-minqa BuildRequires: R-CRAN-plotrix BuildRequires: R-CRAN-ProjectionBasedClustering BuildRequires: R-CRAN-weights BuildRequires: R-CRAN-vegan Requires: R-CRAN-smacof >= 1.10.4 Requires: R-CRAN-MASS Requires: R-CRAN-minqa Requires: R-CRAN-plotrix Requires: R-CRAN-ProjectionBasedClustering Requires: R-CRAN-weights Requires: R-CRAN-vegan %description Flexible multidimensional scaling (MDS) methods and extensions to the package 'smacof'. This package contains various functions, wrappers, methods and classes for fitting, plotting and displaying a large number of different flexible MDS models (some as of yet unpublished). These are: Torgerson scaling (Torgerson, 1958, ISBN:978-0471879459) with powers, Sammon mapping (Sammon, 1969, ) with ratio and interval optimal scaling, Multiscale MDS (Ramsay, 1977, ) with ratio and interval optimal scaling, S-stress MDS (ALSCAL; Takane, Young & De Leeuw, 1977, ) with ratio and interval optimal scaling, elastic scaling (McGee, 1966, ) with ratio and interval optimal scaling, r-stress MDS (De Leeuw, Groenen & Mair, 2016, ) with ratio, interval and non-metric optimal scaling, power-stress MDS (POST-MDS; Buja & Swayne, 2002 ) with ratio and interval optimal scaling, restricted power-stress (Rusch, Mair & Hornik, 2021, ) with ratio and interval optimal scaling, approximate power-stress with ratio optimal scaling (Rusch, Mair & Hornik, 2021, ), Box-Cox MDS (Chen & Buja, 2013, ), local MDS (Chen & Buja, 2009, ), curvilinear component analysis (Demartines & Herault, 1997, ) and curvilinear distance analysis (Lee, Lendasse & Verleysen, 2004, ). There also are experimental models (e.g., sparsified MDS and sparsified POST-MDS). Some functions are suitably flexible to allow any other sensible combination of explicit power transformations for weights, distances and input proximities with implicit ratio, interval or non-metric optimal scaling of the input proximities. Most functions use a Majorization-Minimization algorithm. Currently the methods are only available for one-mode data (symmetric dissimilarity matrices). %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}