[R] For Subset or Reshaping the Table

From: dinesh kumar <barupal_at_gmail.com>
Date: Thu, 14 Feb 2008 17:53:33 -0800


Hi R users
I am a new user in the field of R.
I want to subset or reshape a data.frame. For example I have a matrix like

   A B C D E F G
a 1 2 3 4 5 6 7
b 4 6 8 9 5 5 6
c 3 4 4 4 3 3 6
d 1 2 4 6 8 8 9
e 5 6 7 8 9 2 3

I want to reshape the matrix in this format

Row Col Value

a       D     4
a       E     5
a       F     6
.        .      ..
e       E     9

I want only the pair which pass a threshold for example >3.

Please help me.

Dinesh

-- 
Dinesh Kumar Barupal
Research Associate
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 15 Feb 2008 - 04:02:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 15 Feb 2008 - 14:00:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive