similar to: *apply function for arrays?

Displaying 20 results from an estimated 20000 matches similar to: "*apply function for arrays?"

2008 Sep 11
1
Convex optimization in R?
Hi my R buddies, I'm trying to solve a specific group of convex optimization in R. The admissible region is the inside and surface of a multi-dimensional eclipse area and the goal function is the sum of absolution values of the variables. Could any one please tell me whether there's a package in R to do this? Thank you very much, Best wishes, -- ??? Hesen Peng
2008 Aug 12
2
Multiple column/row names?
Hi all, I wonder if there is a way to create a matrix with two (or even more) column/row names? Thank you very much. Have a nice day. -- ??? Hesen Peng http://hesen.peng.googlepages.com/
2008 Nov 23
2
How is R working in multicore and multiprocessor environment?
My Dear R buddies, I'm feeling ashamed that I've been running my R program on some servers for a while but do not know exactly how R is working. The servers are chained together using Sun Grid Engine. Each node has 8 quad-core CPUs. I wonder how many cores and CPUs are used by a simple single-thread R program. Thanks a lot. Best wishes, -- ??? Hesen Peng
2008 Nov 29
2
Reading mixed tables
Dear R buddies, This weekend I became interested in solving Google Code Jam problems using R. I guess R may work very well in this kind of contests but the input of file has been a problem for me. Take this case for example (http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtchALEghjb250ZXN0cxjRzBQM), the files are usually of the form: A(number of lines for group 1) a11 a12 a13 a21
2009 Jul 11
1
Conditional expand.grid()
Hello my R buddies, I'm trying to generate a bivariate data.frame with the elements of first row greater than the second row. The more complicated method that I can think of is: n <- 10 temp <- expand.grid(1:n,1:n) temp<-temp[temp[,1]>temp[,2],] However, I guess there must be some easier way of doing this. Besides, if inequality condition is applied at the very
2008 Jun 04
2
array of arrays
Dear R users, I want to calculate the bias and variance of an estimator for several values of two parameters a and b. For example : b1 b2 a1 bias bias variance variance a2 bias bias variance variance Can one do array of arrays ? I have tried and it did not work. Actually I would like to get this array for several values of the number of observations. That
2008 Nov 24
2
More than doubling performance with snow
Hey my R buddies, I installed the "snow" and "rpvm" package on my Lenovo Thinkpad T400 today. The experiment below gave me a surprise. The time consumed by serial processing was several times larger than that taken by parallel processing. I'm very curious how this happened. Thank you very much. > library(snow) > > cc <- makePVMcluster(2) > > temp <-
2008 Oct 03
1
When to set small values to 0?
My dear R buddies, I've run into a problem when doing numerical computation recently. In a program that I've been working on, I usually get a vector of real values which are theoretically (and it's correct) supposed to decrease until reaching zero after a given value. However, most of the value just wander at 10^-8 scale and never shrink exactly to zero. So I guess I should manually
2009 Oct 27
1
How to express a tree?
Hello everybody, I'm write a function whose output represents a tree. Can anyone please recommend me some data structure in R which are good for expressing a tree? The possible idea I'm having in my mind is to represent the whole tree as a list in which a sublist (an element to the main list) contains all its corresponding branches. Is there any simpler way of doing this? Thank you very
2004 Jun 14
4
interrupt in Linux
Does anyone know how to interrupt R in RedHat? Neither control-c nor Esc is working. What I don't want to do is close the window or kill the entire R process. Thanks, David This communication is for use by the intended recipient and ...{{dropped}}
2011 Nov 02
4
array manipulation
Hello, I'm at the very beginning of the learning process of this language. Sorry in advance for the (possible but plausible) stupidity of my question. I would like to find a way to permute the DIMENSIONS of an array. Something that sounds like the function "permute()" in matlab. Given an array C of dimensions c x d x T , for instance, the command permute(C, [2 1 3]) would provide
2008 Oct 08
5
ParallelR
Anyone using or has access to ParallelR? I was looking at the page and found nothing really useful! http://www.revolution-computing.com/sitegenius/topic.php?id=195 I want to see if I can run R on a cluster of workstation, and use batch systems like Grid Engine or Xgrid: http://gridengine.sunsource.net/ http://ww.apple.com/acg/xgrid/ --Chi
2009 Aug 06
5
Is there a 'vi' mode in R?
Hi, I'm wondering if R provide a vi mode in the command line just like other shells such as bash do. Can somebody let me know? Regards, Peng
2008 Dec 23
1
Ordered Multidimensional Arrays
Hi, I am inquiring as to what are the best practices with respect to storing and manipulating ordered multi-dimensional arrays. For example, suppose I have a sequence of time-varying covariance matrices of asset returns. The data is ordered, but the ordering is not necessarily regular (e.g. daily data omitting weekends and holidays, etc.). The data array is say, N x N x T. For example, the
2007 Oct 05
2
Apply vector of labels to columns of data frame
Dear list members I would like to apply a vector of labels v=c("lab1","lab2","lab3") to a dataframe df=data.frame(1:3,1:3,1:3) using some kind of loop or apply function. Any ideas? Thanks Steve Powell Checked by AVG Free Edition. 17:03 [[alternative HTML version deleted]]
2008 Jul 11
1
Subsetting an array by a vector of dimensions
Hi Is it possible to subset an n-dimensional array by a vector of n dimensions? E.g. assume I have > x <- array(1:24, dim=2:4) > x[1,1,2] [1] 7 > dims <- c(1,1,2) I would like a function that I can supply x and dims as parameters to, and have it return 7. Also, I would like to do something like: > x[1,1,] [1] 1 7 13 19 > dims2<- c(1,1,NA) And have a function of x and
2006 May 16
1
variable row names
Hy all, I wish to use a variable as rownames for a set of datas. By example : > nom<-"toto" > prenom<-"tutu" > res<-c(1,2) > res<-t(res) > res [,1] [,2] [1,] 1 2 > colnames(res)<-c(nom,prenom) > res toto tutu [1,] 1 2 > nom [1] "toto" > I wish to call the rowname by the
2007 Jan 03
2
accessing arrays
hi all. how can i adress a array directly. for example i wanna give array 1 other labels than array 2. How can I overcome this problem? ...this doesn't work tab <- array(1:8, c(2, 2, 2)) dimnames(tab[,,1]) <- list(c("No","Yes"), c("No","Yes"),c("ARRAY1")) dimnames(tab[,,2]) <- list(c("big","small"),
2006 May 29
2
Analog to matlab repmat function
Hello, I'm trying to switch from Matlab to R-project, and having some difficulties. I make a use of multidimensional matrices. For example, I need to extract mean from one of the dimensions: % we have matrix data of size: 130 x 11 x 350 x 2 data = data - repmat(mean(data,3),[130 1 1 1]); In R project I managed to do that in a very pervarsive way: # mean(data,3) in R base <-
2006 Jan 27
3
draft of Comment on UCLA tech report
You may recall that there was a discussion of a technical report from the statistical consulting group at UCLA. I have a draft of a comment on that report, which you can get from http://www.burns-stat.com/pages/Flotsam/uclaRcomment_draft1.pdf I'm interested in comments: corrections, additions, deletions. Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com