search for: is_numeric

Displaying 17 results from an estimated 17 matches for "is_numeric".

Did you mean: as_numeric
2019 Nov 14
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...;- function(x) FALSE x <- matrix() is_array(x) #> [1] FALSE x <- matrix() inherits(x, "array") #> [1] FALSE class(x) #> [1] "matrix" It would be nice to make sure this is consistent with the behaviour of integers, which have an implicit parent class of numeric: is_numeric <- function(x) UseMethod("is_numeric") is_numeric.numeric <- function(x) TRUE is_numeric.default <- function(x) FALSE x <- 1L is_numeric(x) #> [1] TRUE inherits(x, "numeric") #> [1] FALSE class(x) #> [1] "integer" Hadley -- http://hadley.nz
2008 Jan 09
4
Using Prototype - Getting Javascript Error - "Object doesn't support this property or method"
...==true) { listItems = $("vidList").childElements("li"); listItems.each ( function(item) { Event.observe($(item).childElements("a")[0], "click", assignB); } ) } var so = new SWFObject(thevideo, "vidplayer", "<?php if (is_numeric($width)) echo $width; else echo $dw; ?>", "<?php if (is_numeric($height)) echo $height; else echo $dh; ?>", "8", "#000000"); so.addParam("wmode", "transparent"); so.write("videoPlayer"); } function assignB(o) { listItems...
2019 Nov 14
0
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...have an implicit parent class of numeric: I agree but I don't know if Martin wants to go that far for R 4.0. Hopefully that's the longer term plan though (maybe for R 4.1?). Note that there are other situations that could follow e.g. data.frame/list and probably more... H. > > is_numeric <- function(x) UseMethod("is_numeric") > is_numeric.numeric <- function(x) TRUE > is_numeric.default <- function(x) FALSE > > x <- 1L > is_numeric(x) > #> [1] TRUE > inherits(x, "numeric") > #> [1] FALSE > class(x) > #> [1] &qu...
2012 Sep 24
4
Overriding variables.
I am trying to override variables in a class that is defined in the default node profile. I want parent class to be included in every single node, but override its variables in others. I have tried it several different ways now, and every single time the variables either become unset (undefined) or are set to the value of the first if statement. Here is my current iteration of failure.
2019 Nov 02
6
head.matrix can return 1000s of columns -- limit to n or add new argument?
Thanks Martin and Peter, I agree that we can be careful and narrow and still see a nice improvement in behavior. While Herve's point is valid and I understand his frustration, I think staying within the matrix vs c(matrix, array) space is the right scope for this work in terms of fiddling with inheritance. As another point, I don't know off the top of my head of any other classes which
2019 Nov 15
5
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
...") would be less problematic because most of the wrong uses of if(class(..) == "integer") would already have been eliminated ... Martin > Note that there are other situations that could follow e.g. > data.frame/list and probably more... > H. >> is_numeric <- function(x) UseMethod("is_numeric") >> is_numeric.numeric <- function(x) TRUE >> is_numeric.default <- function(x) FALSE >> >> x <- 1L >> is_numeric(x) >> #> [1] TRUE >> inherits(x, "numeric&quot...
2010 Jan 14
0
[PATCH] Presents duplicate DNS and NTP server entries.
...8,13 @@ add_if_not_exist() { || echo "$string" >> "$file" } +# $1 - the string to be trimmed +trim_whitespace () { + local text=${1} + + printf "$text" | awk '{gsub(/^[ ]*/,"",$0); gsub(/[ ]*$/,"",$0) ; print }' +} + is_numeric() { printf "$1" | grep -q -E '^[0-9]+$' } -- 1.6.5.2
2010 Jan 14
1
Ignore that last patch...
The first line of the comment had a typo in it.
2010 Mar 24
1
Resending a refactored patch...
This was an older patch that had to be rebased against the current tip.
2010 Mar 24
1
Supercedes previous patch...
This includes a missed break and two spots where $ADDRESS was copied as $address instead.
2010 Jan 18
1
Refactored patch...
This patch supercedes the previous and includes fixes based on feedback from apevec. Duplicate checks now check the whole address, so substrings won't cause false positives.
2010 Jan 18
1
Fixed a karg issue...
I missed one situation in the last patch. It wasn't properly handling the karg for NTP. This patch fixes that.
2006 Dec 29
0
PHP to call script
...erId = $strCallerNumber; #get the phone number from the posted form $strExten = $_POST['txtphonenumber']; $callNumber = $strExten; #specify the caller id for the call $strCallerId = "Web will call <$callNumber>"; $length = strlen($strExten); if ($length == 10 && is_numeric($strExten)) { $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Events: off\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, "Secret: $strS...
2013 Aug 06
7
Puppet first run timing out
I''m working on deploying Puppet to our environment and after reinstalling some nodes, I run Puppet for the first time. It appears to be updating some Puppet specific files (see below), and then times out with the error: "Error: /File[/var/lib/puppet/lib/facter/ip6tables_version.rb]/ensure: change from absent to file failed: execution expired Error: Could not retrieve plugin:
2012 Oct 02
2
Questions on converting to ConfBridge
I'm looking at what would be involved in converting from MeetMe to ConfBridge and there seems to be a lot of missing administrative things, but I hope I'm just missing it. We all know about the missing realtime linkage. That's a major nuisance, but can be worked around. More serious is that the CLI command to display users in a ConfBridge don't show the caller ID information, so
2007 Jan 02
5
Call connected, cannot hear or speak - $20 for fix
...------------------------------------------------------------------------ #get the phone number from the posted form $strExten = $_POST['txtphonenumber']; #specify the caller id for the call $strCallerId = $_POST['txtcid']; $length = strlen($strExten); if ($length == 11 && is_numeric($strExten)) { $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Events: off\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, "Secret: $strS...
2008 Sep 03
8
suggestion of new API function for embedded programming.
While doing some embedded programming and trying to figure out how to generate a hand coded SEXP equivalent of the line "t.test(x,conf.level=(1-p))$conf.int[2]" I had an idea for an addition to the embedded API. There are a number of hidden or static parse functions (R_ParseBuffer, R_Parse1Buffer, etc.) which take an IoBuffer* and returns a parsed tree. If one or more of these