#' Extracts row names from data frame and let's user define groups
#'
#' @param data data frame
#'
#' @return
#' @export
#'
#'
define.groups <- function(data) {
if(!hasArg(data)) {
data <- getData()
}
names <- rownames(data)
printn(names)
ok <- F
while(!ok) {
groups <- strsplit(readline("Please indicate group for each sample divided by a semicolon (;): "), split = ";")[[1]]
names(groups) <- names
print(groups)
ok <- ok("Are groups ok?")
}
saveThis(groups, destination = "info")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.