Displaying 1 result from an estimated 1 matches for "0b4ry6f4kvheccvplrtq5vdhdnuk".
2017 Jul 10
1
PAM Clustering
...adam,
I have an R script file in which it includes PAM Clustering codes:
*when i ran R script i am getting this error:*
*Error in pam(d, 10) : x is not a numeric dataframe or matrix.*
*Execution halted*
How can i fix this error?
Thanks in advance.
?
data.csv
<https://drive.google.com/file/d/0B4rY6f4kvHeCcVpLRTQ5VDhDNUk/view?usp=drive_web>
?
*pam.R*
data <- read.csv2("data.csv")
attach(data)
d=as.matrix(data)
library(cluster)
cluster.pam = pam(d,10)
table(cluster.pam$clustering)
filenameclu = paste("clusters", ".txt")
write.table(cluster.pam$clustering, file=filenameclu,sep=&q...