Questions tagged [r-daisy]

daisy is a function from the cluster package, calculating all the pairwise dissimilarities (distances) between observations in the data set.

39 questions
0
votes
2 answers

Converting factors to binary asymmetric variable types

I want to convert some variable types in R from factors to binary asymmetric variable types. I successfully converted some of my data from factors to ordered factors using this syntax: mydata[,200] <-as.ordered(mydata[,200]), but when I tried…
extragum01
  • 11
  • 1
0
votes
0 answers

The daisy function from the cluster package returns error on data

I want to use ordinal data (1,2,3,4) of 59 observables with 322 variables and daisy, eventually leading to a cluster analysis. I use the script below on an excel input file (csv). After daisy, the following error message occurs: > Error in…
Pher
  • 1
0
votes
1 answer

How to input ordinal data into daisy function

I have a data set with 12 variables each taking values 1 to 4 and are to be treated as ordinal. If I don't specify their type, they are being treated as interval type > attributes(gower_dist) $class [1] "dissimilarity" "dist" $Size [1]…
shavendy
  • 173
  • 1
  • 1
  • 10
0
votes
1 answer

How to draw polygon/ convex hull around Partitioned Around Medoids (PAM) clusters in R?

Good Day Is it possible to produce a plot based on the output of a PAM dissimilarity clustering analysis with polygons drawn around the outer point of the clusters? I have currently achieved something similar using the function clusplot however am…
J.Fawkes
  • 9
  • 3
0
votes
0 answers

Fuzzy Clustering in R with a Survey Data

I have a survey data which has 18.406 rows and 247 columns. It has too many likert scale questions. And of course it has NAs. I checked similar questions and I saw an answer in that topic: Cluster Analysis in R with missing data But it doesn't work…
0
votes
0 answers

How to allocate vector greater than 2Gb

I was trying to carry out a command in R when I received this error: d <- daisy(demo, metric = "gower",stand = FALSE, type = list(), weights = 1) Error: cannot allocate vector of size 2.3 Gb Is there a way to allocate more memory to R? Mine is a…
abi
  • 285
  • 1
  • 7
  • 17
0
votes
1 answer

R - How to speed up Euclidean distance calculation on a very large dataset

community, I have a very large dataset containing 3 columns with coordinates (x, y, z) and 24 x 10^6 rows. I need to calculate the euclidean distance between all rows and the first row which is 0, 0, 0. With the loop below this takes a very long…
Niels Raes
  • 51
  • 1
  • 7
0
votes
1 answer

Aggregate ordinal and binary data according to cluster in R

I performed k-medoid clustering analysis using CRAN cluster package with R. The data is on a data.frame called df4 with 13111 obs. of 11 binary and ordinal values. After clustering, I applied the cluster results to the original data.frame showing…
Scott Davis
  • 983
  • 6
  • 22
  • 43
-2
votes
1 answer

Daisy function Warning Message: NAs introduced by coercion

I am trying to convert a data.frame to a daisy matrix from the CRAN's Cluster package in R. I have a dataset of 13109 observations with 9 categorical variables. I got two types of errors about NAs being introduced by coercion and no missing…
Scott Davis
  • 983
  • 6
  • 22
  • 43
1 2
3