search for: vectorwise

Displaying 9 results from an estimated 9 matches for "vectorwise".

Did you mean: vectorise
2009 Nov 29
3
How to z-standardize for subgroups?
...rs$var1, group, z.mean.sd) which gives me the standardised data for each subgroup in a list with the subgroups z.var1 <- unlist(z.var1) then gives me the z-standardised data for var1 in one vector. Great! Now I would like to do this for the whole dataframe, but probably I am not thinking vectorwise enough. z.df.vars <- by(df.vars, group, z.mean.sd) does not work. I banged my head on other solutions trying out sapply and tapply, but did not succeed. Do I need to loop and put everything together by hand? But I want to keep the columnnames in the vector? -karsten --------------------...
2012 Oct 30
2
Java Exception error while reading large data in R from DB using RJDBC.
Dear List, Java Exception error while reading large data in R from DB using RJDBC. I am trying to read large data from DB table(Vectorwise), using RJDBC connection. I have tested the connection with small size data and was able to fetch DB tables using same connection(conn as in my code). Please suggest where am i going wrong or alternate option to solve such issues while reading large DB table. drv <- JDBC(paste(db_driver,...
2011 Oct 18
1
Function in nested loop
Hi all, I would like to run a function with several nested conditions, which are completely factorial. The input data (x1) has two different sample sizes, so: x1 <- dat1 x1 <- dat2 Then a can have 3 different values: a <- 0.15 a <- 0.35 a <- 0.50 Then b can have 2 different values: b <- data.matrix (c(0.5,0.5,0.5)) b <- data.matrix (c(0.2,0.4,0.6)) Then d can have 5
2007 Dec 06
1
Integral implicit function
Hi, Could somebody help me with the following. I want to calculate the integral over an implicit function. I thought to integrate over a function depending on uniroot. In previous topics I found a thread about finding the root of an integral. And that works. But the other way around, does not work. Does R support this? I included the following example. The function in the example is very easy
2010 Nov 23
2
[LLVMdev] Unrolling power sum calculations into constant time expressions
Hello, I noticed that feeding 'clang -O3' with functions like: int sum1(int x) { int ret = 0; for(int i = 0; i < x; i++) ret += i; return ret; } int sum2(int x) { int ret = 0; for(int i = 0; i < x; i++) ret += i*i; return ret; } ... int sum20(int x) { int ret = 0; for(int i = 0; i < x; i++) ret +=
2011 Oct 04
1
a question about sort and BH
Hi, I have two questions want to ask. 1. If I have a matrix like this, and I want to figure out the rows whose value in the 3rd column are less than 0.05. How can I do it with R. hsa-let-7a--MBTD1 0.528239197 2.41E-05 hsa-let-7a--APOBEC1 0.507869409 5.51E-05 hsa-let-7a--PAPOLA 0.470451884 0.000221774 hsa-let-7a--NF2 0.469280186 0.000231065 hsa-let-7a--SLC17A5
2011 Jul 31
4
help with algorithm
I'm wondering if anyone can give some basic advice about how to approach a specific task in R. I'm new to R but have used SAS for many years, and while I can muscle through a lot of the code details, I'm unsure of a few things. Specific questions: If I have to perform a set of actions on a group of files, should I use a loop (I feel like I've heard people say to avoid looping
2010 Nov 23
2
[LLVMdev] Unrolling an arithmetic expression inside a loop
Hello, I've been redirected from cfe-dev, as code optimizations in clang are done in llvm layer. I'm investigating how optimized code clang generates, and have come across such an example: I have two procedures: void exec0(const int *X, const int *Y, int *res, const int N) { int t1[N],t2[N],t3[N],t4[N],t5[N],t6[N]; for(int i = 0; i < N; i++) { t1[i] = X[i]+Y[i];
2010 Nov 23
1
[LLVMdev] Unrolling loops into constant-time expressions
Hello, I've come across another example: I'm compiling with clang -S -emit-llvm -std=gnu99 -O3 clang version 2.9 (trunk 118238) Target: x86_64-unknown-linux-gnu Thread model: posix I take the code: int loops(int x) { int ret = 0; for(int i = 0; i < x; i++) { for(int j = 0; j < x; j++) { ret += 1; } } return ret; } and the