similar to: Inf and lazy evaluation

Displaying 20 results from an estimated 40000 matches similar to: "Inf and lazy evaluation"

2005 Jan 13
4
zero index and lazy evaluation in ifelse()
I don't understand this behavior: > a <- c(0, 1, 2, 3) > b <- c(1, 2, 3, 4) > ifelse (a == 0, 0, b[a]) [1] 0 2 3 1 rather than the desired 0 1 2 3. Thanks for any explanation.
2001 Mar 22
1
lazy evaluation and DUP=F
I am having some difficulty understanding the implication of lazy evaluation mixed with DUP=F in a .Fortran call. In qr.qty from base DUP is not used as an argument so defaults to T. I am calling qr.qty with a very large array and would like to set DUP=F in the .Fortran call so that qr.qty would be defined as copied below. Is there some risk that a variable used as the argument in the original
2015 Nov 17
4
Re: Fwd: [PATCH] v2v: virtio-win: include *.dll too
I think one - maybe final? - problem. How can I tell the difference between drivers for "client" versions of Windows (eg. Windows 7) and server versions of Windows (eg. Windows 2008 Server)? It seems in many or most cases the drivers are identical, eg: $ md5sum viostor/2k12/amd64/* viostor/w8/amd64/* bbe250c13bf891fd7292ccab9908a63a viostor/2k12/amd64/viostor.cat
2009 Aug 20
2
Problem using findVar( ) in combination with R's lazy evaluation
Hi All, I have a few small questions about the usage of the C findVar( ) function when used in C code called with '.Call'. In my case I create an R function with an argument. This function calls some C code in which I use findVar( ) to retrieve the values from the argument. Ofcourse normally I would just give the values as argument to .Call, but in my project I need to use findVar for
2015 Nov 17
8
[PATCH 0/3] v2v: windows: Use '*.inf' files to control how Windows drivers are installed.
https://github.com/rwmjones/libguestfs/tree/rewrite-virtio-copy-drivers Instead of trying to split and parse elements from virtio-win paths, use the '*.inf' files supplied with the drivers to control how Windows drivers are installed. The following emails best explain how this works: https://www.redhat.com/archives/libguestfs/2015-October/msg00352.html
2017 Sep 05
0
Strange lazy evaluation of default arguments
Mathias, If it's any comfort, I appreciated the example; 'expected' behaviour maybe, but a very nice example for staff/student training! S Ellison > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Matthias > Gondan > Sent: 02 September 2017 18:22 > To: r-help at r-project.org > Subject: [R] Strange lazy evaluation of
2015 Nov 18
2
Re: [PATCH] v2v: virtio-win: include *.dll too
+Li Jin ----- Original Message ----- > From: "Vadim Rozenfeld" <vrozenfe@redhat.com> > To: "Richard W.M. Jones" <rjones@redhat.com> > Cc: "Roman Kagan" <rkagan@virtuozzo.com>, libguestfs@redhat.com, "Amnon Ilan" <ailan@redhat.com>, "Jeff Nelson" > <jenelson@redhat.com>, "Yan Vugenfirer"
1997 Apr 22
1
R-alpha: lazy evaluation and plot.step()
Today I received an email which made me realize that what I wrote in the FAQ explaining the different behavior of Martin's plot.step() under R and S is not really true. Does someone understand what is going on in the following? "test" <- function(x, y, xlab = deparse(substitute(x)), ylab = deparse(substitute(y))) { x <- sort(x) print(xlab) n <- length(x) y <-
2011 Apr 08
1
R and lazy evaluation
Haskell is the prototypical lazy evaluation language. One can compute a Fibonacci sequence by the Haaskell equivalent of the following R code. > fibs <- c(0, 1, rep(0, 8)) > fibs[3:10] <- fibs + fibs[-1] This works as follows. fibs = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 fibs = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 When one adds fibs to fibs[-1], one is effectively adding diagonally: fibs[3] <-
2015 Nov 05
3
Re: Fwd: [PATCH] v2v: virtio-win: include *.dll too
On Thu, Oct 29, 2015 at 11:05:42AM +1100, Vadim Rozenfeld wrote: > On Wed, 2015-10-28 at 14:53 +0300, Roman Kagan wrote: > > 1) tell which devices can be configured > Not sure that I fully understated your question. but if you are going to > create some sort of off-line automatic virtio-win drivers update > utility, then it shouldn't be too complicated. Firs of all you will
2011 Jun 08
1
Reference Class error message: may be caused by lazy evaluation?
Dear All, I came across an error message recently when constructing a reference class, an example is attached below, it looks like only if I call a specific method in advance, otherwise it cannot be found in defined method without using .self, this make it difficulty that sometimes in my initialize method, I need to call other method defined in the same reference class, the workaround for this is
2012 Sep 26
2
non-differentiable evaluation points in nlminb(), follow-up of PR#15052
This is a follow-up question for PR#15052 <http://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15052> There is another thing I would like to discuss wrt how nlminb() should proceed with NAs. The question is: What would be a successful way to deal with an evaluation point of the objective function where the gradient and the hessian are not well defined? If the gradient and the hessian both
2015 Oct 27
2
Re: [PATCH] v2v: virtio-win: include *.dll too
On Tue, Oct 27, 2015 at 09:12:41AM +0000, Richard W.M. Jones wrote: > On Mon, Oct 26, 2015 at 09:00:03PM +0300, Roman Kagan wrote: > > Windows QXL drivers include also qxldd.dll which used to get filtered > > out and not copied over into the guest. As a result QXL driver failed > > to install due to a missing file. > > (* Skip files without specific extensions. *)
2015 Nov 18
1
Re: Fwd: [PATCH] v2v: virtio-win: include *.dll too
On Tue, Nov 17, 2015 at 08:49:54PM +0000, Richard W.M. Jones wrote: > There was a copy and paste error. It should have read: > > $ md5sum viostor/2k8/amd64/* viostor/w7/amd64/* > d1132fbd27c98f25ea71a6eb4037b2f8 viostor/2k8/amd64/viostor.cat > defccbe48aca1cd97fee4d7b16053b72 viostor/2k8/amd64/viostor.inf > 6da6120368c097806e4ac7fc6b940810 viostor/2k8/amd64/viostor.pdb >
2006 Jul 14
1
dweibull retuns NaN instead of Inf (PR#9080)
Full_Name: G?ran Brostr?m Version: 2.3.1 OS: Linux, ubuntu Submission from: (NULL) (85.11.40.53) > dweibull(0, 0.5, 1) [1] NaN Warning message: NaNs produced in: dweibull(x, shape, scale, log) should give Inf (and no Warning). Compare with > dgamma(0, 0.5, 1) [1] Inf This happens when 'shape' < 1.
2013 Oct 30
1
Lazy evaluation of exec clause in ssh Match statement
Hello, At present, if a ssh Match block contains an exec clause, the specified command is executed regardless of whether any preceding clauses are true. Thus, Match host !*.* exec "some_command %h" ... would always execute some_command regardless of whether the host matches the preceding pattern. That seems undesirable, particularly as the user-specified command may do name lookups
2017 Sep 02
2
Strange lazy evaluation of default arguments
Another way to avoid the problem is to not redefine variables that are arguments. E.g., > Su3 <- function(u=100, l=u, mu=0.53, sigma2=4.3^2, verbose) { if (verbose) { print(c(u, l, mu)) } uNormalized <- u/sqrt(sigma2) lNormalized <- l/sqrt(sigma2) muNormalized <- mu/sqrt(sigma2) c(uNormalized, lNormalized, muNormalized) } > Su3(verbose=TRUE)
2004 Jun 07
1
Lazy Evaluation?
Hello, I've stumbled upon following problem, when trying to overload the methods for group Math for an S4-class which contains functions as slots. setClass("NumFunction", representation = list(fun = "function")) NumFunction <- function(f) new("NumFunction", fun = f) square <- function(x) x^2 NF <- NumFunction(square)
2006 Jun 04
2
evaluation of the alternative expression in ifelse
Dear all, I am trying to avoid the warnings produced by: > x <- -2:2 > log(x) [1] NaN NaN -Inf 0.0000000 0.6931472 Warning message: production de NaN in: log(x) I thought that using ifelse would be a solution, but it is not the case: > ifelse(test = x < 0, yes = NaN, no = log(x)) [1] NaN NaN -Inf 0.0000000 0.6931472 Warning message: production
2017 Sep 02
0
Strange lazy evaluation of default arguments
Dear Bill, All makes perfect sense (including the late evaluation). I actually discovered the problem by looking at old code which used your proposed solution. Still I find it strange (and, hnestly, I don?t like R?s behavior in this respect), and I am wondering why u is not being copied to L just before u is assigned a new value. Of course, this would require the R interpreter to track all these