similar to: mean of 3D arrays

Displaying 20 results from an estimated 40000 matches similar to: "mean of 3D arrays"

2012 Aug 29
4
Sorting of columns of a matrix
Dear all, Please suggest me how can I do it. I have a matrix which look like following: x1 x2 x3 t1 .01 0.3 0 t2 0 0.1 0.01 t3 0 .01 .01 t4 0 0 t5 5 0 0 t6 0 0 0 t7 0 0 0 t8 0 0 0 t9 0.6 0 0 t10 0 0 0.66 t11 0 0.6 0.11 t12 0 0.4 0 I want to sort decreasing order in each column based on rows. and then to display only those rows which has a value. The expected out put matrix will
2011 Oct 05
3
do calculations as defined by a string / expand mathematical statements in R
Dear R-group, is there a way to perform calculations that are defined in a string format? for example I have different variables: x1 <- 3 x2 <- 1 x4 <- 1 and a string-variable: do <- 'x1 + x2 + x3' Is there any way to perform what the variable 'do'-describes (just like the formula-element but more elemental)? Perhaps my idea to solve my problem is a little
2012 Jul 10
1
RGL 3D curvilinear shapes
Dear useRs, I'm trying to simply fill in the area under a curve using RGL. Here' the set up: x <- c(0.75,75.75,150.75,225.75,300.75,375.75,450.75,525.75,600.75,675.75, 0.5,50.5,100.5,150.5,200.5,250.5,300.5,350.5,400.5,450.5, 0.25,25.25,50.25,75.25,100.25,125.25,150.25,175.25,200.25,225.25) y <- c(0.05,4.91,9.78,14.64,19.51,24.38,29.24,34.11,38.97,43.84,
2006 May 03
2
Outreg-like command?
It would be nice to have something like stata's outreg that lets regression output go into a form like Specification (1) Specification (2) Var 1 coef(1,1) coef(1,2) se(1,1) se(1,2) Var 2 coef(2,1) coef(2,2) se(2,1) se(2,2) I don't think this can be done in xtable? Thomas Davidoff Assistant Professor Haas School of Business UC Berkeley Berkeley, CA 94618 Phone: (510)
2006 Oct 24
3
Help with understanding [[]] [] array, list, matrix referencing
Hi all, I would greatly appreciate some help understanding how R references arrays, matrices, lists, and objects using [[]] and []. I have read the R guides and several tutorials but I am not the fastest kid on the block so I am still having difficulty understanding this. For examples the following code produces a 5 element list of 2X5 random numbers that I then convert to a 2X5X5 matrix.
2011 Dec 31
2
Very strange function() behaviour.
Hi, R newb here. I've coded a function that inputs N dimensional array(s) [or class=numeric if it's dim=1] of coefficients and tstats, where dim(coef_matrix)=dim(tstat_matrix), it will then output a same dimension matrix of coefficients pasted to tstats in brackets pasted to significance stars. If I go straight to the code INSIDE the function, it works 100% as it's supposed to. The
2009 Jul 25
1
Determine the dimension-names of an element in an array in R
Hi: How can I extract the dimension-names of a pre-defined element in a multidimensional array in R ? A toy example is provided below: I have a 4-dimensional array with each dimension having certain length. In the below example, "mydatastructure" explains the structure of my data. mydatastructure = array(0, dim=c(length(b),length(z),length(x),length(d)), dimnames=list(b,z,x,d)) where,
2006 Jun 07
2
help with combination problem
hello: I have 3 data.frame objects. First df object: Of dim (149,31). Columns 2:31 are marked as T1..T14 and N1..N16. Name T1 T2 N1 T3 N2 N3 N4 T4 mu1 10 10 9 10 9 9 8 10 mu2 11 11 9 11 9 9 9 11 ... muN 12 12 9 11 9 9 8 12 Second df object: of Dim (50000,31). Columns 2:31 are maked as T1...T14 and N1..N16.
2011 Oct 05
2
converting 3D array to a data-frame (with coordinate-columns x, y, z)
Hi, I am still struggling with three dimensional arrays. Now I would like to convert a three dimensional array into a data-frame with the coordinate-columns: x, y, z and a value-column. And I definitely don't want to loop over every element, since this would be very resource intensive for the actual data-set. Are there any specific functions that are helpful for this task?
2004 Jul 07
3
KalmanSmooth problem
Hello, In R I am trying to use Kalman filtering to find a solution for an hydrological problem. With Kalman Filtering I want to estimate the discharge comming from three storage bassins. I have programmed a function in R which can run KalmanSmooth. When I'm asking for the function and putting in values, R detects the following error: "Error in as.vector(data) : Argument "S1" is
2010 Jan 12
1
parsing protocol of states
Dear R-users, actually i try to parse some state protocols for my work. i an easy stetting the code below works fine, if states are reached only once. in harder settings it could be possible that one state gets visited more times. in this case for me its interesting to see how much waiting time lies between to states on the whole. by the way i didn't use R as a parsing tool so far, so
2008 Mar 12
1
[follow-up] "Longitudinal" with binary covariates and outcome
Hi again! Following up my previous posting below (to which no response as yet), I have located a report which situates this type of question in a longitudinal modelling context. http://www4.stat.ncsu.edu/~dzhang2/paper/glm.ps Generalized Linear Models with Longitudinal Covariates Daowen Zhang & Xihong Lin (This work seems to originally date from around 1999). They consider an outcome Y,
2013 Feb 26
2
Efficient way to perform linear regressions
Hi All, I have millions of regression lines to fit. So I am looking for the most efficient approach in R. Details: I have a large desing matrix X. The dimension is n by p. Each time when fitting the model, select rows from this matrix X and form a new design matrix, called X_current. There is another binary matrix M, with dim m by n, and each row is a 1*n vector. It helps to determin X_current.
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment lines before data for each time interval. For each time interval there are 500 data points. I want to change the dataset such that I have the following format: t1 t2 t3 ................ 0.00208 0.00417 0.00625 ................. a1 a2 a3 ...................
2003 Jul 30
6
reverse array indexing
Hi, Suppose I have a multidimensional array: tmp <- array(1:8, c(2,2,2)) is there a function out there that, given a one-dimensional array index, will return the separate indices for each array dimension? for instance, tmp[8] is equivalent to tmp[2,2,2]. I'd like to derive the vector (2,2,2) from the index 8. thanks, Brad Buchsbaum
2007 Nov 01
2
computing the mean of a few variables
hello, I have a simple question: I want to compute the average of 6 variables, my data looks like this: t0 t1 t2 t3 t4 t5 1 32 34 36 40 38 40 2 35 37 38 36 33 39 . . . I want the mean of t0-t5 for each row (observation). thank you, sigalit. [[alternative HTML version deleted]]
2010 Sep 17
7
removing specific rows from array
I'm attempting to create an array of treatment comparisons for modelling data generation. This involves comparison of one treatment (c2) with another (c3), relative to a common comparator (c1). Attached code gives me the correct array but need to remove duplicates. Duplicates relate only to c2 and c3 such that I need to remove r3 because c2 and c3 are same as r1 with c2 and c3 swapped r5
2015 Sep 18
2
ExecutionEngine::runFunction and libffi
I noticed that runFunction (for MCJIT) is very limited. At the same time the interpreter already has a fairly generic way of calling functions from a pointer and a Function * (for description) using libffi. Would it make sense to pull that functionality out into a small support library and using it in MCJIT? As is runFunction isn't particularly usable. -- Johannes S. Mueller-Roemer, MSc Wiss.
2018 May 04
2
How to constraint instructions reordering from patterns?
Hi, Is there a kind of scope mechanism in the instruction lowering pattern language in order to control where instructions are inserted or how they are later reordered during the SelectionDiag linearization? I know the glue chain that stick instructions together. But such mechanism in not provided in instruction lowering pattern. I'm facing many situations where some patterns are lowered into
2015 Jun 03
3
[LLVMdev] [lld] TBSS wrong size
Hi, Yes, ldd is generating wrong tbss size. It is just considering one tbss section and not calculating all sections from all objects. The following example on x86_64 shows the issue: --- t0.c --- #include <stdio.h> extern __thread int t0; extern __thread int t1; extern __thread int t2; extern __thread int t3; __thread int t4; __thread int t5; __thread int t6; __thread int t7; int