Now I have two data files in my hand.One is "province.csv" which contains
provincial logGDP per person data.The other is "Wd1.csv" which contains
distance based spatial weight matrix. This weight matrix which is the matlab
type file(ie. "Wd1.m") comes directly from a Matlab program. And I have
transfered "Wd1.m"into "Wd1.xls" ,and "Wd1.xls" into "Wd1.csv".The question
is that how can I load(or import) spatial weight matrix into R to calculate
Moran's I?

I've run following code in R,but it send message "error in moran(lny1978,
gdpdw) : objects of different length".

> library(foreign)

> gdp<- read.csv("province.csv")

> attach(gdp)

> gdpdw<- read.csv("Wd1.csv")

> str(moran(lny1978,gdpdw))


	[[alternative HTML version deleted]]

