Mercurial > repos > iuc > ggplot2_pca
comparison utils.r @ 10:1df3b30325dd draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ggplot2 commit 57b86418a4f032a5664b8dc1c9585a11be629158
| author | iuc |
|---|---|
| date | Thu, 15 May 2025 13:01:46 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 9:ae344ccf9d62 | 10:1df3b30325dd |
|---|---|
| 1 # Function for the data input | |
| 2 load_data <- function(file_name, file_extension) { | |
| 3 if (file_extension == "csv") { | |
| 4 data_input <- read.csv(file_name, check.names = "false") | |
| 5 } else if (file_extension %in% c("tsv", "txt", "tabular")) { | |
| 6 data_input <- read.delim(file_name, sep = "\t", check.names = "false") | |
| 7 } else if (file_extension == "parquet") { | |
| 8 data_input <- arrow::read_parquet(file_name) | |
| 9 } else { | |
| 10 stop("Unsupported file format.") | |
| 11 } | |
| 12 return(data_input) | |
| 13 } |
