, TIBCO Software
wdunlap tibco.com
From: Ben quant [mailto:ccqu...@gmail.com]
Sent: Monday, May 14, 2012 1:19 PM
To: Steve Lianoglou
Cc: William Dunlap; r-help@r-project.org
Subject: Re: [R] range segment exclusion using range endpoints
Thank you Steve!
This does everything I need (at this point
graphical check do
> >> > plot(x, s, setdiffRanges(x, s))
> >> Are those the numbers you want?
> >>
> >> I find it easier to use standard functions and data structures for this
> >> than
> >> to adapt the cumsum/order idiom to different situations
Bill Dunlap
>> Spotfire, TIBCO Software
>> wdunlap tibco.com
>>
>>
>> > -Original Message-
>> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>> On Behalf
>> > Of Ben quant
>> > Sent: Monday, May 14
functions and data structures for this
> than
> to adapt the cumsum/order idiom to different situations.
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun
nt
> Sent: Monday, May 14, 2012 11:07 AM
> To: jim holtman
> Cc: r-help@r-project.org
> Subject: Re: [R] range segment exclusion using range endpoints
>
> Turns out this solution doesn't work if the s range is outside the range of
> the x range. I didn't include tha
Turns out this solution doesn't work if the s range is outside the range of
the x range. I didn't include that in my examples, but it is something I
have to deal with quite often.
For example s1_rng below causes an issue:
x_rng = c(-100,100)
s1_rng = c(-250.5,30)
s2_rng = c(0.77,10)
s3_rng = c(25
Great solution! Thanks!
Ben
On Sat, May 12, 2012 at 12:50 PM, jim holtman wrote:
> Here is an example of how you might do it. It uses a technique of
> counting how many items are in a queue based on their arrival times;
> it can be used to also find areas of overlap.
>
> Note that it would be
", c(unlist(RangesList, recursive=FALSE),
> list(finite=TRUE)))
>ylim <- c(0, length(RangesList)+1)
>plot(type="n", xlim, ylim, xlab="", ylab="", axes=FALSE)
>grid(ny=0)
>axis(side=1)
>axis(side=2, at=seq_along(RangesList)
gesList), lab=labels, las=1, tck=0)
box()
incr <- 0.45 / max(vapply(RangesList, nrow, 0))
xr <- par("usr")[1:2] # for intervals that extend to -Inf or Inf.
for(i in seq_along(RangesList)) {
r <- RangesList[[i]]
if (nrow(r)>0) {
y
Here is an example of how you might do it. It uses a technique of
counting how many items are in a queue based on their arrival times;
it can be used to also find areas of overlap.
Note that it would be best to use a list for the 's' end points
> # note the next
Hello,
I'm posting this again (with some small edits). I didn't get any replies
last time...hoping for some this time. :)
Currently I'm only coming up with brute force solutions to this issue
(loops). I'm wondering if anyone has a better way to do this. Thank you for
your help in advance!
The pr
11 matches
Mail list logo