mirror of
https://github.com/MillironX/cowcalf-rumen-metagenomic-pipeline.git
synced 2024-11-21 22:16:05 +00:00
8 lines
501 B
R
8 lines
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)
|