mirror of
https://github.com/MillironX/cowcalf-rumen-metagenomic-pipeline.git
synced 2024-11-23 06:49:54 +00:00
8 lines
No EOL
501 B
R
8 lines
No EOL
501 B
R
metadata <- read.delim("metadata.tsv", header=FALSE)
|
|
metadata_columns <- head(metadata, 2)
|
|
metadata_columns <- as.data.frame(t(metadata_columns))
|
|
colnames(metadata_columns) <- c("Name", "DataType")
|
|
numcols <- subset(metadata_columns, DataType == "numeric")[,1]
|
|
catcols <- subset(metadata_columns, DataType == "categorical")[,1]
|
|
write.table(numcols,"numcols.txt",row.names = FALSE, col.names = FALSE, quote = FALSE)
|
|
write.table(catcols,"catcols.txt",row.names = FALSE, col.names = FALSE, quote = FALSE) |