upload sc rna seq file into R
1
0
Entering edit mode
2.0 years ago
sandy • 0

Hello everyone,

I meet a question to upload my scrna seq file to R. My data file is dge.txt.gz file.

I used code sample<- read.table("my/data/dir" , header = T,row.names = 1) to input my data, but R said:

 Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: In file(file, "rt") :
  'raw = FALSE' but 'my/data/dir' is not a regular file
2: In file(file, "rt") :
  cannot open file 'my/data/dir': it is a directory.

Please give me some suggestion on how to solve this problem.

Thank you very much.

R • 1.3k views
ADD COMMENT
0
Entering edit mode

I think the easiest way for you would be, in RStudio, to upload you file doing: File > Import Dataset > From text (base)...

ADD REPLY
0
Entering edit mode

Thanks for your replay. However, I analyses my data on a server, thus I cannot do file>import dataset.

ADD REPLY
1
Entering edit mode
2.0 years ago

not

 read.table("my/data/dir"...

but

 read.table("path/to/your/file.csv" ....
ADD COMMENT
0
Entering edit mode

Yes, I wrote like "read.table("path/to/your/file.csv" ....". I wrote "my/data/dir" refers to the path to my dge.txt.gz file.

ADD REPLY
0
Entering edit mode

but that was a directory, not a file:

cannot open file 'my/data/dir': it is a directory.

ADD REPLY
0
Entering edit mode

I see! Thank you so much! I understand where I got wrong. I appreciate your help!

ADD REPLY

Login before adding your answer.

Traffic: 1359 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6