Having a dataset like this one:
data.frame(id = c(1,1,1,2,2,3) snames = c("stockA","stockB","stockC","stockA","stockB","stockc"), var1 = c(0.13,1.2,-1.5,3.45,-0.26,-2.1), var2 = c(-2.1,2.34,3.56,-1.53,-0.48,-0.29), var3 = c(0.04,-3.45,-0.22,-0.29,1.34,0.32), var4 = c(2.14,-1.34,-4.35,-1.56,0.13,-2.35), var5 = c(1.53,1.24,-0,32,-0.3,-4.25,-2.49))
How is it possible to create a cluster using the long and wide format data together?
Having these data is there any way to cluster the variables of snames column in combination with var1, var2, var3, var4, var5 to find in which cluster there are group like in the first cluster we have stockB and var2 and var3?
Like one from here