'
This commit is contained in:
parent
cc9704489c
commit
5fdff9fee2
2 changed files with 6 additions and 6 deletions
|
|
@ -36,7 +36,7 @@ Description: Partial R implementation of the BAPS software
|
||||||
License: GPL-3
|
License: GPL-3
|
||||||
Encoding: UTF-8
|
Encoding: UTF-8
|
||||||
LazyData: true
|
LazyData: true
|
||||||
RoxygenNote: 7.1.0
|
RoxygenNote: 7.1.1
|
||||||
Suggests:
|
Suggests:
|
||||||
testthat (>= 2.1.0)
|
testthat (>= 2.1.0)
|
||||||
Imports:
|
Imports:
|
||||||
|
|
|
||||||
10
R/find.R
10
R/find.R
|
|
@ -2,9 +2,9 @@
|
||||||
#' @description Emulates behavior of `find`
|
#' @description Emulates behavior of `find`
|
||||||
#' @param x object or logic operation on an object
|
#' @param x object or logic operation on an object
|
||||||
find <- function(x) {
|
find <- function(x) {
|
||||||
if (is.logical(x)) {
|
if (is.logical(x)) {
|
||||||
return(which(x))
|
return(which(x))
|
||||||
} else {
|
} else {
|
||||||
return(which(x > 0))
|
return(which(x > 0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue