I'm trying to read a table into R in which the first column contains names that have a forward slash (e.g. D81P8DQ1_H0D06ADXX:2:2211:15347:81697#0/1
), but whatever I do R doesn't let me upload the file.
Does anyone have a suggestion on how to upload such a file without changing the names or ignoring the column containing the names?
Before/after example (as poster designated in the comment)
test <- read.table(file="~/test.txt", header=T, sep="\t", blank.lines.skip = FALSE, fill = TRUE)
head(test)
Read Chr
1 D81P8DQ1_H0D06ADXX:2:2114:10169:64377 NA
2 D81P8DQ1_H0D06ADXX:1:2109:13954:39195 NA
test <- read.table(file="~/test.txt", header=T, sep="\t", comment.char="")
head(test)
Read Chr
1 D81P8DQ1_H0D06ADXX:2:2114:10169:64377#0/2 4
2 D81P8DQ1_H0D06ADXX:1:2109:13954:39195#0/2 15