[BioC] conditional merge of duplicated rows in data.frame
Ninni Nahm [guest]
guest at bioconductor.org
Mon Jan 20 17:54:28 CET 2014
Hi all!
I have the following problem.
chr13 1260 1275 chr13_38134720_38136919
chr13 1261 1276 chr13_38134720_38136919
chr15 839 854 chr15_63332831_63335030
chr15 840 856 chr15_63332831_63335030
chr15 837 852 chr15_63332831_63335030
chr15 842 857 chr15_63332831_63335030
In the 2. and 3. column are positions which I want to combine whenever the value in column 4 is the same. For example, I would want:
chr13 1260 1276 chr13_38134720_38136919
chr15 837 857 chr15_63332831_63335030
Any help is highly appreciated!!!
-- output of sessionInfo():
sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
--
Sent via the guest posting facility at bioconductor.org.
More information about the Bioconductor
mailing list