Re: [R] library(datasets)

2010-11-19 Thread David Winsemius
On Nov 19, 2010, at 6:10 PM, Thomas Stewart wrote: You may want to consider using eurodist in matrix form. As in, ED <- as.matrix(eurodist) Then you could manipulate the matrix using standard or homemade functions, like this one: max.matrix <- function(A) { column <- ceiling(which.max(A

Re: [R] library(datasets)

2010-11-19 Thread Thomas Stewart
You may want to consider using eurodist in matrix form. As in, ED <- as.matrix(eurodist) Then you could manipulate the matrix using standard or homemade functions, like this one: max.matrix <- function(A) { column <- ceiling(which.max(A)/nrow(A)) row <- which.max(A) - (column-1)*nrow(A) A

[R] library(datasets)

2010-11-19 Thread lgpeco
## i have one question anouth this package.. library(datasets) eurodist ## if i type this i get max distance between european cities > max(eurodist) [1] 4532 ## but i would like get something like this: 4532 Gilbratar - Anthens ## and another one.. ## if a live in barcelona and i would like trav