r,covariance,pca,eigenvalue,princomp

You explicitly told princomp to use correlation matrix in this line: test<-princomp(data,cor=T) If you omit the parameter and just use test <- printcomp(data), it will use covariance matrix and you'll get the results(roughly) you're expecting....

Yes, it holds that score = norm_ingredients * pc, where norm_ingredients is the normalized version of your input matrix so that its columns have zero mean, that is, norm_ingredients = ingredients - repmat(mean(ingredients), size(ingredients, 1), 1) ...