Skip to content
Snippets Groups Projects
Commit 5b921472 authored by Clare's avatar Clare
Browse files

Change code to be more efficient

parent 01c0f7be
No related branches found
No related tags found
No related merge requests found
......@@ -6,12 +6,7 @@
##
## @return A vector of TRUE and FALSE values
##
equal_vector <- function(vector, value){
tempFunction<-function(x,value){
isTRUE(all.equal(x,value))
}
return(sapply(vector,tempFunction,value))
return(abs(vector-value)<.Machine$double.eps^0.5)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment