similar to: How do I avoid a loop?

Displaying 20 results from an estimated 10000 matches similar to: "How do I avoid a loop?"

2013 Sep 05
2
binary symmetric matrix combination
Hi, May be this helps: m1<- as.matrix(read.table(text=" y1 g24 y1 0 1 g24 1 0 ",sep="",header=TRUE)) m2<-as.matrix(read.table(text="y1 c1 c2 l17 ?y1 0 1 1 1 ?c1 1 0 1 1 ?c2 1 1 0 1 ?l17 1 1 1 0",sep="",header=TRUE)) m3<- as.matrix(read.table(text="y1 h4??? s2???? s30 ?y1 0 1 1 1 ?h4 1 0 1 1 ?s2 1 1 0 1 ?s30 1 1 1
2015 Dec 01
3
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 1, 2015 at 2:32 PM, Sinclair Yeh <syeh at vmware.com> wrote: > Hi, > > On Tue, Dec 01, 2015 at 02:24:14PM -0800, Dmitry Torokhov wrote: >> On Tue, Dec 01, 2015 at 02:18:49PM -0800, Sinclair Yeh wrote: >> > v2: >> > Instead of replacing existing VMMOUSE defines, only modify enough >> > to use the new VMW_PORT define. >> > >>
2015 Dec 01
3
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 1, 2015 at 2:32 PM, Sinclair Yeh <syeh at vmware.com> wrote: > Hi, > > On Tue, Dec 01, 2015 at 02:24:14PM -0800, Dmitry Torokhov wrote: >> On Tue, Dec 01, 2015 at 02:18:49PM -0800, Sinclair Yeh wrote: >> > v2: >> > Instead of replacing existing VMMOUSE defines, only modify enough >> > to use the new VMW_PORT define. >> > >>
2013 Oct 11
3
matrix values linked to vector index
Hi, In the example you showed: m1<- matrix(0,length(vec),max(vec)) 1*!upper.tri(m1) #or ?m1[!upper.tri(m1)] <-? rep(rep(1,length(vec)),vec) #But, in a case like below, perhaps: vec1<- c(3,4,5) ?m2<- matrix(0,length(vec1),max(vec1)) ?indx <- cbind(rep(seq_along(vec1),vec1),unlist(tapply(vec1,list(vec1),FUN=seq),use.names=FALSE)) m2[indx]<- 1 ?m2 #???? [,1] [,2] [,3] [,4] [,5]
2015 Dec 01
2
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 01, 2015 at 02:18:49PM -0800, Sinclair Yeh wrote: > v2: > Instead of replacing existing VMMOUSE defines, only modify enough > to use the new VMW_PORT define. > > v3: > Use updated VMWARE_PORT() which requires hypervisor magic as an added > parameter > > Signed-off-by: Sinclair Yeh <syeh at vmware.com> > Reviewed-by: Thomas Hellstrom <thellstrom
2015 Dec 01
2
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 01, 2015 at 02:18:49PM -0800, Sinclair Yeh wrote: > v2: > Instead of replacing existing VMMOUSE defines, only modify enough > to use the new VMW_PORT define. > > v3: > Use updated VMWARE_PORT() which requires hypervisor magic as an added > parameter > > Signed-off-by: Sinclair Yeh <syeh at vmware.com> > Reviewed-by: Thomas Hellstrom <thellstrom
2015 Dec 02
3
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 01, 2015 at 02:54:20PM -0800, Sinclair Yeh wrote: > Hi, > > On Tue, Dec 01, 2015 at 02:45:27PM -0800, Dmitry Torokhov wrote: > > On Tue, Dec 1, 2015 at 2:32 PM, Sinclair Yeh <syeh at vmware.com> wrote: > > > Hi, > > > > > <snip> > > > >> > */ > > >> > -#define VMMOUSE_CMD(cmd, in1, out1, out2,
2015 Dec 02
3
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 01, 2015 at 02:54:20PM -0800, Sinclair Yeh wrote: > Hi, > > On Tue, Dec 01, 2015 at 02:45:27PM -0800, Dmitry Torokhov wrote: > > On Tue, Dec 1, 2015 at 2:32 PM, Sinclair Yeh <syeh at vmware.com> wrote: > > > Hi, > > > > > <snip> > > > >> > */ > > >> > -#define VMMOUSE_CMD(cmd, in1, out1, out2,
2008 Jul 06
3
Lots of huge matrices, for-loops, speed
Hello, we have 80 text files with matrices. Each matrix represents a map (rows for latitude and columns for longitude), the 80 maps represent steps in time. In addition, we have a vector x of length 80. We would like to compute a regression between matrices (response through time) and x and create maps representing coefficients, r2 etc. Problem: the 80 matrices are of the size 4000 x 3500 and we
2012 Apr 09
3
For loops
Hi, I am having trouble with syntax for a for loop. Here is what I am trying to do. class=c(rep(1,3),rep(2,3),rep(3,3)) out1=rnorm(length(class)) out2=rnorm(length(class)) out3=rnorm(length(class)) data=data.frame(class,out1,out2,out3) dat.split=split(data,data$class) for(i in 1:3){ sub[i]=dat.split[i] } However, the for loop doesn't work. I want to assign each split to a different
2015 Dec 02
4
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 01, 2015 at 06:21:06PM -0800, Sinclair Yeh wrote: > On Tue, Dec 01, 2015 at 04:04:08PM -0800, Greg Kroah-Hartman wrote: > > On Tue, Dec 01, 2015 at 02:54:20PM -0800, Sinclair Yeh wrote: > > > Hi, > > > > > > On Tue, Dec 01, 2015 at 02:45:27PM -0800, Dmitry Torokhov wrote: > > > > On Tue, Dec 1, 2015 at 2:32 PM, Sinclair Yeh <syeh at
2015 Dec 02
4
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Tue, Dec 01, 2015 at 06:21:06PM -0800, Sinclair Yeh wrote: > On Tue, Dec 01, 2015 at 04:04:08PM -0800, Greg Kroah-Hartman wrote: > > On Tue, Dec 01, 2015 at 02:54:20PM -0800, Sinclair Yeh wrote: > > > Hi, > > > > > > On Tue, Dec 01, 2015 at 02:45:27PM -0800, Dmitry Torokhov wrote: > > > > On Tue, Dec 1, 2015 at 2:32 PM, Sinclair Yeh <syeh at
2011 Feb 07
7
feature request
Hi, how about to provide a simple way to forward raw file descriptors through ssh tunnels. something which may provide a way to write something like : (echo 3; read > out3) |& exec 3<&p 4>&p echo 5 >| out5 exec 5<> out5 echo 1 | ssh -d 3:rd -d 4:wr -d 5:rw ' read <&3; echo $REPLY >&4 read; echo $REPLY read <&5; echo $REPLY >&5
2013 Jul 12
4
simplify a dataframe
Hello I have the following problem : group the lines of a dataframe when no information change (Matricule, Nom, Sexe, DateNaissance, Contrat, Pays) and when the value of Debut of lines i = value Fin of lines i-1 I can obtain it with a do loop. Is it possible to avoid the loop ? The dataframe initial is df1 dput(df1) structure(list(Matricule = c(1L, 1L, 1L, 6L, 6L, 6L, 6L, 6L, 6L, 8L, 8L, 8L,
2012 Apr 17
4
parallel processing with multiple directories
Hello, I would like to run some code in parallel with each cluster reading/writing to a different working directory. I've tried the following code without success. The error I get is: "Error in setwd(x) : cannot change working directory" library(parallel) dirs <- list("out1","out2","out3") # these directories are located within the current
2015 Dec 02
2
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Wed, Dec 02, 2015 at 09:26:34AM -0800, Dmitry Torokhov wrote: > On Wed, Dec 02, 2015 at 07:31:24AM -0800, Greg Kroah-Hartman wrote: > > On Tue, Dec 01, 2015 at 06:21:06PM -0800, Sinclair Yeh wrote: > > > On Tue, Dec 01, 2015 at 04:04:08PM -0800, Greg Kroah-Hartman wrote: > > > > On Tue, Dec 01, 2015 at 02:54:20PM -0800, Sinclair Yeh wrote: > > > > >
2015 Dec 02
2
[PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
On Wed, Dec 02, 2015 at 09:26:34AM -0800, Dmitry Torokhov wrote: > On Wed, Dec 02, 2015 at 07:31:24AM -0800, Greg Kroah-Hartman wrote: > > On Tue, Dec 01, 2015 at 06:21:06PM -0800, Sinclair Yeh wrote: > > > On Tue, Dec 01, 2015 at 04:04:08PM -0800, Greg Kroah-Hartman wrote: > > > > On Tue, Dec 01, 2015 at 02:54:20PM -0800, Sinclair Yeh wrote: > > > > >
2005 Nov 22
1
windrose (circular package) error in table (PR#8341)
Full_Name: Allyson Williams Version: 2.1.1 OS: Windows XP Submission from: (NULL) (203.25.1.208) I'm using the 'Circular' package to plot windroses. I think the output table (see out2$table below) is incorrect when using different rotations. More precisely, when a rotation is used for the plot, the output table stuffs up. This example is from the code in the help notes, although the
2015 Dec 01
11
[PATCH 1/6] x86: Add VMWare Host Communication Macros
These macros will be used by multiple VMWare modules for handling host communication. v2: * Keeping only the minimal common platform defines * added vmware_platform() check function v3: * Added new field to handle different hypervisor magic values Signed-off-by: Sinclair Yeh <syeh at vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com> Reviewed-by: Alok N Kataria
2015 Dec 01
11
[PATCH 1/6] x86: Add VMWare Host Communication Macros
These macros will be used by multiple VMWare modules for handling host communication. v2: * Keeping only the minimal common platform defines * added vmware_platform() check function v3: * Added new field to handle different hypervisor magic values Signed-off-by: Sinclair Yeh <syeh at vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com> Reviewed-by: Alok N Kataria