Displaying 4 results from an estimated 4 matches for "point1".
Did you mean:
point
2012 Oct 04
1
Ops.factor(point1, point2) : - not meaningful for factors
...(8, 39)
5 5 (10, 17)
6 6 (35, 20)
7 7 (38, 10)
> str (DSi)
'data.frame': 7 obs. of 2 variables:
$ i : int 1 2 3 4 5 6 7
$ Si: Factor w/ 7 levels "(10, 17)","(20, 2)",..: 6 2 3 7 1 4 5
>
> x <- c(15, 45)
> y <- DSi [,2]
> dist <- function (point1, point2)
+ {
+ diff <- point1-point2
+ distance <- sqrt(sum(diff^2))
+ distance
+ }
> dist (x, y)
[1] NA
Warning message:
In Ops.factor(point1, point2) : - not meaningful for factors
>
Regards,
Nadiah
--
View this message in context: http://r.789695.n4.nabble.com/Ops-factor-point1-...
2008 Nov 10
2
how to convert indvidual pairwise distances to matrix
Hello,
I am trying to convert list of pairwise distances to a distance matrix for
spatial analysis (kriging). For instance, I have something like this for
each pair pf points, and I want to convert it to a matrix:
point1 point2 distance
1 1 0
1 2 4
2 2 0
2 1 4
Please let me know if there is a function or method that can do this.
Thanks,
Christy
[[alternative HTML version deleted]]
2008 Jun 09
1
Plot Coloured Triangle
Hi there,
I'd like to plot a triangle with each point having a certain color defined and
fill it with the interpolated values.
The following code shall represent somehow, three points with x,y, and the
"amount" of red for example...
point1 <- c(1.1, 1.7, 255)
point2 <- c(2.2, 1.5, 180)
point3 <- c(1.8, 2.2, 60)
can anybody give me a hint which methods to use to realize it?
Antje
2011 Apr 11
3
Geographic distance between lat-long points in R?
Dear R,
I have a bunch of geographic locations specified by lat-long coordinates. What's an easy way to calculate geographic distance between any two points? OR, perhaps there is a function for calculating a distance matrix for K sites?
Sincerely,
Scott Chamberlain
[[alternative HTML version deleted]]