我在 r 中使用了SPCA 包来查找加载因子。我创建了一个图来显示最重要的因素,但 kpis(labels) 的名称不清晰可见。我在绘图功能中使用了 sizelabels,它改变了字体大小,但仍然不清楚。comp 2 中的客户满意度不可读。如何解决此问题?
#reactuve function to analyse pca
SPCA.results<-reactive({
if(is.null(cor(EvaluatedData()))){
return(NULL)
}else{
#adapted from another devium
file1<-input$evaluatedfile
if(is.null(file1)){return()}
dm<-data.matrix(cor(EvaluatedData()))
spca.components<-input$PCs
spcabb(dm,card= c(spca.components, spca.components, 4),unc = TRUE)
}
})
output$compplot<-renderPlot({
if(is.null(SPCA.results())){return()}
data<-SPCA.results()
spca.components<-input$PCs
plot(data, cols=3,plotload = TRUE,par(col = 'blue'), onlynonzero = FALSE, variablesnames = TRUE,plotvex = FALSE,mfrow = 2, mfcol = 2,addlabels = TRUE,sizelabels=1)
})