R/change_variables_manually.R

Defines functions change_variables_manually

Documented in change_variables_manually

#' Allows to manually change the variables data
#'
#' @param dataset dataset
#'
#' @return
#' @export
#'
#' @importFrom magrittr %>% 
#'
change_variables_manually <- function(dataset) {
  
  # Get dataset
  dataset <- get_dataset(dataset)
  
  x <- .datasets[[dataset]][["variables"]] %>% 
    edit() %>% 
    tibble::as_tibble()
  
  # 
  if (menu(choices = c("Yes", "No"), graphics = T, title = "Accept changes?") == 1) {
    
    .datasets[[dataset]][["variables"]] <<- x
    
  }
  
}
nicohuttmann/pOmics documentation built on Sept. 21, 2022, 9:28 a.m.