t;= p1)- 1*(t2 > p2)*(t2 <= p3)
>
>Thank you very much for your help.
>Have a nice day
>Marine
>
>
>____
>De : Bert Gunter
>Envoy� : samedi 20 juillet 2019 00:46
>� : Marine Regis
>Cc : r-help@r-project.org
>Objet : Re: [
_
De : Bert Gunter
Envoy� : samedi 20 juillet 2019 00:46
� : Marine Regis
Cc : r-help@r-project.org
Objet : Re: [R] Check to see if a value is included within intervals
If I understand correctly (make sure that I do!), ?findInterval should
essentially do what you want.
I
If I understand correctly (make sure that I do!), ?findInterval should
essentially do what you want.
In your example (thanks!), I assume that:
1) The cutpoints defining your intervals are increasing, so p1 < p2 < p3
(p4 is unused)
2) You want to know which t2's are in the two intervals t2 <= p1 a
Hello all,
The R code below tests if values of the variable �t� are included or not within
intervals that are defined from the data frame dat. The expected results are
displayed using the function "rle" (see code below). Here is the code:
ta <- 100
tb <- 140
tc <- 40
td <- 85
datF <- data.fram
4 matches
Mail list logo