我正在做一个prcomp()的biplot(),它给了我以下错误。
PCARelAreaNumber <- prcomp(~ BlackSpotNumSqRt + BlueSpotNumSqRt + FuzzyBlackSpotNumSqRt + GreenSpotNumSqRt + OrangeSpotNumSqRt + SilverSpotNumSqRt + VioletSpotNumSqRt + YellowSpotNumSqRt + BlackRelAreaArcsine + BlueRelAreaArcsine + FuzzyBlackRelAreaArcsine + GreenRelAreaArcsine + OrangeRelAreaArcsine + SilverRelAreaArcsine + VioletRelAreaArcsine + YellowRelAreaArcsine, data = AmyRawData, scale = TRUE)
biplot(PCARelAreaNumber, col = c("white", "red"))
Error in UseMethod("biplot") :
`enter code here`no applicable method for 'biplot' applied to an object of class "prcomp"
biplot(PCARelAreaNumber)
Error in UseMethod("biplot") :
no applicable method for 'biplot' applied to an object of class "prcomp"
这很奇怪,因为几周前它正在运作。我使用的是最新版本的R和R Studio。
我找到了一个关于princomp()的建议,其中问题是公式: scores not being generated from princomp, unable to generate biplot
我很确定我的公式输入格式是正确的。有什么想法吗?