Displaying 20 results from an estimated 40000 matches similar to: "How to convert two-dimensional function to matrix?"
2006 Aug 22
3
How to interrupt running computation?
If I start a computation in R, how can I interrupt it?
I' using R 2.1.0.
Thanks for your help,
Lothar
2006 May 18
3
Two-Dimensional Hashes through links?
I''m really hitting a wall here. My program has a search engine, returns
a list of results. I am using a two-dimensional hash to pass the form
data back to my controller. (i.e. params[:job] => {:description =>
"xxx", :location => "xxx", company => "xxx"}) I use that Job object to
search my database, and then wait for user input.
Now when the
2006 Sep 08
2
Multiple matrix multiplication with two 3-dimensional arrays
Hi,
I need to do several matrix multiplications with
the corresponding matrices forming two
3-dimentional arrays. To illustrate my problem,
let's say I have the following 3-dimensional arrays:
array1 <- array(1:30,dim=c(3,2,5))
array2 <- array(1:20,dim=c(2,2,5))
I know that I can get what I want with the following computation :
result <- array(dim=c(dim(array1)[1],
2005 Oct 03
3
Save output
Dear R-Mastermind
Within a while or a for-loop, is there a way that I can save to disk the
results of the previous calculations at the end of each loop with filenames
called "file01.Rdata", "file02.Rdata" etc?
So far, I have tried to write the outcome of each loop in a 3 dimensional
array and saved it just once after the loop. Or is there another way so that
I can keep
2005 Mar 10
3
two-dimensional integration?
I find the one-dimensional "integrate" very helpful,
but often enough I stumble into problems that require
two (or more)-dimensional integrals. I suppose there
are no R functions that can do this for me, "directly"?
The ideal thing would be to be able to define say
f <- function(x)
{
x1 <- x[1]
x2 <- x[2]
sin(x1*x2)*exp(x1-x2)
}
and then write say
integrate(f,
2011 Dec 27
2
How to create a matrix with 3 dimensions from several 2 dimensional matrice?
Hi every one,
How is it possible to create a matrix with 3 dimensions from several 2
dimensional matrice?
Is it possible that each of "elementary/building block" matrices could be
called by its corresponding original name?
Thanks alot.
--
View this message in context:
2010 Nov 22
3
Fast Two-Dimensional Optimization
Dear R Helpers,
I have attempted "optim" function to solve a two-dimensional optimization
problem. It took around 25 second to complete the procedure.
However, I want to reduce the computation time: less than 7 second. Is there
any optimization function in R which is very rapid?
Best Regards,
Wonsang
-----
Wonsang You
Leibniz Institute for Neurobiology
--
View this message in
2009 Mar 15
1
Contour plots of four two-dimensional matrices
I have four large two-dimensional matrices of which I want to create contour
plots. Something like
filled.contour(<matrix>)
contourplot(<matrix>)
works but only gives me one plot at a time. If I combine the four matrices
into one three-dimensional matrix, which I'll name "seven", there should be
a way of doing something like this
contourplot(seven[,,k] for k in 1 to 4)
2008 Mar 10
1
How can I sample from a two-dimensional grid of points
Hi everyone,
My goal is to sample from a two-dimensional grid. Consider the following example of code:
n.grid <- 500
muA.grid <- seq(-4,4, length=n.grid)
muB.grid <- seq(-4,4, length=n.grid)
mu.p <- matrix(NA, nrow=n.grid, ncol=n.grid)
for(i in 1:n.grid){
for(j in 1:n.grid){
mu.p[i,j] <- dnorm(muA.grid[i], 0, 1)*dnorm(muB.grid[j], 0, 0.5)
}
}
mu.p <-
2010 Nov 29
1
Two dimensional Array defined on intevals
Hi I am new to R and am trying to set up a two-dimensional array/matrix with
the elements defined by the function similar to below. Been trying to use
outer with apply but can't seem to get the indexing quite right. Is their a
simple way of accomplishing this task ??
-----
/
| 1 x < 0.5 & y < 0.5
|
2006 Feb 15
2
Plotting two 3-dimensional time series in a 3 x 2 plot - alternatives to par(mfrow())
I am trying to plot two 3-dimensional time series in one window (such that there will be 3 rows and 2 columns). For zoo and ts objects the par(mfrow...) option does not work. I can get xyplot to make the plots, but data are on widely different scales in the three dimensions, and xyplot uses the same scale on all y-axis which means that in some dimensions the curves will be almost horizontal lines.
2012 May 08
3
Numerical integration of a two dimensional function over a disk
Hello, there!
Basically my problem is very clear. I would like to take a (numerical) integration of a function f(x,y) which can be quite complex of x and y, over a disk (x-a)^2+(y-b)^2<= r^2 (with r constant). However, after some search in R, I just cannot find a function in R that suits my purpose. Function Integrate applies to one dimensional, and adaptIntegrate to rectangle. In my case, it
2011 Jun 13
1
Composing two n-dimensional arrays into one n+1-dimensional array
If I have 2 n-dimensional arrays, how do I compose them into a n+1-dimension
array?
Is there a standard R function that's something like the following, but that
gives clean errors, handles all the edge cases, etc.
abind <- function(a,b) structure( c(a,b), dim = c(dim(a), 2) )
m1 <- array(1:6,c(2,3))
m2 <- m1 + 10
abind(m1,m2)
==>
, , 1
[,1] [,2] [,3]
[1,] 1 3 5
2012 Jun 04
2
Convert 2-dim array to 3-dim array
Hello R-users,
I'd like to load data from a CSV-file to a 3-dimensional array. However
the default seems to be 2-dimensional. It would also be ok to load the
data and then convert it to a 3-dimensional structure.
I've been trying:
dat = read.csv(filename)
myArr = as.array(dat, dim = c(12,100,3))
However, I get an error message:
Error in `dimnames<-.data.frame`(`*tmp*`,
2012 Oct 16
1
How to create a high-dimensional matrix
Hi, everyone
I need to create a 429497 x 429497 matrix.
When I use
*matrix(0,429497,429497)*
I got the error information : Error in matrix(0, 429497, 429497) : too many
elements specified
Then I use "ff" package, try to store this matrix on disk
* x<-ff(0,dim=c(429497,429497)*
And I got the error information :
Error in if (length < 0 || length > .Machine$integer.max)
2004 Sep 27
1
Numerical two-dimensional integration
Dear all,
I need to compute (numerically) the two-dimensional integral: int(int f(x,y)dy)dx.
What is the more efficient(fast) way to do it?
Is adapt function appropriate for this problem?
I will much appreciate your help and attention.
Vicky.
[[alternative HTML version deleted]]
2011 Oct 09
1
two-dimensional Kolmogorov-Smirnow (2DKS) test
The reference below describes the utility of the two-dimensional
Kolmogorov-Smirnow (2DKS) test for detecting relationships in bivariate
data. If this test has been implemented in R I would love to know about
it!
Thanks,
jake
Garvey, J. E., E.A. Marschall, and R.A. Wright (1998). "From star charts
to stoneflies: detecting relationships in continuous bivariate data."
Ecology
2012 Mar 13
1
Two dimensional integration
Dear R Members,
I want to know a fast R function to do multidimensional integration. I used
the function 'cuhre' in R2cuba library. But it takes painful time to get the
answer.
I would be thankful if anyone could help me out to solve this problem
Thanks
Niroshan
--
View this message in context: http://r.789695.n4.nabble.com/Two-dimensional-integration-tp4468282p4468282.html
Sent
2019 Jul 22
2
Fwd: Character not allowed in mailbox name
Hi Arnold,
thanks for your assistance. I solved the issue right now by changing
prefix = Shared/%%u/
to
prefix = Shared/%%n/
This omits the @mydomain.de part which holds the dot causing the
trouble. Why this became a problem due to the update I wouldn't know.
Regards
Lothar
Am 22.07.2019 um 10:49 schrieb Arnold Opio Oree:
> Hi Lothar,
>
> I haven't yet had the opportunity to
2011 Dec 22
2
Indexing multi-dimensional table
I want to take slices of a multi-dimensional table (or array) without
knowing the number of dimensions in advance.
As a test I tried using (in this example a 3d table):
do.call(`[`, list(tbl, x,NULL,NULL)]
where I built the list on the fly. It works great as long as I only want the
first dimension however when I try a different dimension, say with
list(tbl,NULL,x,NULL), I get