similar to: mapply then export

Displaying 20 results from an estimated 2000 matches similar to: "mapply then export"

2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List: Thank you for the replies to my post yesterday. Gabor and Phil also gave useful replies on how to improve the function by relying on mapply rather than the explicit for loop. In general, I try and use the family of apply functions rather than the looping constructs such as for, while etc as a matter of practice. However, it seems the mapply function in this case is slower (in terms of CPU
2017 Apr 19
5
R 3.4 has broken C++11 support
Hi! Well, my linux distribution has very recent versions of everything, so a working C++11 compiler exists: $ gcc --version | head -n1 gcc (GCC) 6.3.1 20170306 Could wrong ./configure options be at fault here? See: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=r-devel#n40 My sessionInfo(): $ R-devel --slave -e 'sessionInfo()' | head -n3 R Under development (unstable)
2008 Jun 18
3
[LLVMdev] JIT bug?
Hi, I see sth that to me looks like a JIT bug. The program is the KMeans benchmark from the STAMP benchmark suite (http://stamp.stanford.edu). Overwrite ./common/Defines.common.mk with the attached files to make CC/LD customizable. in ./kmeans, for ./kmeans -m40 -n40 -t0.00001 -i inputs/random-n65536-d32-c16.txt -p 1 : make -f Makefile.seq clean CC='llvm-gcc' LD='llvm-gcc
2017 Apr 19
4
R 3.4 has broken C++11 support
Hi Dirk and Martyn, > That looks fine. Can you please give a reproducible example of a package > that compiles correctly on R 3.3.3 but not with R 3.4.0 or R-devel. here you go, it?s pretty much the simplest package possible that needs C++11: https://github.com/flying-sheep/cxx11test > Maybe you can share with us how you configure the build of R-devel? Sure, in the mail you quoted, I
2008 Jun 19
0
[LLVMdev] JIT bug?
Are you really running the JIT? IT seems like you are just using the static compiler. Unless the code is using some idiom that we happen to miss badly, it's uncommon to see this kind of performance issue. What's the optimization level you are building the benchmark at? Anyway, please file a bug about the performance issues. If the source code is freely available, someone can
2015 Aug 11
4
C6.7 evolution to cyrus imap(s) fails
On Tue, 11 Aug 2015, Alexander Dalloz wrote: > Am 11.08.2015 um 21:47 schrieb Dr J Austin: >>> >>> What does cyrus-imapd log? >>> >>> Alexander >>> >>> >> >> Where should I be looking ? > > /var/log/maillog is the default log file for the MAIL facility. Else check > your syslog() daemon configuration. > >
2008 Mar 22
1
Vectorization Problem
I have the code for the bivariate Gaussian copula. It is written with for-loops, it works, but I wonder if there is a way to vectorize the function. I don't see how outer() can be used in this case, but maybe one can use mapply() or Vectorize() in some way? Could anyone help me, please? ## Density of Gauss Copula rho <- 0.5 #corr R <- rbind(c(1,rho),c(rho,1)) #vcov matrix id <-
2015 Aug 11
2
C6.7 evolution to cyrus imap(s) fails
On Tue, 11 Aug 2015, Alexander Dalloz wrote: > Am 11.08.2015 um 22:28 schrieb Dr J Austin: >> >> Hi Alexander >> >> [root at maui:/var/log]$ watch 'tail -n40 maillog >> >> does not quiver when I try to connect > > That's suspicious. > > Let's exclude it is the client which causes the problem: Connect directly to > the IMAPS
2009 Aug 09
1
binary operators that implement row and column sweeps of matrices by vectors
Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment. Motivation: As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector (and operator) to ‘sweep’ across a matrix. Here is how these work. If M is I rows by J columns, then one entry corresponding to
2009 Jul 03
2
Deos anyone know of a summary of conformability rules? along with a specific problem
The rules for conformability of objects required for various operators remain a mystery as do some related problems like the rules for recycling in creating arrays etc. Would someone be able to direct me to where such rules are stated? In a related vein, there are all manner of operations that are readily coded in Gauss or in MATA that fail, often mysteriously, in R. Are there some
2008 Mar 23
1
mapply
In an earlier post, a person wanted to divide each of the rows of rawdata by the row vector sens so he did below but didn't like it and asked if there was a better solution. rawdata <- data.frame(rbind(c(1,2,2), c(4,5,6))) sens <- c(2,4,6) temp <- t(rawdata)/sens temp <- t(temp) print(temp) Gabor sent three other solutions and I understood 2 of them but not the
2003 Oct 14
3
mapply() gives seg fault
Hello everybody. I've been experimenting with mapply(). Does anyone else have problems with: R> mapply(rep,times=1:4, MoreArgs=42) (I get a seg fault). robin R> R.version _ platform powerpc-apple-darwin6.6 arch powerpc os darwin6.6 system powerpc, darwin6.6 status beta major 1 minor 8.0 year 2003 month 10 day 02 language R >
2011 Jul 31
1
Trouble Using mapply
Dear all, I am having a problem with mapply. I guess the reason is that mapply is not "vectorized". But could you please take a look at my code below and help me to find a solution (either a better way to use mapply or a different function to call). Thanks a lot! ##beginning of my code myfun <- function(threshold, all.data) { ##Just a demostration of a function that takes a
2012 Mar 12
2
mapply & assign to generate functions
Hi, I have a problem that I'm finding a bit tricky. I'm trying to use mapply and assign to generate curried functions. For example, if I have the function divide divide <- function(x, y) { x / y } And I want the end result to be functionally equivalent to: half <- function(x) divide(x, 2) third <- function(x) divide(x, 3) quarter <- function(x) divide(x, 4) But I want
2011 Feb 03
1
mapply question (?)
Hi, I have a function myFun which I want to call multiple times, using different argument lists. myFun("v1", "2009", 1) myFun("v2", "2008", 1) myFun("q", "2001") How can I easily do this in R? Should I use mapply? I unsuccessfully tried something like: x <- list(c("v1", "2009", 1), c("v2",
2012 Oct 30
1
mapply instead for loop
Hi all!   My question in about using mapply instead for loop. Below is a example with for loop: Is it posible to give same results with mapply function?   Thanks for help!   OV   x <- 1:10 y <- 1:10 xyz <- data.frame(expand.grid(x,y)[1], expand.grid(x,y)[2], z = rnorm(100)) names(xyz) <- c("x", "y", "z") head(xyz) size <- 2 output <- NULL   ### for
2010 Apr 13
0
Multicore mapply
Quick question regarding multicore versions of mapply. Package 'multicore' provides a parallelized version of 'lapply', called 'mclapply'. I haven't found any parallelized versions of 'mapply', however (although one can use the lower level function 'parallel', it becomes harder to control the number of spawned processes etc). Is anyone aware of a
2008 Oct 21
4
Multi matrix row-wise mapply?
Hi group! Suppose I have 2 matrices A and B of equal dimensions. I want to apply a function f to all corresponding pairs of rows from A and B in an efficient manner. Basically, I want mapply(f, data.frame(A), data.frame(B)) but for rows. How do I do it? Thanks, Andrey
2012 Nov 15
1
bug with mapply() on an S4 object
Hi, Starting with ordinary vectors, so we know what to expect: > mapply(function(x, y) {x * y}, 101:106, rep(1:3, 2)) [1] 101 204 309 104 210 318 > mapply(function(x, y) {x * y}, 101:106, 1:3) [1] 101 204 309 104 210 318 Now with an S4 object: setClass("A", representation(aa="integer")) a <- new("A", aa=101:106) > length(a)
2011 Feb 23
2
list multiplied by a factor / mapply
Dear list, this works fine: x <- split(iris, iris$Species) x1 <- lapply(x, function(L) transform(L, g = L[,1:4] * 3)) but I would like to multiply each Species with another factor: setosa by 2, versicolor by 3 and virginica by 4. I've tried mapply but without success. Any thoughts? Thanks for any idea! Patrick