[R-es] error
josebetancourt.cmw
josebetancourt.cmw en infomed.sld.cu
Dom Oct 4 13:16:23 CEST 2015
Estimados
Quisiera hacer an?lisis de PCA por varios m?todos, pero hay algo con los datos de la tabla csv que al final dice 'x' must be numeric . No veo el error, pero imagino que es en la sintaxis de la tabla csv
Apreciaria su yuda, adjunto tabla csv
rm(list = ls())
setwd("D:/Public/Documents/biblio a revisar/0000 analisis detalles/r_epidemiolog?a/DATA/")
data<- read.csv('maternalR.csv',header=TRUE, sep=";", dec=";")
attach(data)
library(sjPlot)
sjp.pca(data[,2:4], numberOfFactors = NULL, factorLoadingTolerance = 0.1,
plotEigenvalues = FALSE, digits = 2, title = NULL,
axisLabels.y = NULL, type = "b", geom.size = 0.6,
geom.colors = "RdBu", breakTitleAt = 50, breakLabelsAt = 30,
showValueLabels = TRUE, showCronbachsAlpha = TRUE, printPlot = TRUE)
prcomp(data[,2:4])
#############################################
#error que da
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
> prcomp(data[,2:4])
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20151004/e3628ec2/attachment.html>
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: maternalR.csv
Type: application/octet-stream
Size: 7092 bytes
Desc: no disponible
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20151004/e3628ec2/attachment.obj>
Más información sobre la lista de distribución R-help-es