Hi,
I am a beginner at R and I would like to get information from a matrix,
where the numbers are larger than or equal to 50m . This means that plants
need to be apart at least 50m. I need to get the selection as in a way
that I can identify which pair of species are 50m or more apart.
here a
On 19/07/2013 10:17 AM, Kátia Emidio wrote:
Hi,
I am a beginner at R and I would like to get information from a matrix,
where the numbers are larger than or equal to 50m . This means that plants
need to be apart at least 50m. I need to get the selection as in a way
that I can identify which
The chol and solve methods for dpoMatrix (Matrix package) are much
faster than the default methods. But, the time required to coerce a
regular matrix to dpoMatrix swamps the advantage.
Hence, I have the following problem, where use of dpoMatrix is worse
than a regular matrix.
library(Matrix)
x <
On Feb 14, 2012, at 12:46 AM, Vijayan Padmanabhan wrote:
Dear R Group
I have a matrix object in R, where i want to retain only those columns
which have each row from a different group..
see the example below..
team1<-c("a1","a2","b1","b2","b3","c1","c2")
teams<-combn(team1, 3)
I want a funct
Dear R Group
I have a matrix object in R, where i want to retain only those columns
which have each row from a different group..
see the example below..
team1<-c("a1","a2","b1","b2","b3","c1","c2")
teams<-combn(team1, 3)
I want a function which will delete all columns in the teams matrix that
Is this what you want:
> x <- read.table(textConnection("g1 g2 f
+ 3 4 10
+ 2 1 30
+ 4 4 50"), header=TRUE)
> closeAllConnections()
> # create empty matrix
> mat <- matrix(0, max(x$g1), max(x$g2))
> mat[cbind(x[,1], x[,2])] <- x[,3]
> mat
[,1] [,2] [,3] [,4]
[1,]000
Hi
I have 3 vectors, say g1, g2 and f, where g1 and g2 contain the row and column
indices of a matrix, with corresponding elements in f. How can I create a
matrix containing the values in f ?
For example:
g1 g2 f
3 4 10
2 1 30
4 4 50
How can then get a matrix that looks as follows:
0
Does this give you want you want? I assume that you have to also
ignore the first column in matrixC or else you don't have a reasonable
comparison. Also your data for matrixA and matrixB did not have any
spaces between the numbers, so I just took a guess at what they should
be.
> a.m <- scan(tex
Hi, dear all:
I am a beginner. I appreciate any help or hint from you.
I am trying to do calculation with matrices. I have 3 matrices. One is
matrixA, 2nd is matrixB, and last is matrixC.
Here is matrixA:
1.8511.40.0831.001
0.8771.30.1161.33
1.9021.21.1020.302
0.8640.1261.110.252
9 matches
Mail list logo