Re: [R] Specifying medoids in PAM?

From: David Finlayson <david.p.finlayson_at_gmail.com>
Date: Thu 09 Jun 2005 - 02:24:54 EST

Sorry, I wasn't trying to submit a bug report just yet. I wanted to see if I was using the command correctly. Here is a complete example (the row names have numbers in them):

> library(cluster)
> stats.table

           slope.for slope.ter prof.len break.elv
1 ALLYN W       0.09      0.05     63.3      1.46
2 ARCADIA       0.12      0.09     40.8      0.43
3 BURFOOT       0.12      0.03     58.9      0.78
4 CAMA BE       0.15      0.05     50.4      0.88
5 DASH PO       0.09      0.01    290.5      3.14
6 EAGLE C       0.09      0.01    226.4      1.49
7 FAY BAI       0.13      0.02     60.3      0.78
8 FORT WA       0.11        NA     36.0        NA
9 FOUL WE       0.15      0.10     31.9      2.38
10 GOLDEN       0.10      0.01    121.1      1.53
11 HERRON       0.13      0.04     69.5      1.59
12 JACOBYS      0.13      0.07     50.9      2.22
13 JOEMMA       0.13      0.04     78.7      2.03
14 KEYSTON      0.15        NA     31.7        NA
15 KITSAP       0.08        NA     41.6        NA
17 OLD MAN      0.13      0.05     39.0      0.74
18 POINT-N      0.13      0.02     76.2      1.00
19 POSSESS      0.10      0.04     60.3      1.11
20 POTLATC      0.07      0.03     55.8      0.09
21 TERMINA      0.09      0.03     88.4      1.80
22 SILVERD      0.06      0.06     57.4      0.50
23 TOLMIE       0.11      0.01    309.2      2.56
24 WARM BE      0.03      0.01    253.5      1.07

> pam(stats.table, metric="euclidean", stand=TRUE, medoids=c(1,3,20,2,5), k=5)

This command crashes RGUI.exe and windows sends an error report to Microsoft. It also crashes if I first subtract the NA rows from stats.table.

Thanks,

David

On 6/8/05, Martin Maechler <maechler@stat.math.ethz.ch> wrote:
> >>>>> "David" == David Finlayson <david.p.finlayson@gmail.com>
> >>>>> on Tue, 7 Jun 2005 12:11:25 -0700 writes:
>
> David> I am using the PAM algorithm in the CLUSTER library.
> David> When I allow PAM to seed the medoids using the default __build__
> David> algorithm things work
> David> well:
>
> >> pam(stats.table, metric="euclidean", stand=TRUE, k=5)
>
> David> But I have some clusters from a Hierarchical analysis that I would
> David> like to use as seeds for the PAM algorithm. I can't figure what the
> David> mediod argument wants. When I put in the five integer indicies for the
> David> observations in stats.table that I would like to use as seeds (the row
> David> numbers), I segfault R.
>
> >> pam(stats.table, metric="euclidean", stand=TRUE, medoids=c(1,3,20,2,5), k=5)
>
> David> *** R Crashes ***
>
> this is not very helpful.
>
> Can you please READ the posting guide and then
> do as the guide says :
>
> - post a *reproducible* example
> - tell more about what happens when "R Crashes"
>
> David> Here is my version info:
> >> version
> David> _
> David> platform i386-pc-mingw32
> David> arch i386
> David> os mingw32
> David> system i386, mingw32
> David> status
> David> major 2
> David> minor 0.1
> David> year 2004
> David> month 11
> David> day 15
> David> language R
>
> David> Any guidance would be appreciated.
>
> David> David
>
> David> --
> David> David Finlayson
> David> Marine Geology & Geophysics
> David> School of Oceanography
> David> Box 357940
> David> University of Washington
> David> Seattle, WA 98195-7940
> David> USA
>
> David> Office: Marine Sciences Building, Room 112
> David> Phone: (206) 616-9407
> David> Web: http://students.washington.edu/dfinlays
>
> David> ______________________________________________
> David> R-help@stat.math.ethz.ch mailing list
> David> https://stat.ethz.ch/mailman/listinfo/r-help
> David> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA  98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jun 09 02:32:29 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:27 EST