%global __brp_check_rpaths %{nil} %global packname lookupTable %global packver 0.1 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.1 Release: 3%{?dist}%{?buildtag} Summary: Look-Up Tables using S4 License: MIT + file LICENSE URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel Requires: R-core BuildArch: noarch BuildRequires: R-CRAN-data.table BuildRequires: R-CRAN-dplyr BuildRequires: R-methods Requires: R-CRAN-data.table Requires: R-CRAN-dplyr Requires: R-methods %description Fits look-up tables by filling entries with the mean or median values of observations fall in partitions of the feature space. Partitions can be determined by user of the package using input argument feature.boundaries, and dimensions of the feature space can be any combination of continuous and categorical features provided by the data set. A Predict function directly fetches corresponding entry value, and a default value is defined as the mean or median of all available observations. The table and other components are represented using the S4 class lookupTable. %prep %setup -q -c -n %{packname} %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 %files %{rlibdir}/%{packname}