Entering edit mode
7.6 years ago
fi1d18 ★ 4.1k
I have gene_lengths file in
/Users/Lenovo/Desktop, I want to read it, I did like so in rstudio
> genes <- as.data.frame(read.table("/Users/Lenovo/Desktop/read.csv("gene_lengths.csv", sep="")) Error: unexpected symbol in "genes <- as.data.frame(read.table("/Users/Lenovo/Desktop/read.csv("gene_lengths.csv"
What is the fault please?
We believe that this post does not fit the main topic of this site.
Not related to bioinformatics
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.
If memory serves me, many years ago I had a similar error, and the cause was particular (or at least more common) to bioinformatics: some gene names use reserved R words, or symbols which R couldn't handle. In my case, it was a tsv file and fields were not quoted, quoting the fields solved the error. As this happened many years ago, I really do not remember the specific cause of the error, nor I have the file to try and repeat it.
Alright, I'll re-open the question and Angel can host the file someplace so we can try and figure out the specific problem.
ok thank you all biostars...
Please upload the file on Google Drive/DropBox/Github Gist and give us the link, we can try to figure out the underlying cause.
I have an excel file named
gene_lengthsand a csv file both in the same directory and I want read the excel one, I uploaded csv in the top window but I don know how to read the excel file now
Fereshteh, whereas there is "gene" in the name of the file you need to import, this question is not related to biology at all. Besides this, considering your R question: it is important that you learn the language if you aim to keep it as an analysis companion tool. There are plenty of R tutorials out there.
For the rest, simply try:
Thanks you both, this my duty to be ready with rstudio for Monday but I found it confusing...