Hello,
I have a simple question about breaking out of a For loop.
When I use the 'break' statement within a For loop, say on the first of
several iterations, does control return to the top of the loop for the next
iteration, or does the For loop stop completely and no further iterations
are proces
useR's,
I want to be able to rotate a matrix 90 degrees, clockwise. For example,
> mat
[,1] [,2] [,3]
[,1] 12 1
[,2] 32 6
[,3] 45 3
I want to rotate it, so that it looks like this...
[,1] [,2] [,3]
[,1] 43 1
[,2] 52 2
[,3] 36
Thank! This worked great!
--
View this message in context:
http://n4.nabble.com/how-to-take-multiple-subsets-from-a-matrix-tp1597411p1597899.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://st
useR's
I have a matrix from which I want to take multiple subsets from, according
to a particular scheme I will now describe. The matrix below (mat) is 5x5,
and I want to take 9 subsets of it, each of dimension 3x3. The best way to
explain what the result should look like is with the following:
Another issue with this is how 'mask' is declared within the filter2d
subroutine as well as 'subarray' and 'subarray1'
integer ijx,ijy,ix,iy,jx,jy,icx,icy
integer nx,ny,halfintx,halfinty
real count
logical missing
real array(nx,ny),array1(nx,ny),miss
real
s
Maybe this is my problem. Perhaps passing an array of just 1's would work?
--
View this message in context:
http://n4.nabble.com/Help-running-a-Fortran-subroutine-from-R-tp1595641p1595795.html
Sent from the R help mailing list archive at Nabble.com.
__
The output will be an array of the same dimension as 'array', the first
argument passed to the subroutine. The output array is the second argument,
'array1', which will be populated with the smoothed values according to the
subroutine.
I can run the subroutine in R without receiving an error, i
useR's,
I need help getting a Fortran DLL successfully returning the correct output.
The attached fortran source code (filter2d.f) and DLL (filter2d.dll) are
attached. Also, I attached a text file for which I want to apply the filter
to (time702.txt).
Here is what I am doing...
> dyn.load("C:/f
8 matches
Mail list logo