similar to: find value between two other numbers?

Displaying 20 results from an estimated 4000 matches similar to: "find value between two other numbers?"

2005 Sep 23
3
Removing "-" (Dash) from Dialed Numbers
I am trying to enable dial-by-email by using LDAPget to query an Active Directory server. I've got it retrieving the phone number fine. Unforunately, the numbers stored in active directory are either in the format: (xxx) xxx-xxxx or xxx-xxx-xxxx. Is there any way to parse characters out of the dialed phone number so that I only end up with digits (remove spaces, parenthesis and dashes)?
2008 Dec 09
4
extract the digits of a number
Hello, Anyone knows how can I do this in a cleaner way? mynumber = 1001 as.numeric(unlist(strsplit(as.character(mynumber),""))) [1] 1 0 0 1 Thanks in advance, Gustavo
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
On Jul 15, 2015, at 12:51 PM, William Dunlap wrote: > I think rapply() was changed to act like lapply() in this respect. > When I looked at the source of the difference, it was that typeof() returned 'language' in 3.2.1, while it returned 'list' in the earlier version of R. The first check in rapply's code in both version was: if (typeof(object) != "list")
2015 Jul 15
3
bquote/evalq behavior changed in R-3.2.1
In 3.1.2 eval does not store the result of the bquote-generated call in the given environment. Interestingly, in 3.2.1 eval does store the result of the bquote-generated call in the given environment. In other words if I run the given example with eval rather than evalq, on 3.1.2 "x" is never stored in "fenv," but it is when I run the same code on 3.2.1. However, the given
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
David, If you are referring to the solution that would be: rapply(list(test), eval, envir = fenv) I thought I explained in the question that the above code does not work. It does not throw an error, but the behavior is no different (at least in the output or result). Using the above code still results in the x object not being stored in fenv on 3.1.2. Dayne On Wed, Jul 15, 2015 at 4:40 PM,
2009 Sep 30
3
A point in a vector?
Dear list, I have a strange requirement .... I have a vector, for example v<- c(0,0,0,0,1,2,4,6,8,8,8,8). I have a value,for example x<- 4.8. I would like to understand in which sub interval of v is x. In this case, v would be in the sub interval [4,6] that is in the subinterval starting from element j=7 to the element j+1=8. Can we do that with an R command? Regards -- Corrado Topi
2004 Aug 10
1
Firefly and *... Argh!
Okay, I've read as much as I can, and I think i've followed instructions, but I'm still having problems with * and firefly... I can get outgoing to other freshtel working, but not incoming (I get the "not available" voicemail), or outgoing to landline. I'm using the debian asterisk package (0.9.1-RC1-4) My iax.conf has in general (under my FWD register, which
2005 Mar 13
2
How can I eveluate trailing numbers in extensions.conf?
Checkout http://www.voip-info.org/wiki-Asterisk+variables I believe that should have the answer for you. furthermore assuming that your number is always going to be 12 digits. exten => _NXX.,1,SetVar(mynumber=${EXTEN:0:12}) - will give you your number. Hope this helps. Umar On Sun, 13 Mar 2005 09:25:11 +0100, Harald Milz <hm@seneca.muc.de> wrote: > Hi, > > this
2004 Aug 28
10
Broadvoice problem
Since Thursday evening my asterisk box has been failing to register with broadvoice. I haven't changed any of my config files in the last week. Can anyone suggest anything? Asterisk is reporting: *CLI> Aug 28 16:15:17 NOTICE[6150]: chan_sip.c:3914 sip_reg_timeout: Registration for '703XXXXXXX@147.135.8.129' timed out, trying again -- Got SIP response 404 "Not found"
2011 May 05
6
Averaging uneven measurements by time with uneven numbers of measurements
I have a new device that takes measurements anywhere from every second, to every 15 minutes (depending on changes). The matrix has a date, time and Y column (Y is the measurement). For three days it is 25,000 rows. How do I average the measurements by every 30 minutes so my matrix is 48 rows per day? I have been working on this and cannot figure out a simple method. Any ideas? Thank you. ----- In
2011 Dec 06
1
help wrapping findInterval into a function
Dear R Community, I hope you might be able to assist with a small problem creating a function. I am working with water-quality data sets that contain the concentration of many different elements in water samples. I need to assign quality-control flags to values that fall into various concentration ranges. Rather than a web of nested if statements, I am employing the findInterval function to
2016 Aug 04
1
findInterval(all.inside=TRUE) for degenerate 'vec' arguments
What should findInterval(x,vec,all.inside=TRUE) return when length(vec)<=1, so there are no inside intervals? R-3.3.0 gives a decreasing map of x->output when length(vec)==1 and -1's when length(vec)==0. Would '0' in all those cases be better? > findInterval(x=c(10, 11, 12), vec=11, all.inside=TRUE, rightmost.closed=FALSE, left.open=FALSE) [1] 1 0 0 >
2011 Apr 04
2
General binary search?
Is there a generic binary search routine in a standard library which a) works for character vectors b) runs in O(log(N)) time? I'm aware of findInterval(x,vec), but it is restricted to numeric vectors. I'm also aware of various hashing solutions (e.g. new.env(hash=TRUE) and fastmatch), but I need the greatest-lower-bound match in my application. findInterval is also slow for
2010 Jul 12
2
findInterval and data resolution
Hello Wise Ones... I need a clever way around a problem with findInterval. Consider: vec1 <- 1:10 vec2 <- seq(1, 10, by = 0.1) x1 <- c(2:3) a1 <- findInterval(x1, vec1); a1 # example 1 a2 <- findInterval(x1, vec2); a2 # example 2 In the problem I'm working on, vec* may be either integer or numeric, like vec1 and vec2. I need to remove one or more sections of this vector;
2013 Sep 13
2
how to get values within a threshold
input: > values [1] 0.854400 1.648465 1.829830 1.874704 7.670915 7.673585 7.722619 > thresholds [1] 1 3 5 7 9 expected output: [1] 1 4 4 4 7 That is, need a vector of indexes of the maximum value below the threshold. e.g. First element is "1", because value[1] is the largest below threshold "1". Second element is "4", because value[4] is the
2011 Jun 01
1
finding numbers in a range
Hi, Is there a quick way of finding if numbers in a vector falls in between a range defined in another matrix. As an example let x y 0 1 3 2 6 9 25 15 18 I want to check one by one whether 0,2 and 25 falls in any of the ranges in y. I am using 2 for loops but it is taking a huge amount of time. is there any other alternative way to do this? best, salih [[alternative HTML
2011 Feb 17
2
does range of values in array include a third value?
I'm using the range command to get the minimum and maximum values of an array as in x <- range(array_y) which gives me two values such as [1] -2 9 I need to be able to test if this range of values includes a third value. For example I'd like to query 1) does the range of -2 to 9 include 3, answer TRUE 2) does the range of -2 to 9 include -6, answer FALSE? All values could be
2018 Apr 19
0
create multiple categorical variables in a data frame using a loop
> On Apr 19, 2018, at 11:20 AM, Ding, Yuan Chun <ycding at coh.org> wrote: > > Hi All, > > I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code. > > pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA > cat.pfoa[pfas.pheno$log2pfoa
2018 Apr 20
1
create multiple categorical variables in a data frame using a loop
> On Apr 19, 2018, at 1:22 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Apr 19, 2018, at 11:20 AM, Ding, Yuan Chun <ycding at coh.org> wrote: >> >> Hi All, >> >> I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
2008 Sep 22
1
findInterval(), binary search, log(N) complexity
Dear R users, the help for findInterval(x,vec) suggests a logarithmic dependence on N (=length(vec)), which would imply a binary search type algorithm. However, when I "test" this hypothesis, in the following manner: set.seed(-3645); l <- vector(); N.seq <- c(5000, 500000, 1000000, 10000000, 50000000);k <- 1 for (N in N.seq){ tmp <- sort(round(stats::rt(N, df=2), 2));