mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 06:46:11 +01:00
Try to support older R versions
This commit is contained in:
parent
4b5530ed64
commit
d79132b29f
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
# Setting up R deps
|
# Setting up R deps
|
||||||
language: r
|
language: r
|
||||||
r: 3.1
|
r:
|
||||||
|
- 3.1
|
||||||
|
- 3.2
|
||||||
r_packages: covr
|
r_packages: covr
|
||||||
cache: packages
|
cache: packages
|
||||||
|
|
||||||
@ -14,6 +16,7 @@ before_install:
|
|||||||
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -qq update; fi
|
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -qq update; fi
|
||||||
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -y xclip; fi
|
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -y xclip; fi
|
||||||
- if [ $TRAVIS_OS_NAME = osx ]; then brew install xclip; fi
|
- if [ $TRAVIS_OS_NAME = osx ]; then brew install xclip; fi
|
||||||
|
- if [ $TRAVIS_OS_NAME = osx ]; then brew install r@3.1.3; fi
|
||||||
|
|
||||||
# postrun
|
# postrun
|
||||||
after_success:
|
after_success:
|
||||||
|
2
R/freq.R
2
R/freq.R
@ -161,7 +161,7 @@ freq <- function(x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mult.columns > 1) {
|
if (mult.columns > 1) {
|
||||||
NAs <- x[is.na(x) | x == trimws(strrep('NA ', mult.columns))]
|
NAs <- x[is.na(x) | x == trimws(AMR:::strrep('NA ', mult.columns))]
|
||||||
} else {
|
} else {
|
||||||
NAs <- x[is.na(x)]
|
NAs <- x[is.na(x)]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user