My R version s 2.0.1 and I am running it under windows. I want to use R directly, but
in this case since I could not figure out what went wrong I tried to transpose it in perl.
Certainly I understand your concern regarding handling numerical data in Perl. I read the file using read.csv, it
reads the original file very well. I am not using "-" as a field seperator. The data is too huge and
I need to check with my collaborators before I send it to out.
Many thanks for your comments.
Cheers ./Murli




Adaikalavan Ramasamy wrote:

See comments below.


On Fri, 2005-02-11 at 08:47 -0800, T. Murlidharan Nair wrote:


Thanks to all for trying to help me with problem. After spending a long time, I eventually solved it
by writing a perl script and transposing the matrix



If you plan on doing your analysis mostly in R, it would be best to use R directly. While perl is great for many things, I recommend caution with numerical data (e.g. it will happily add a character and a number)

Besides, you may risk extra computing overhead and debugging nightmares.




and re-reading the file. When I did this I got an
error saying I had duplicate row names (which in fact was not true or



How did you read the file ? e.g. read.delim, read.table, read.csv, ...



may be something to with
the naming conventions in R).
The column names were :



Wouldn't this become row names after you transpose it ? Nevermind, I have tested both cases below.




Tumor_VA_114-1, Tumor_VA_114-2,.....
But when I changed it to Tumor_VA_114_1, Tumor_VA_114_2 it worked fine.
I was not aware that - cannot be used to differentiate variables. Is this the case ?



Not true. I successfully read in (tab delimited) files containing either of the following contents in Redhat Fedora Core 3 and R-1.9.1 :

read.delim(file="file1.txt", row.names=1, header=TRUE)
read.delim(file="file2.txt", row.names=1, header=TRUE)

----------------- File 1 ---------------------
Index   Tumor_VA_114-1  Tumor_VA_114-2
A       10      100
B       20      200
----------------------------------------------

----------------- File 2 ---------------------
Index   Value
Tumor_VA_114-1  100
Tumor_VA_114-2  200
---------------------------------------------

Another possibility is that somehow you are using "-" as the field
separator.


Maybe some other software that use in between corrupted the dimnames ?

We can only guess since you have not provided neither a simple
reproducible example, your operating system or working R version. Please
read the posting guide first.




Sorry, if I wasted any of your time.
Cheers ../Murli




______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to