ds.kmeans: Conducts k-means clustering of a given data set

View source: R/ds.kmeans.R

ds.kmeansR Documentation

Conducts k-means clustering of a given data set

Description

This function is similar to the native R function 'kmeans' from stats

Usage

ds.kmeans(
  df.name = NULL,
  clusters = NULL,
  iter.max = 10L,
  nstart = 1L,
  algorithm = "Hartigan-Wong",
  trace = FALSE,
  seed = 123,
  newobj = NULL,
  datasources = NULL
)

Arguments

df.name

is a string character of the data set

clusters

specifies the number of clusters for the computation

iter.max

specifies the max. number of iterations allowed

nstart

relates to the number of random sets if clusters is a number and not a set of initial cluster centers

algorithm

refers to the algorithm of calculating the kmeans and can be either 'Hartigan-Wong', 'Lloyd', 'Forgy' or 'MacQueen'

trace

is a logical or integer specifying whether tracing information on the progress of the algorithm is procuded for the Hartigan-Wong algorithm

seed

is an integer for setting the seed

newobj

is the name of the new object which is created with this function

datasources

a list of DSConnection-class objects obtained after login

Details

The function calls the server-side function kmeansDS that computes the k-means clustering of a data set (type 'data.frame' or 'matrix'). The function creates a new object on the server-side, which is of class 'kmeans'. The new object is named by the user using the newobj argument, otherwise it is named kmeans.newobj by default.

Value

the object specified by the newobj argument of ds.kmeans or default name kmeans.newobj

Author(s)

Florian Schwarz for the German Institute of Human Nutrition


FlorianSchw/dsClusterAnalysisClient documentation built on Feb. 8, 2025, 10:32 a.m.