#' Removes vector entries based on specified prefix
#'
#' @param names
#'
#' @return
#' @export
#'
#'
removePrefix <- function(names) {
if(!hasArg(names)) {
names <- getVector1()
}
done <- F
while(!done) {
prefix <- readline("Based on which prefix should entires be removed? (CON/REV/...) ")
if(prefix != "") {
message(paste(sum(regexpr(prefix, names) == 1), " proteins will be removed based on the prefix ", prefix, ".", sep = ""))
if(ok("Remove?")) {
names <- names[regexpr(prefix, names) != 1]
done <- ok("Done?")
}
}
else if(prefix == "") {
done <- ok("Done?")
}
}
names
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.