For given segmentation this function estimates dimensionality of each cluster (or chooses fixed dimensionality) and for each cluster calculates the number of principal components equal to the this dimensionality
calculate.pcas(X, segmentation, number.clusters, max.subspace.dim,
estimate.dimensions)A data matrix.
A vector, segmentation of variables into clusters.
An integer, number of subspaces (clusters).
An integer, upper bound for allowed dimension of subspace.
A boolean, if TRUE subspaces dimensions are estimated using PESEL.
A subset of principal components for every cluster.