blob: 8d55bda9daaffc83b1c48ac0be6f2e6c05c49171 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
_pkgname=ivreg
_pkgver=0.6-4
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Instrumental-Variables Regression by '2SLS', '2SM', or '2SMM', with Diagnostics"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-2.0-or-later')
depends=(
r-car
r-formula
r-lmtest
)
checkdepends=(
r-testthat
)
optdepends=(
r-aer
r-effects
r-ggplot2
r-gt
r-insight
r-knitr
r-modelsummary
r-rmarkdown
r-sandwich
r-testthat
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('9a3078bbb5c418afecb57097135b0350')
b2sums=('4e2a3f409d2571668aefd6a33ace567ffcde87a48171e2999aea4a8373c2a4b219a83630aa62e7fce8e94fe6ea691539d9c1a61271697287021fecdb85a6bd88')
build() {
mkdir build
R CMD INSTALL -l build "$_pkgname"
}
check() {
cd "$_pkgname/tests"
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
}
package() {
install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
}
|