Mercurial > repos > iuc > ggplot2_point
comparison utils.r @ 15:f87634b12749 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:02:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
14:5298e06f14f9 | 15:f87634b12749 |
---|---|
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 } |