diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2021-02-20 13:32:39 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2021-02-20 13:32:39 +0000 |
commit | 2d8797155db1bd91d225fd933d717d05ef3aaaab (patch) | |
tree | e21461a1aab75531d9203882cf0c0ecf7160719f | |
parent | 68277e50fbbbc639ed27b3315001a45e121477c5 (diff) |
automatic import of R-CRAN-multiApplyf34
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | R-CRAN-multiApply.spec | 66 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 68 insertions, 0 deletions
@@ -0,0 +1 @@ +/multiApply_2.1.3.tar.gz diff --git a/R-CRAN-multiApply.spec b/R-CRAN-multiApply.spec new file mode 100644 index 0000000..f792d8a --- /dev/null +++ b/R-CRAN-multiApply.spec @@ -0,0 +1,66 @@ +%global packname multiApply +%global packver 2.1.3 +%global rlibdir /usr/local/lib/R/library + +Name: R-CRAN-%{packname} +Version: 2.1.3 +Release: 1%{?dist}%{?buildtag} +Summary: Apply Functions to Multiple Multidimensional Arrays or Vectors + +License: Apache License 2.0 +URL: https://cran.r-project.org/package=%{packname} +Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz + + +BuildRequires: R-devel >= 3.2.0 +Requires: R-core >= 3.2.0 +BuildArch: noarch +BuildRequires: R-CRAN-doParallel +BuildRequires: R-CRAN-foreach +BuildRequires: R-CRAN-plyr +Requires: R-CRAN-doParallel +Requires: R-CRAN-foreach +Requires: R-CRAN-plyr + +%description +The base apply function and its variants, as well as the related functions +in the 'plyr' package, typically apply user-defined functions to a single +argument (or a list of vectorized arguments in the case of mapply). The +'multiApply' package extends this paradigm with its only function, Apply, +which efficiently applies functions taking one or a list of multiple +unidimensional or multidimensional arrays (or combinations thereof) as +input. The input arrays can have different numbers of dimensions as well +as different dimension lengths, and the applied function can return one or +a list of unidimensional or multidimensional arrays as output. This saves +development time by preventing the R user from writing often error-prone +and memory-inefficient loops dealing with multiple complex arrays. Also, a +remarkable feature of Apply is the transparent use of multi-core through +its parameter 'ncores'. In contrast to the base apply function, this +package suggests the use of 'target dimensions' as opposite to the +'margins' for specifying the dimensions relevant to the function to be +applied. + +%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 +# 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} @@ -0,0 +1 @@ +a0a2c9dd7b0134ac2cd1e593596aa864 multiApply_2.1.3.tar.gz |