Hello members,

I have this data frame with 3 columns,
C1      C2      TYPE
10      20      A
33      44      B
66      80      A
111     140     B
144     220     B
300     340     A
380     449     A
455     500     B
510     520     A
540     580     B

Here,  the rows 4 , 5 has type "B" and similarly 6,7 has "A" . I need to
merge these rows in a way to get the output with unique type, something like
below, where the lowest value from DF$C1 and  highest value from DF$C2
corresponding to rows 4,5 are picked.

C1      C2      TYPE
10      20      A
33      44      B
66      80      A
111     220     B
300     449     A
455     500     B
510     520     A
540     580     B

I Request your kind help..
Regards,
karthick




--
View this message in context: 
http://r.789695.n4.nabble.com/merging-two-specific-rows-in-a-DF-tp4650826.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to