R/asMatrixDS.R

Defines functions asMatrixDS

Documented in asMatrixDS

#'
#' @title title
#' @description desc
#' @details details
#' @param x
#' @return return value
#' @export
#'
asMatrixDS <- function (data, vars) {
  return(NA)
  # check if the input vector is valid (i.e. meets DataSHIELD privacy criteria)
  check <- dsBase:::isValidDS(data)
  
  # return missing value if the input vector is not valid
  if (check) {
    
    my_data <- list()
    for (i in vars) {
      my_data[[i]] <- data[i]
    }
    result <- data.frame(my_data)
    #mat <- as.matrix(cbind(1,mdf))
    
  } else {
    result <- NA
  }
  
  return(result)
}
gflcampos/dsRegression documentation built on Nov. 18, 2017, 1:03 p.m.