This is a test version of Biostars. For the public version, visit https://www.biostars.org.
read.delim() removes empty stringd

Hi,

There is a text file called "ref", i want to import this file in R. Used commands are below.Problem is that R removes empty strings , for example my file starts with "", "", "Body".... when i call ref[1], it returns "Body" while ref[1] equals to "".

 ref<-read.delim("ref.txt",header=F)
    ref<-as.character(ref$V1)
r text file empty_strings

Can you show part of the file?

Hello niutster!

We believe that this post does not fit the main topic of this site.

This is not a bioinformatics question. Please search StackOverflow

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

0 answers

No answers yet.

Log in to answer this question.