I'm experiencing an awkward issue while trying to run a principal component analysis on my data. I've tried to useprcomp(base) and rda(vegan), but the analysis is considering columns as sample units instead of rows, which causes all sorts of issues with the analysis.
The following code is a simplification of my data. The actual dataset is composed of nearly 2000 columns and around 350 rows. However, the issue is the same when I run the script bellow:
rn <- rnorm(8000)
dt <- matrix(rn, nrow=80, ncol=1000)
result <- rda(dt, scale=T)
summary(result)
At first I thought this would be an common error, however I coudn't find any similar issues nor solutions to it.
Is there a way to clearly specify which dimension to use as sample units?