Hi community! I am working with Pearson Correlation and when applying it to a data.frame, R Studio returns me only "NA" values. I really don´t know the reason of these NAs as all my data are numbers. To expose my issue I present a short reprex:
data.frame(
Numero_Vuelos = c(884620),
Num_Ascenso = c(201303),
Num_Descenso = c(262967),
Num_Crucero = c(420355),
Num_Manana = c(405628),
Num_Tarde = c(301654),
Num_Noche = c(168953),
FL_Medio = c(277.306283476358),
Tiempo_Medio = c(147.109976918405),
Long_Media = c(16.8599598101687),
Heavy = c(111008),
Medium = c(750414),
Light = c(23058),
L_M = c(145),
Trafico_Enfrentado = c(583010),
Numero_Conflictos_MISMO = c(82),
Numero_Conflictos_Entre = c(2)
)
#> Numero_Vuelos Num_Ascenso Num_Descenso Num_Crucero Num_Manana Num_Tarde
#> 1 884620 201303 262967 420355 405628 301654
#> Num_Noche FL_Medio Tiempo_Medio Long_Media Heavy Medium Light L_M
#> 1 168953 277.3063 147.11 16.85996 111008 750414 23058 145
#> Trafico_Enfrentado Numero_Conflictos_MISMO Numero_Conflictos_Entre
#> 1 583010 82 2
datos.cor<-cor(datos,method="pearson")
#> Error in is.data.frame(x): objeto 'datos' no encontrado
round(datos.cor,digits=2)
#> Error in eval(expr, envir, enclos): objeto 'datos.cor' no encontrado
corrplot(datos.cor)
#> Error in corrplot(datos.cor): no se pudo encontrar la función "corrplot"
Solution to this reprex was a matrix with all NA in rows and columns.
Does anyone know how to solve this issue? thanks in advance for your help and happy new year!