[R] Extracting selected rows from a matrix to a submatix

2011-04-13 Thread pankaj borah
I have a matrix M > dim(M) [1] 30380   561 I have another list L contains , that contains some row names of matrix M str (L)  chr [1:21037] Now I want to extract the submatrix subM (21037    ,    561)  from the matrix M by matching the rownames (M) to the 21037 rownames o f L How do I do that

[R] Merge matrix

2011-04-12 Thread pankaj borah
I have two matrices A and B > dim (A) [1] 30380   104 > dim(Bt) [1] 30380    63 I want to  combine both A and B to matrix C where >dim(C) [1] 30380   167 How do I do that ? Regards, Pankaj Barah Department of Biology, Norwegian University of Science & Technology (NTNU) Realfagbygget, N-

[R] Extrcat selected rows from a list

2011-02-08 Thread pankaj borah
Hi, I have two lists 1) List1- 30,000 rows and 104 columns 2) List2- a list of 14000 selected rownames  from List 1 Now, I want to extract all the 104 columns of List1  matching with the 14000 selected rownames from List2.  Psedocode will be something like this: match rownames(List2) with r

[R] Extracting selected rows from a matrix

2010-11-29 Thread pankaj borah
Hi, I have matrix of 104 columns and 3 rows (Each Row has rowname). I have 13 different  list of selected rownames (character) say 1000 each. Now I want to extract the all the columns according to the rownames in each the list. How can I do that in R ? 1 ) For a single list 2) For all

[R] Exporting Dataframe to Excel spreadsheet

2010-11-18 Thread pankaj borah
Hi, I have a  data frame contains 30,000 rows and 105 columns.  How can i extract each of the columns as separate  Excel spreadsheet of the same excel file.  Regards, Pankaj Barah Department of Biology, Norwegian University of Science & Technology (NTNU) Realfagbygget, N-7491 Trondheim

[R] Reading iputs from adjacency matrix

2009-05-22 Thread pankaj borah
Dear all , I am just wondering if there is a way to read inputs from adjacency matrix . I am using igraph module. I want to directly load the input as adjacency instead of reading as edgelist or pajek format. Can anypne help ? Thanks , Pankaj Barah Mathematical modelling & Computational Biolo