[R] Calculating just a single row of dissimilarity/distance matrix

Jan van der Laan rhe|p @end|ng |rom eoo@@dd@@n|
Fri Oct 26 21:30:51 CEST 2018

Using another implementation of the gower distance:


gower_dist(iris[1,], iris)



On 26-10-18 15:07, Aerenbkts bkts wrote:
> I have a data-frame with 30k rows and 10 features. I would like to
> calculate distance matrix like below;
> gower_dist <- daisy(data-frame, metric = "gower"),
> This function returns whole dissimilarity matrix. I want to get just
> the first row.
> (Just distances of the first element in data-frame). How can I do it?
> Do you have an idea?
> Regards
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list