search for: apply

Displaying 20 results from an estimated 56494 matches for "apply".

Did you mean: apple
2007 Jul 23
2
assertion failed with KMail 3.5.6 and dovecot 1.0.0
...te: N..X-KMail-MDN-Sent: ..X-UID: 0....synchronizing roby..Pulling from "http://www .laas.fr/~sjoyeux/darcs/roby".....No remote changes to pull in!..Done optimizing!..synchronizing genom.rb..Pulling from "http://www.laas.fr/~sjoyeux/darcs /genom.rb".....Finished pulling and applying...Done optimizing!..synchronizing typelib..Pulling from "http://www.laas.fr/~sjoyeux/darcs/typelib".....Finis hed pulling and applying...Done optimizing!..synchronizing utilmm..Pulling from "http://www.laas.fr/~sjoyeux/darcs/utilmm".....No remote changes to pull i n!..Don...
2005 Dec 07
1
Dots argument in apply method
Hello everyone, I'm working on a package using S4 classes and methods and I ran into the following "problem" when I tried to create an "apply" method for objects of one of my new classes. I've found a way around the problem but I wonder if I did not paint myself into the corner. I'd like your opinion about that. So I have an object "myObj" of class "myClass". I define a new function ".apply.myCl...
2009 Jul 11
4
Graphical text error in game (MI5)
Hi, have recently bought MI5 (Tales of Monkey Island), and I am currently trying to run it under wine in Ubuntu 9.04 and I am running the latest development version 1.1.25. I am running this over the latest stable version due to less graphical errors when trying to run the game. To get the game running I followed this guide posted on the telltale's ( the creators of the game) forum >
2003 Feb 14
0
[Bug 50] New: Kernel panic with netfilter
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=50 Summary: Kernel panic with netfilter Product: netfilter/iptables Version: patch-o-matic Platform: i386 OS/Version: All Status: NEW Severity: normal Priority: P2 Component: unknown AssignedTo: laforge@netfilter.org
2007 Sep 14
0
4 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.c test/trace
libswfdec/swfdec_as_function.c | 35 ++++++++++++++++++---------------- libswfdec/swfdec_as_object.c | 2 - test/trace/Makefile.am | 9 ++++++++ test/trace/function-apply-crash-5.swf |binary test/trace/function-apply-crash-6.swf |binary test/trace/function-apply-crash-7.swf |binary test/trace/function-apply-crash-8.swf |binary test/trace/function-apply-crash.as | 7 ++++++ 8 files changed, 36 insertions(+), 17 deletions(-) New commits: diff-tree 28bdc729c...
2020 May 22
3
Compatibility issues caused by new simplify argument in apply function
Dear R Developers, the new simplify argument in apply causes that my package (hsdar) does not pass the checks in R-devel. The workaround, Kurt Hornik send me, is working for the R-code: if("simplify" %in% names(formals(base::apply))) do something else do something else Unfortunately, I cannot conditionalize the man pages of the func...
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone I have a piece of code that looks like this: mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120", stdev="BMM.SD120")) mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120", stdev="GM1.SD120")) mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120", stdev="IYC.SD120")...
2020 May 22
2
Compatibility issues caused by new simplify argument in apply function
Interesting problem. I'm very rusty on S4 but would one solution be to, already now, add 'simplify = TRUE' to the S4 method and document it; setMethod("apply", signature(X = "Speclib"), function(X, FUN, bySI = NULL, ..., simplify = TRUE) { ? Henrik On Fri, May 22, 2020 at 6:26 AM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > You...
2009 Nov 19
4
Is there an variant of apply() that does not return anything?
There are a few version of apply() (e.g., lapply(), sapply()). I'm wondering if there is one that does not return anything but just silently apply a function to the list argument. For example, the plot function is applied to each element in 'alist'. It is redundant to return anything from apply. apply(alist,function(...
2018 Jul 30
3
apply with zero-row matrix
Hi Martin, Fair enough for R functions in general. But the behaviour of apply violates the expectation that apply(m, 1, fun) calls fun n times when m has n rows. That seems pretty basic. Also, I understand from your argument why it makes sense to call apply and return a special result (presumably NULL) for an empty argument; but why should apply call fun? Cheers David On...
2011 Aug 30
4
weird apply() behavior
Hi, I had a weird results from using apply(). Here is an simple example: > y<-data.frame(list(a=c(1,NA),b=c('2k','0'))) > y ??? a???? b 1? 1?? 2k 2 NA?? 0 > apply(y,1,function(x){x<-unlist(x); if (!is.na(x[2]) & x[2]=='2k' & !is.na(x[1]) & x[1]=='1') 1 else 0} ) This should prin...
2003 Oct 31
4
Array Dimension Names
I would like to reference array dimensions by name in an apply and a summary function. For example: apply(x, "workers", sum) Is there a better way to do this than creating a new attribute for the array and then creating new methods for apply and summary? I don't want to name the individual elements of each dimension (such as with dimnames) bu...
2003 Jun 08
6
Basic question on applying a function to each row of a dataframe
Hi, I have a function foo(x,y) and a dataframe, DF, comprised of two vectors, x & w, as follows : x w 1 1 1 2 2 1 3 3 1 4 4 1 etc I would like to apply the function foo to each 'pair' within DF e.g foo(1,1), foo(2,1), foo(3,1) etc I have tried >apply(DF,foo) >apply(DF[,],foo) >apply(DF[DF$x,DF$w],foo) However, none of the above worked. Can anyone help ? Thanks in advance, Peter
2011 Nov 16
2
apply on rows and columns?
I have the following scenario: > m <- matrix(1:4, ncol=2) > m [,1] [,2] [1,] 1 3 [2,] 2 4 > apply(m, 2, sum) [1] 3 7 > apply(m, 1, sum) [1] 4 6 So I can apply to rows *or* columns. According to the documentation (?apply) MARGIN a vector giving the subscripts which the function will be applied over. E.g., for a matrix 1 indicates rows, 2 indicates columns, c(1, 2) indicates rows and colu...
2010 Apr 04
2
"mantel.haenszel.test for trend in S-plus doesn't work i R"
Dear R'ers, When I used S-plus i wrote a small program for a Mantel-Haenszel test for trend (I think it worked). Unfortunately I can't get it working in R. It appears as if my use of 'el' is the problem but I can't sort it out. Error in apply(array, c(, 2, 3), function(el) el * 1:s) : argument is missing, with no default Further down in the program I use 'el' as well Can this be sorted out? Fredrik ####### "mantel.ext.test" <- function(array) { # Mantel-Extension Test -- Testing for trend in the presence o...
2011 Jul 12
2
apply (or similar preferred) for multiple columns
Dear all, I would like to use the apply or a similar function belonging to this family, but applying for each column (or row) but let say for each q columns. For example I would like to apply a function FUN for the first q columns of matrix X then for q+1:2*q and so on. If I do apply (X, 2, FUN) it applies for each column and not for eve...
2010 Jul 09
3
apply is slower than for loop?
I thought the "apply" functions are faster than for loops, but my most recent test shows that apply actually takes a significantly longer than a for loop. Am I missing something? It doesn't matter much if I do column wise calculations rather than row wise ## Example of how apply is SLOWER than for loop: #r...
2012 Jun 15
3
moving from loops to apply
Dear subscribers, I have made a simulation using loops rather than apply, simply because the loop function seems more natural to me. However, the current simulation takes forever and I have decided - finally - to learn how to use apply, but - as many other people before me - I am having a hard time changing habits. My current problem is: My current code for the loop is...
2010 Dec 19
1
[PATCH] am: Allow passing exclude and include args to apply
...'git am' (--continue | --skip | --abort) @@ -87,6 +88,8 @@ default. You can use `--no-utf8` to override this. -C<n>:: -p<n>:: --directory=<dir>:: +--exclude=<path-pattern>:: +--include=<path-pattern>:: --reject:: These flags are passed to the 'git apply' (see linkgit:git-apply[1]) program that applies diff --git a/git-am.sh b/git-am.sh index df09b42..174f6a2 100755 --- a/git-am.sh +++ b/git-am.sh @@ -22,6 +22,8 @@ whitespace= pass it through git-apply ignore-space-change pass it through git-apply ignore-whitespace pass it through git-a...
2009 Jan 08
2
Excluding data with apply
Dear all, 'Apply' is a great thing for running functions on rows or columns of a matrix: X <- rnorm(20, mean = 0, sd = 1) dim(X) <- c(5,4) apply(X,2,sum) Is there a way to use apply for excluding rows or columns from a matrix to run functions on the remaining rows or columns? I know, I could do this...