Displaying 2 results from an estimated 2 matches for "onezero".
Did you mean:
nozero
2011 Jan 27
2
identifying when one element of a row has a positive number
Hello,
I am not sure where to begin with this problem or what to search for
in r-help. I just don't know what to call this.
If I have 5 columns, the first 2 are the x,y, locations and the last
three are variables about those locations.
x<-seq(1860,1950,by=10)
y<-seq(-290,-200,by=10)
ANN<-c(3,0,0,0,1,0,1,1,0,0)
CTA<-c(0,1,0,0,0,0,1,0,0,2)
GLM<-c(0,0,2,0,0,0,0,1,0,0)
2003 Nov 11
4
A co-occurrence matrix
Dear R experts,
I have a matrix (from some sort of
classification) like this:
object group
[1,] 1 1
[2,] 2 2
[3,] 3 1
[4,] 4 1
[5,] 5 3
And I need something like this:
[,1] [,2] [,3] [,4] [,5]
[1,] 1 0 1 1 0
[2,] 0 1 0 0 0
[3,] 1 0 1 1 0
[4,] 1 0 1 1 0
[5,] 0 0 0 0 1
where all