similar to: lapply and Two TimeStamps as input

Displaying 20 results from an estimated 3000 matches similar to: "lapply and Two TimeStamps as input"

2003 Jul 11
4
module : cdr_sybase.so
If anyone is interested ... just in case! :-)... I have tried to write , based on the cdr_mysql.so module, an Sybase module. To compile you can use something like that: export SYBPLATFORM=linux export SYBASE=/opt/sybase cc -I$SYBASE/include -c -o cdr_sybase.o cdr_sybase.c cc -shared -Xlinker -x -o cdr_sybase.so cdr_sybase.o -lsybdb -lm -L$SYBASE/lib (anyone could write the corect Makefile
2011 Oct 15
2
function for handling time
Dear all I have the following time stamps (in the following format) MeasurementSet$TimeStamps        [,1] [,2] [,3] [,4] [,5]   [,6]   [1,] 2011    7    2   13   43 48.718   [2,] 2011    7    2   13   43 54.281   [3,] 2011    7    2   13   43 59.843   [4,] 2011    7    2   13   44  5.390   [5,] 2011    7    2   13   44 10.859   [6,] 2011    7    2   13   44 16.375   [7,] 2011    7    2   13   44
2012 Feb 05
2
vectors of matrix as iinput to lapply
Dear all I am using lapply (actually mclapply that share the same syntax). I want to call the same function that takes as input a vector. My initial data structure is a matrix that I want to cut it to multiple vectors (one vector for every row of the matrix) and then feed that to the function by using mclapply. Could you please help me converting the matrices to nrow times vectors. I would
2011 Apr 27
6
Assignments inside lapply
Dear all I would like to ask you if an assignment can be done inside a lapply statement. For example I would like to covert a double nested for loop for (i in c(1:dimx)){ for (j in c(1:dimy)){ Powermap[i,j] <- Pr(c(i,j),c(PRX,PRY),f) } } to something like that: ij<-expand.grid(i=seq(1:dimx),j=(1:dimy)) unlist(lapply(1:nrow(ij),function(rowId) { return
2011 Apr 09
1
For->lapply->parallel apply
Dear all, I would like to ask your help understand the subsequent steps for making my program faster. The following code: Gauslist<-array(data=NA,dim=c(dimx,dimy,dimz)) for (i in c(1:dimz)){ print(sprintf('Creating the %d map',i)); Gauslist[,,i]<-f <- GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha)) } creates 100 GaussMaps (each
2011 Oct 22
1
lapply to return vector
Dear all I have wrote the following line return(as.vector(lapply(as.data.frame(data),min,simplify=TRUE))); I want the lapply to return a vector as it returns a list with elements as shown below List of 30001 $ V1 : num -131 $ V2 : num -131 $ V3 : num -137 $ V4 : num -129 $ V5 : num -130 as you can see I have already tried the simplify=TRUE and also the as.vector() but both
2011 Nov 02
3
Error: serialization is too large to store in a raw vector
Dear all, I have quite large code (with lapply and mclapply) and I am getting the following error. Error: serialization is too large to store in a raw vector Is it possible to ask from R to extend the Error messages with more details? I would like to see where this problem exists. B.R Alex [[alternative HTML version deleted]]
2012 Mar 15
1
Subtract Date Between columns
Hello I have this little dataset, my goal is create one column in the data.frame with between the diference DataTime and Duration. I'm using the next code to make do this TIME_STAMP SESSIONTIME Time TimeStart 1162343932 8320 2006-10-31 19:01:34 2006-10-31 16:42:54 1162343215 592 2006-10-31 19:02:04 2006-10-31 18:52:12 1162341465 11875
2011 Apr 11
1
Mclapply and print statement
Dear all. I am using the mclapply function to split my code to the many cores my system has. It seems that is working fine. This is the parallel version of lcapply. The only problem that I seem to have is that the printf cannot print messages. The ideal to me is to have fro my function an output of the form Shadowlist<-mclapply(1:dimz, function(i) { print(sprintf('Creating the
2012 May 10
2
Split the work for many cores
Dear all, I am using my code the vgram.matrix of packets fields. I have around 500 matrices that I need to pass inside that function and then plot those results. Even though my system has 16 cores is quite clear that I am only using one of those. Would it be able to skip these 500 "tasks" to the 16 cores, with each processor having around 4 matrices to process? What would you suggest
2015 Feb 24
2
iterated lapply
> On Feb 24, 2015, at 10:50 AM, <luke-tierney at uiowa.edu> wrote: > > The documentation is not specific enough on the indented semantics in > this situation to consider this a bug. The original R-level > implementation of lapply was > > lapply <- function(X, FUN, ...) { > FUN <- match.fun(FUN) > if (!is.list(X)) > X <-
2013 Feb 26
1
parallel execution in R
Dear all, I have a piece of code that  I want to run in parallel (I am working in system of 16 cores) foreach (i=(seq(-93,-73,length.out=21))) %dopar%  {           threshold<-i            print(i)          do_analysis1(i,path)          do_analysis2(i,path)            do_something_else_analysis1(i,path)            something_else_now(i,path)  } as you can see I have already tried to make
2015 Feb 26
1
iterated lapply
> On Feb 25, 2015, at 5:35 PM, Benjamin Tyner <btyner at gmail.com> wrote: > > Actually, it depends on the number of cores: Under current semantics, yes. Each 'stream' of function calls is lazily capturing the last value of `i` on that core. Under Luke's proposed semantics (IIUC), the result would be the same (2,4,6,8) for both parallel and serial execution. This is
2012 Feb 07
1
using mclapply (multi core apply) to do matrix multiplication
Dear all, I am trying to multiply three different matrices and each matrice is of size 16384,16384 the normal %*% multiplciation operator has not finished one day now. As I am running a system with many cores (and it seems that R is using only one of those) I would like to write fast a brief function that converts the typical for loops of a matrix multiplication to a set of lapply sets (mclapply
2011 Oct 09
1
convert apply to lappy
Dear all I want to convert a apply to lapply. The reason for that is that there is a function mclappy that uses exact the same format as the lapply function. My code looks like that mean_power_per_tip <- function(data) {         return((apply(data[,],2,MeanTip))); } where data is a [m,n] matrix. I would like to thank you in advance for your help B.R Alex [[alternative HTML version
2010 Feb 28
2
lapply with data frame
I'm a bit confused on how to use lapply with a data.frame. For example. lapply(data, function(x) print(x)) WHAT exactly is passed to the function. Is it each ROW in the data frame, one by one, or each column, or the entire frame in one shot? What I want to do apply a function to each row in the data frame. Is lapply the right way. A second application is to normalize a column value by
2011 Feb 17
1
multi process support in R
Dear all, two days ago I was trying to run a bunch of adaptIntegrate() functions (double integrals) into my 4 core pc. As I was not satisfied about my pc's performance I tried also to run my code to another computer that has 8 or 16 cores. Unfortunately I didnt get any really decent improvement . In both computer only the first core was looking busy while the rest were close to idle levels.
2015 Feb 24
3
iterated lapply
From: Daniel Kaschek <daniel.kaschek at physik.uni-freiburg.de> > ... When I evaluate this list of functions by > another lapply/sapply, I get an unexpected result: all values coincide. > However, when I uncomment the print(), it works as expected. Is this a > bug or a feature? > > conditions <- 1:4 > test <- lapply(conditions, function(mycondition){ >
2011 Mar 30
4
a for loop to lapply
Dear all, I am trying to learn lapply. I would like, as a test case, to try the lapply alternative for the Shadowlist<-array(data=NA,dim=c(dimx,dimy,dimmaps)) for (i in c(1:dimx)){ Shadowlist[,,i]<-i } ---so I wrote the following--- returni <-function(i,ShadowMatrix) {ShadowMatrix<-i} lapply(seq(1:dimx),Shadowlist[,,seq(1:dimx)],returni) So far I do not get same results
2012 Jul 31
1
TimeStamps to seconds
Dear all, I am having a matrix that stores data information in the following format. > roofPart1$TimeStamps[1:5,]      [,1] [,2] [,3] [,4] [,5]   [,6] [1,] 2011    7   21   15   25 20.609 [2,] 2011    7   21   15   25 23.265 [3,] 2011    7   21   15   25 26.000 [4,] 2011    7   21   15   25 28.671 [5,] 2011    7   21   15   25 31.343 I would like to be able to report some simple statistics