Question: Replacing values in an RleList
0
gravatar for maltethodberg
2.8 years ago by
maltethodberg140
Sweden
maltethodberg140 wrote:

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?

ifelse rlelist • 441 views
ADD COMMENTlink modified 2.8 years ago by theobroma2210 • written 2.8 years ago by maltethodberg140
Answer: Replacing values in an RleList
0
gravatar for theobroma22
2.8 years ago by
theobroma2210
theobroma2210 wrote:

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 COMMENTlink written 2.8 years ago by theobroma2210
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 216 users visited in the last hour