Replacing values in an RleList
1
0
Entering edit mode
maltethodberg ▴ 180
@maltethodberg-9690
Last seen 28 days ago
Denmark

Given an RleList (i.e. from either calling coverage() or import.bw()) what is the best way to replace certain values?

I am interested in something this:

x #RleList
x[x < 0] <- 0

I'm doing this many times, and compared to how quick most other operations on RleLists are, this step becomes the bottleneck.

Is there a better way?

rlelist ifelse • 1.2k views
ADD COMMENT
0
Entering edit mode
theobroma22 ▴ 10
@theobroma22-11920
Last seen 8.0 years ago

Your code doesn't follow the logic for a list object. You need to provide some simulated data!! Lists can take the form of [x][[i]].

ADD COMMENT

Login before adding your answer.

Traffic: 527 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6