search for: mycoords

Displaying 2 results from an estimated 2 matches for "mycoords".

2012 Apr 06
3
filling the matrix row by row in the order from lower to larger elements
...much for the tips! Dimitri input<-as.matrix(data.frame(a=c(5,1,3,7),b=c(2,6,4,8))) (input) desired.result<-as.matrix(data.frame(a=c(100,0,100,0),b=c(0,100,0,100))) (desired.result) result<-as.matrix(data.frame(a=c(0,0,0,0),b=c(0,0,0,0))) for(i in 1:nrow(input)){ # i<-1 mymin<-i mycoords<-which(input==mymin,arr.ind=TRUE) result[i,mycoords[2]]<-100 input[mycoords]<-max(input) } (result) -- Dimitri Liakhovitski
2012 Feb 23
0
resistanceDistance representation
...ot;,F,scl=T) > MY_Rcorrection<-geoCorrection(MY_transition,"r",F,scl=T) My coords are 44 points where samples were taken (some further genetic analyses are programmed), but i've also tried with only two points: > coords<-read.csv("coords_md.csv",header=F) > mycoords<-as.matrix(coords) > my_spatialpoints<-SpatialPoints(mycoords) Finally I calculated three geographical distance matrices: > geodist <- pointDistance(my_spatialpoints,longlat=FALSE) > summary(geodist) V1 V2 V3 V4 V5 M...