First commit with the code Hector shared with me
This commit is contained in:
29
10_EXPORTS/01_edit-headers.R
Normal file
29
10_EXPORTS/01_edit-headers.R
Normal file
@@ -0,0 +1,29 @@
|
||||
# Delete 1st rows of forceps EXPORTS
|
||||
|
||||
################################################################################
|
||||
|
||||
# 1. LOAD DATA ----
|
||||
|
||||
# select folder
|
||||
dirs <- "PYR18"
|
||||
dirs
|
||||
|
||||
# list files
|
||||
files <- list.files(getwd(), full.names = FALSE, recursive = T, pattern = dirs)
|
||||
files
|
||||
|
||||
# complete_export_list <-
|
||||
# lapply(files, read.csv, sep = "\t")
|
||||
|
||||
|
||||
for (i in 1:length(files)) {
|
||||
print(i)
|
||||
write.table(
|
||||
read.delim(files[i], comment.char = '#', header = F, fill = T),
|
||||
file = files[i],
|
||||
row.names = FALSE,
|
||||
col.names = FALSE,
|
||||
sep = "\t"
|
||||
)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user