Dear Marcel,

I'm sorry for the misunderstanding. I think what you really need are the
scores values provided by PCA. See ?princomp for details. Here's an example:

# PCA
prin.comp=princomp(USArrests, cor = TRUE)
summary(prin.comp)

# What do you have in prin.comp?
names(prin.comp)

# Extracting the scores
res=prin.comp$scores
res

# If you want the scores associated to the first component, just type this:
res[,1]


HTH,

Jorge



On Thu, Jul 3, 2008 at 8:43 AM, Bio7 <marcel.austenfeld@uni-bielefeld.de>
wrote:

>
> Dear Jorge,
>
> As i've already written the princomp method works for me. But i'm
> interested
> to produce from the results a matrix which i can visualize (e.g the first
> pc)  in an image application and which is then the source for a clustering
> algorithm.
> The background is that i've an application which can transfer images to R
> and create images from R very fast (using ImageJ and RServe). I've already
> clustered successfully image data with the cluster package.
> If i now have more than three channels (or bands - > R,G,B) i want to
> reduce
> the dataset with the PCA.
> So which data (as a matrix) represents the first pc or how can i calculate
> from the results
> this matrix? Since i've not worked with the PCA method before any
> explanation beyond the R help
> would really help me.
>
>
> --
> View this message in context:
> http://www.nabble.com/PCA-on-image-data-tp18255217p18258404.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> 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.
>

	[[alternative HTML version deleted]]

