My image data is stored in a list. For every pixel (626257) of my image I have a vector containing all the values corresponding to the different wavelengths (44 wavelengths). Now I would like to carry out a principal component analysis (PCA). Unfortunately, I am not able to convert my listed data into the desired form. Here is the code to generate a dummy data set.
test = replicate(626257, rnorm(44, 3, 1),simplify = FALSE)
When I now try to carry out the PCA then the following error message pops up.
pca = prcomp(test, scale = F)
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
How can I convert my list into a suitable datatype?