Код: Выделить всё
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> set1 = read.dbf(file.choose())
> str(set1)
'data.frame':   24014 obs. of  3 variables:
 $ lat    : num  65.9 67.9 69.6 71.3 73.5 ...
 $ lon_180: num  -86.0 -86.2 -86.7 -87.0 -87.3 ...
 $ ht_m   : num  -1013 -1420 -1199  -346 -2636 ...
 - attr(*, "data_types")= chr  "N" "N" "N"
> dim(set1)
[1] 24014     3
> set2 = read.dbf(file.choose())
> str(set2)
'data.frame':   75070 obs. of  3 variables:
 $ b         : num  -180 -180 -180 -180 -180 ...
 $ l         : num  62.2 62.8 63.2 64.2 64.8 ...
 $ POINT_ELEV: num  -38.8 182.5 937.5 520.0 700.0 ...
 - attr(*, "data_types")= chr  "N" "N" "N"
> dim(set2)
[1] 75070     3
> plot(set1$ht_m,set2$POINT_ELEV)
Ошибка xy.coords(x, y, xlabel, ylabel, log) : 
  'x' and 'y' lengths differКогда же хочешь узнать само значение корреляции, то:
Код: Выделить всё
> cor(set1$ht_m,set2$POINT_ELEV)
Ошибка в cor(set1$ht_m, set2$POINT_ELEV) : несовместимые размерности...
 
						 
 
