[R] writing elements in list as a data frame

2007-09-05 Thread Srinivas Iyyer
Dear R-helpers, Lists in R are stumbling block for me. I kindly ask you to help me able to write a data-frame. I have a list of lists. sls[1:2] $Andromeda_maya1 x y [1,] 369 103 [2,] 382 265 [3,] 317 471 [4,] 169 465 [5,] 577 333 $Andromeda_maya2 x y [1,] 173 507 [2,]

[R] ' quote problem in reading lots of files at once

2006-09-11 Thread Srinivas Iyyer
Dear group, i have 114 files (all have 5 columns) and variable number of rows. I want to read all the files and select the first column and 4th column and fill the values into a big matrix. I have a pre-made matrix that would have all rownames (1st column) and coloumn names (4th column from

[R] Reading many files at once

2006-09-01 Thread Srinivas Iyyer
dear group, i have 100 files starting with 'hsa-*'. ex. file: fruit p-value apple 0.0003 orange 0.004 kiwi 0.0003 peach 0.0004 I want to read all these files and create a single matrix. here each file may have different fruit names. in the matrix i want to have a

Re: [R] Escaping ' character

2006-08-22 Thread Srinivas Iyyer
Dear marc: thank you for your tip. cat(x.new, \n) 3\',5\'-cyclic-nucleotide phosphodiesterase activity here cat is printing on screen. how can I direct the output to an object. I cannot do: y - cat(x.new, \n) is there any other way. thanks srini Try this: x -

[R] Escaping ' character

2006-08-21 Thread Srinivas Iyyer
Dear all: I have a character object x with ' (single-quote) character. x - c('hydrolase activity,actin binding,3',5'-cyclic-nucleotide phosphodiesterase activity) I want to write a function that will identify ' and replaces with \' myf - function(term){ if (grep(',term)) { sub(',\',term)} }

[R] overlaying the values of tab-delim file in to a pre-existing matrix

2006-07-30 Thread Srinivas Iyyer
Hello : I have matrix with dimensions(200 X 20,000). I have another file, a tab-delim file where first column variables are row names and second column variables are column names. Tab-delim file has smaller values than the matrix. Matrix = tmat tab-delim file read as data.frame = tb My aim

Re: [R] Comparing two matrices [Broadcast]

2006-07-28 Thread Srinivas Iyyer
1 1 00 O 1 1 0 00 M 0 0 1 00 G 0 0 0 00 S 1 1 1 00 HTH, Andy From: Srinivas Iyyer hi: I have matrix with dimensions(200 X 20,000). I have another file, a tab-delim file where

[R] Comparing two matrices

2006-07-06 Thread Srinivas Iyyer
hi: I have matrix with dimensions(200 X 20,000). I have another file, a tab-delim file where first column variables are row names and second column variables are column names. For instance: tmat Apple Orange Mango Grape Star A 0 0 0 00 O 0 0 0 00 M

[R] Reading a set of values from a numeric matrix

2006-06-27 Thread Srinivas Iyyer
Dear group, I have a matrix with (190,2) dimensions. The values range from : -973.8149 to 807.4688 I want to select the values less than -200 and want to know what are the names of row and columns. m1 m2 m3 m4 .. mn k1 k2 k3 k4 . . . kj mymat[1:4,1:4] 1-Dec

[R] help with combination problem

2006-06-07 Thread Srinivas Iyyer
hello: I have 3 data.frame objects. First df object: Of dim (149,31). Columns 2:31 are marked as T1..T14 and N1..N16. Name T1T2N1 T3 N2 N3 N4 T4 mu1 1010910 9 9 8 10 mu2 1111911 9 9 9 11 ... muN 1212911 9

[R] matching identical row names

2006-04-14 Thread Srinivas Iyyer
dear group, i have a sample matrix name v1 v2 v3 v4 cat 1011 12 15 dog 3 12 10 14 cat 9 12 12 15 cat 5 12 10 11 dog 12113 123 31 ... since cat is repeated 3 times, I want a mean value for it. Like wise for every element of the name

[R] R[1304] general protection rip - Error running R file in Batch mode

2006-02-21 Thread Srinivas Iyyer
hi group, I have a list of 100 elements (genes), that are to be queried in postgres. The out of the file is processed for fisher test and written back as a file with pvalues. For one such operation there are 54 lines of code. I replicated the same code changing the query element and file name

Re: [R] R[1304] general protection rip - Error running R file in Batch mode

2006-02-21 Thread Srinivas Iyyer
Hi group, I ran the file again and after 10 min. of run, the process got interrupted. Here is the output of the file $bash: R CMD BATCH grand.R grand.log R CMD BATCH grand.R /usr/local/lib64/R/bin/BATCH: line 55: 1758 Broken pipe ( echo invisible(options(echo = TRUE)); cat

[R] Plotting 27 line plots in one page

2006-02-09 Thread Srinivas Iyyer
Dear group, I am a novice programmer in R. I have a list that has a length of 27 elements. Each element is derived from table function. lls - table(drres) legnth(lls) 27 I want to plot all these elements in 9x3 plot (9 rows and 3 columns) par(9,3) mypltfunc - function(mydata){ + for (i in

Re: [R] Plotting 27 line plots in one page

2006-02-09 Thread Srinivas Iyyer
hi sarah, thanks for your mail. # par(mfrow=c(9,3)) mypltfunc(lls) Error in plot.new() : figure margins too large par(mfcol=c(9, 3)) mypltfunc(lls) Error in plot.new() : figure margins too large

[R] ERROR: compilation failed for package 'RdbiPgSQL'

2006-02-02 Thread Srinivas Iyyer
Dear Group, I have been trying to connect postgres with R. I followed the instructions from : http://grass.itc.it/statsgrass/r_and_dbms.html. However, RdbiPgSQL fails to install and throws up error. Could any one please help me where the things are going wrong. I have attached the log, and

[R] Character operations, strsplit()

2005-12-02 Thread Srinivas Iyyer
Dear group, could some one help me how i can split a string into pieces and access them. For example: test = this is a test typeof(test) [1] character strsplit(test,split='is') [[1]] [1] th a test Now I want to get test into : a vector and another object as list Also,

[R] R software on 64bit - Intel Xeon processor

2005-11-29 Thread Srinivas Iyyer
Dear Group, I have a machine which has a 64bit Intel® Xeon™ Processor 3.00GHz, 2MB L2 Cache 6T302N - [ 221-7984 ] processor. (Dell Precision Workstation 670n Intel® Xeon™ Processor) The OS is RedHat Enterprise Linux version 4 (for 64bit). I went to /bin/linux/redhat/el4/i386 on CRAN FTP

[R] Can I run both R and Python through Emacs

2005-11-08 Thread Srinivas Iyyer
Dear Group, I am new to R and Emacs both. Until now I have been working through R's interactive space. Today I configured R+XEmacs by following John Fox help file - how to configure Xemacs + R. I am very happy to do this. Now the question I have is can I make XEmacs to be the editor for

Re: [R] Matrix operations please help

2005-10-31 Thread Srinivas Iyyer
Dear Group, I am a novice R programmer with little statistical background. I am a molecular biologist by training. I generated a correlation matrix (157 X 157) for 157 variables. I want to selection only the unique values (values that are either side of the diagnol). I want these unique

[R] Matrix operations please help

2005-10-30 Thread Srinivas Iyyer
Dear Group, I have a matrix (157 X 157 ) with correlation values. I want to convert the unique elements into a long list so that I can add an extra variable and plot them. Example: A B C D alfa 1 0.3 0.8 -0.3 beta 0.2 1 -0.3 0.4 echo 0.9 -0.3 1 0.5 tang -0.5 0.5

[R] How to make labels on my dendrogam look more clear and visible

2005-10-27 Thread Srinivas Iyyer
Dear group, I have a matrix with readings for ~180 variables observed in 240 conditions. I am doing a hierarchical clustering method (hclust) by calculating eucledian distances among them. When I plot the dendrogram from hclust, all my variables at the end of the branches are cluttered. I

[R] How to update R from ver 1.9.1 to 2

2005-09-17 Thread Srinivas Iyyer
Dear group, apologies if this is a stupid question. I searched CRAN sites. I am afraid I missed it. Can any one help me if I can update my windows version of 1.9.1 to 2 or higer. thanks srini __ R-help@stat.math.ethz.ch mailing list

[R] Error in FUN(newX[, i], ...) : `x' must be atomic

2005-07-26 Thread Srinivas Iyyer
Hello Group, What is the meaning of the error. is there any place to look for this. I guess 'atomic' seems to be OOP related concept. thank you srini __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] PCA - princomp can only be used with more units than variables

2005-03-26 Thread Srinivas Iyyer
Hi all: I am trying to do PCA on the following matrix. N1 N2A1 A2 B1 B2 gene_a 90110190210290310 gene_b 190210390410590610 gene_c 90110110 90120 80 gene_d 200100400 90

[R] Writing as matrix

2005-02-27 Thread Srinivas Iyyer
Dear Group, I am calculating correlation coeff. between two populations. After calculating the cor.coefs I want to represent them as a matrix file. a b c d A 1 0 1 1 B 1 1 1 1 C 1 0 1 0 D 0 1 1 1 could any one please help me how can i acheive this:

[R] Reading a tab delimitted text

2004-11-30 Thread Srinivas Iyyer
Dear group, I have a tab delimitted text file with 21 column and 1988 rows. When I read the file: D1 - read.table(file=gist_data1.txt,sep=\t,header=T) dim(D1) [1] 1811 20 It reads only 1811 rows from that file. I saved this file as CSV file and I read it again using: D1 -

[R] Log(2) values to log(10) values

2004-11-29 Thread Srinivas Iyyer
Dear group, I am using justRMA in bioconductor to get expression values. Now I computed fold changes. the fold changes i get are log2 values. How can I convert these to log10 values to see them as actual fold change values. thank you. __ [EMAIL