search for: yongwan

Displaying 5 results from an estimated 5 matches for "yongwan".

Did you mean: yongsan
2007 Sep 03
3
element wise opertation between a vector and a list
...a & b as below lines, a<- list(c(1,3),c(1,2),c(2,3)) b<-c(10,20,30) I would like to have a list (like "d") or a vector (like "e") as below. d<-list(c((1+10),(3+10)),c((1+20),(2+20)),c((2+30),(3+30))) e<- c((1+10)+(3+10),(1+20)+(2+20),(2+30)+(3+30)) Thanks, Yongwan Chun
2006 Nov 15
2
Sparse matrix calculation
...and A is a sparse matrix in a regular matrix class. A %*% M takes much more time than M %*% A; moreover, t(t(M) %*% t(A)) is much faster than A %*% M with same result. I would like to know how it is possible. Even though I do not have an exact reason, this fact may be helpful to others. Thanks, Yongwan > n <- 1000 > M <- diag(n) - matrix(1/n,n,n) > A <- matrix(rnorm(n*n)>2,n,n) > system.time(M %*% A) [1] 0.10 0.03 0.12 NA NA > system.time(A %*% M) [1] 3.47 0.03 3.50 NA NA > system.time(t(t(M) %*% t(A))) [1] 0.23 0.00 0.23 NA NA
2006 Oct 26
1
A faster way to calculate Trace?
...e really big. Unfortunately the matrices are not symmetric. If anybody know how to get the trace of it, please help me. An example is as below. n <- 2500 a <- matrix(rnorm(n*n),n,n) b <- matrix(rnorm(n*n),n,n) tr1 <- sum(diag(a %*% b)) tr2 <- sum(diag(a %*% b %*% a %*% b)) Thanks, Yongwan Chun
2006 Nov 14
2
Building R from source
...messages whenever I run 'make all recommended' without modifying 'MkRules' file. I have removed software and reinstalled them several times but I still failed to get it done. The below message is what I got. If anybody gives information, I would appreciate it very much. Thanks, Yongwan ======================= D:\Rsource\R-2.4.0\src\gnuwin32>make all recommended make[1]: `Rpwd.exe' is up to date. make[4]: Nothing to be done for `svnonly'. installing C headers make[2]: `all' is up to date. make[2]: `libRblas.dll.a' is up to date. make[5]: Nothing to be done for...
2004 Jan 26
1
Question about design matrix
...However, this option sets the last element of a factor as -1. For example, if I have a factor which has 5 elements and want to use the "contr.sum" option, the 5th elements is always set to -1. I want set -1 to other element such as 1st or 2nd. Is it possible? Thank you in advance. Yongwan Chun [[alternative HTML version deleted]]