Try this:
> x <- read.table(textConnection(
+ " ID Date Segment Slice Tract Lesion
+ CSPP005 12/4/2007 1 1 LCST 0
+ CSPP005 12/4/2007 1 1 LPC 2
+ CSPP005 12/4/2007 1 1 RPC 3
+ CSPP005 12/4/2007 1
merge(Whole,Where.Lesion2)
gives the intersections (ID/Date/Segment/Slice, i.e. the first 4
columns), except that the merge function drops the original row.names
in the dataframe "Whole".
Now, the question evolves to finding row.names of one data frame that
matches any of the rows in another data
Hi,
In the example given below, I want to code the "Lesion" in the 7th row
as 2 because the 2nd row has a Lesion value of 2.
ID Date Segment Slice Tract Lesion
7 CSPP005 12/4/2007 1 1 Whole2
Otherwise (if there is no lesion value of 2 in row 1-6), I
It is not entirely clear what type of transformation you are trying to do.
Can you provide some sample data and then show what you would expect the
output to look like; make sure the data covers all the cases you want to
transform.
On Sat, Mar 13, 2010 at 8:54 PM, Junqian Gordon Xu wrote:
> I ha
I have a multilevel dataframe (df):
ID Date Segment Slice Tract Lesion
1 CSPP005 12/4/2007 1 1 LCST 0
2 CSPP005 12/4/2007 1 1 LPC 2
3 CSPP005 12/4/2007 1 1 RPC 3
4 CSPP005 12/4/2007 1 1 R
5 matches
Mail list logo