HI Rcommunity,
Im try to make a cluster. First Im put the scale
data but when I need verify the specific number of cluster appear this error text. Im not sure if is memory error. Im try to other PC but the error was the same
The file size is 28.300 KB
Error: no se puede ubicar un vector de tamaño 44.4 Gb
Any advice for use ff
and bigmemory
packages for make a solution. Im read about this but I dont have any idea for this.
code
library(readxl)
library(tidyverse)
library(factoextra)
datos <- scale(P_df1)
fviz_nbclust(x = datos, FUNcluster = kmeans, method = "wss", k.max = 15,
diss = get_dist(datos, method = "euclidean"), nstart = 50)
The error showed when Im run fviz_nbclust
P_df1<- structure(list(AÑO = c(2017, 2017, 2017, 2017, 2017, 2017, 2017,
2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
2018, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019,
2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019
), PERIODO = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2), PUNT_LECTURA_CRITICA = c(78, 67, 56, 64, 69, 57,
69, 66, 65, 74, 65, 67, 71, 65, 63, 49, 63, 63, 71, 73, 67, 59,
64, 60, 70, 60, 49, 50, 62, 46, 62, 58, 53, 54, 39, 52, 67, 52,
41, 49, 55, 51, 58, 63, 56, 64, 52, 54, 39, 41, 48, 59, 45, 55,
39, 63, 56, 60, 51, 68, 41, 55), PERCENTIL_LECTURA_CRITICA = c(98,
78, 44, 69, 83, 47, 84, 77, 72, 95, 73, 78, 90, 74, 67, 25, 66,
65, 89, 92, 92, 72, 85, 77, 96, 74, 38, 41, 81, 27, 81, 70, 52,
57, 10, 50, 93, 49, 14, 38, 59, 44, 70, 84, 64, 85, 48, 54, 12,
17, 36, 72, 27, 60, 13, 84, 65, 75, 47, 93, 16, 60), PUNT_GLOBAL = c(432,
328, 297, 308, 331, 294, 354, 337, 314, 363, 337, 332, 333, 352,
330, 275, 329, 315, 375, 357, 312, 281, 342, 312, 338, 267, 237,
235, 288, 183, 273, 250, 249, 249, 176, 255, 343, 245, 175, 200,
284, 213, 290, 275, 243, 256, 230, 225, 177, 180, 214, 315, 185,
272, 178, 339, 265, 247, 253, 338, 165, 250), PERCENTIL_GLOBAL = c(100,
72, 56, 61, 73, 54, 85, 77, 64, 89, 77, 74, 74, 84, 73, 44, 72,
65, 94, 86, 87, 72, 96, 88, 95, 63, 42, 41, 76, 8, 67, 52, 51,
51, 5, 56, 96, 48, 5, 17, 74, 28, 79, 71, 50, 59, 41, 37, 9,
10, 29, 90, 12, 69, 9, 96, 65, 53, 57, 96, 4, 54), ESTU_INSE_INDIVIDUAL = c(4,
3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2,
3, 3, 3, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 3, 2, 1, 1, 2, 2, 2,
2, 2, 2, 2, 2, 1, 1, 2, 3, 1, 2, 1, 3, 2, 2, 2, 3, 1, 2), EDAD = c(18.5516769336071,
16.455969581749, 18.466803559206, 18.2012320328542, 17.8309798270893,
15.4393622161379, 18.4887063655031, 17.8556195965418, 16.1567080045096,
17.8556195965418, 16.1676598486069, 17.3682997118156, 16.8419771863118,
17.7324207492795, 17.1958213256484, 18.0828530259366, 17.9541786743516,
17.6667146974063, 17.7899135446686, 16.7023574144487, 18.178674351585,
16.477049444355, 16.5701401191818, 16.6556130209918, 17.2114390021296,
17.3373897170672, 16.7678734408275, 16.8062062671129, 17.1840584119258,
19.806258148631, 16.814420444174, 19.1129363449692, 17.4989351992699,
16.7760876178887, 16.885609978704, 16.4797874053793, 18.1184438040346,
16.5783540022548, 16.814420444174, 17.5701247337998, 17.0663218740493,
18.0005764519383, 17.1648919987831, 17.014298752662, 15.8911257851506,
16.9184666869486, 16.9376331000913, 15.9513609276856, 18.6338124572211,
18.2387952154489, 16.9759659263766, 16.5537123530359, 18.1922467214296,
17.5208396714329, 17.5728627928202, 17.9047413171927, 17.3483419531488,
20.0307692307692, 18.40308401787, 16.2908680947012, 17.1402494675996,
17.5454822026164)), row.names = c(NA, -62L), class = c("tbl_df",
"tbl", "data.frame"))
sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=Spanish_Colombia.1252
[2] LC_CTYPE=Spanish_Colombia.1252
[3] LC_MONETARY=Spanish_Colombia.1252
[4] LC_NUMERIC=C
[5] LC_TIME=Spanish_Colombia.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
other attached packages:
[1] factoextra_1.0.7 forcats_0.5.1 stringr_1.4.0
[4] dplyr_1.0.5 purrr_0.3.4 readr_1.4.0
[7] tidyr_1.1.3 tibble_3.1.1 ggplot2_3.3.5
[10] tidyverse_1.3.1 readxl_1.3.1
loaded via a namespace (and not attached):
[1] ggrepel_0.9.1 Rcpp_1.0.7
[3] lubridate_1.7.10 prettyunits_1.1.1
[5] ps_1.6.0 assertthat_0.2.1
[7] digest_0.6.27 utf8_1.2.1
[9] V8_3.4.2 R6_2.5.0
[11] cellranger_1.1.0 backports_1.2.1
[13] reprex_2.0.0 stats4_4.0.5
[15] evaluate_0.14 httr_1.4.2
[17] pillar_1.6.3 rlang_0.4.10
[19] curl_4.3.1 rstudioapi_0.13
[21] callr_3.7.0 rmarkdown_2.8
[23] loo_2.4.1 munsell_0.5.0
[25] broom_0.7.6 compiler_4.0.5
[27] modelr_0.1.8 xfun_0.23
[29] rstan_2.21.2 pkgconfig_2.0.3
[31] pkgbuild_1.2.0 htmltools_0.5.1.1
[33] tidyselect_1.1.1 gridExtra_2.3
[35] codetools_0.2-18 matrixStats_0.58.0
[37] fansi_0.4.2 crayon_1.4.1
[39] dbplyr_2.1.1 withr_2.4.3
[41] grid_4.0.5 jsonlite_1.7.2
[43] gtable_0.3.0 lifecycle_1.0.0
[45] DBI_1.1.1 magrittr_2.0.1
[47] StanHeaders_2.21.0-7 scales_1.1.1
[49] RcppParallel_5.1.4 cli_3.0.1
[51] stringi_1.6.1 fs_1.5.0
[53] xml2_1.3.2 ellipsis_0.3.2
[55] generics_0.1.0 vctrs_0.3.8
[57] tools_4.0.5 glue_1.4.1
[59] hms_1.0.0 parallel_4.0.5
[61] processx_3.5.2 yaml_2.2.1
[63] inline_0.3.19 colorspace_2.0-1
[65] rvest_1.0.0 knitr_1.33
[67] haven_2.4.1
> memory.limit()
[1] 3545
Thanks!