diff --git a/R/equal_vector.R b/R/equal_vector.R new file mode 100644 index 0000000000000000000000000000000000000000..f7a48a395b87626aec33a17c5694cff4dd2f2139 --- /dev/null +++ b/R/equal_vector.R @@ -0,0 +1,17 @@ + +## Compares a vector to a value and returns a vector of logical values +## +## @param vector The vector to be compared to the value +## @param value The value each item in the vector should be compared to +## +## @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)) +} + + +