Displaying 2 results from an estimated 2 matches for "y43".
Did you mean:
43
2004 Sep 14
3
reshaping some data
.... I would like to find a vectorised
solution that would achieve the same thing.
Now, for an example:
x <- data.frame(x1 = 1: 5, y11 = 1: 5,
x2 = 6:10, y21 = 6:10, y22 = 11:15,
x3 = 11:15, y31 = 16:20,
x4 = 16:20, y41 = 21:25, y42 = 26:30, y43 = 31:35)
# which are the x columns
nmx <- grep("^x", names(x))
# which are the y columns
nmy <- grep("^y", names(x))
# grab y values
y <- unlist(x[nmy])
# reserve some space for the x's
z <- vector("numeric", length(y))
# a loop counter
k <- 0
n <...
2010 Apr 23
0
HAC and Kmean
...ssible in r to use the Initial partition established by using the
HAC partition with the kmean clustering?
E.g. perform the HCA, write the cluster affiliation in a seperate column
> DF$hclus.label <- assignCluster(model.matrix(~-1 + A15 + B12 + C70 + E14 +
+ H61 + N56 + P48 + T69 + W32 + Y43, DF), DF, cutree(HClust.1, k = 3)
-> use this as initial partition in the Kmeans
I have checked several tuts and formums and could not find a workaround.
Thanks for your help
Anthony
--
View this message in context: http://r.789695.n4.nabble.com/HAC-and-Kmean-tp2037631p2037631.html
Sen...