[R] Sparse Matrices in R

2004-08-31 Thread Danny Heuman
I have data in i,j,r format, where r is the value in location A[i,j] for some imaginary matrix A. I need to build this matrix A, but given the sizes of i and j, I believe that using a sparse format would be most adequate. Hopefully this will allow me to perform some basic matrix

[R] Calculating sum of squares deviation between 2 similar matrices

2004-07-13 Thread Danny Heuman
Hi all, I've got clusters and would like to match individual records to each cluster based on a sum of squares deviation. For each cluster and individual, I've got 50 variables to use (measured in the same way). Matrix 1 is individuals and is 25000x50. Matrix 2 is the cluster centroids and

Re: [R] R-crash using read.shape (maptools)

2004-04-28 Thread Danny Heuman
Hi Herry, On Thu, 29 Apr 2004 12:20:44 +1000, you wrote: Hi List, I am trying to read a large shapefile (~37,000 polys) using read.shape [winxp, 1gig ram, dellbox). I receive the following error: AppName: rgui.exe AppVer: 1.90.30412.0ModName: maptools.dll ModVer: 1.90.30412.0

[R] Cluster Analysis with minimum cluster size?

2004-03-26 Thread Danny Heuman
Hi all, Is it possible to run kmeans, pam or clara with a constraint such that no resulting cluster has fewer than X cases? These kmeans algorithms often find clusters that are too small for my use. There are usually a few clusters with 1-10 cases (generally substantial outliers). I then have

[R] Distance and Aggregate Data - Again...

2004-02-25 Thread Danny Heuman
I appreciate the help I've been given so far. The issue I face is that the data I'm working with has 53000 rows, so in calculating distance, finding all recids that fall within 2km and summing the population, etc. - a) takes too long and b) have no sense of progress. Below is a loop that reads