How to use " ind.sup" on a MCA analysis? - r

I cant run my MCa with a ind.sup, I dont know why. Here's my code :
library(FactoMineR)
data_ACM <- data[80000:81000,]
res.AMC <- MCA(data_ACM, ncp = 6, graph = F, ind.sup = 700)
Error in eigen(crossprod(t(X), t(X)), symmetric = TRUE) :
infinite or missing values in 'x'
dpu(data[1:10,]) returns this :
"SOHDZET", "SOHDZF", "SOHDZFT", "SOKFXD", "SOKFXF", "SOM31BL4B1D",
"SONFZD", "SONFZF", "SOVJZC", "SOVJZE", "SOVJZET", "SOVJZF",
"SOVJZFT", "SOVJZJ", "SOZAAZ", "SP01", "SP21", "SP308", "SP41",
"SP4DWC", "SP61", "SP81", "SR11", "SR1F0H", "SR1G0H", "SR1H06",
"SR1J0H", "SR1J22", "SR1J32", "SR1L22", "SR1L32", "SR1M22",
"SR270E", "SR31", "SR4DWC", "SR51", "SR81", "SR8J32", "SR8L32",
"SREU0H", "SRH1ELC", "SRH1ELCD", "SS11", "SS31", "SS51",
"SS55", "SS71", "SS91", "ST12", "ST72", "ST785E", "STA",
"STADRX01AG", "STADRX01SG", "STAFNX01AG", "STAFNX01SG", "STAGZX01SG",
"STAHLX01AG", "STAHLX01SG", "STAHUX01AG", "STAHUX01SG", "STAV",
"STB", "STBV", "STC", "STCDCA", "STCV", "SU31", "SU35", "SU55",
"SU55A", "SV10", "SV10EM", "SV1V12", "SV31", "SVA", "SVAV",
"SW11", "SW31", "SW51", "SW52X400", "SW52X700", "SW53K2",
"SW53K200", "SW53K9", "SW53K900", "SW5441", "SW5449", "SW58K2",
"SW58K200", "SW58K3", "SW58K7", "SW58K9", "SW58K900", "SW5952",
"SW5953", "SW5957", "SW5959", "SW59G200", "SW59G300", "SW59G700",
"SW59G900", "SW6142", "SW6149", "SW61P2", "SW61P200", "SW61P9",
"SW61P900", "SW61S200", "SW61S900", "SW6542", "SW6549", "SW65P2",
"SW65P200", "SW65P9", "SW65P900", "SW65S200", "SW65S900",
"SW6942", "SW71", "SW7140", "SW7141", "SW7144", "SW7146",
"SW7362", "SW743200", "SW743900", "SW7462", "SW7469", "SW793200",
"SW793700", "SW793900", "SW7962", "SW7964", "SW7967", "SW7969",
"SW8042", "SW8142", "SX11", "SX31", "SX71", "SXBHW6", "SXBHY6",
"SXHMP6", "SXHMZ6", "SXHNZ6", "SXHNZT", "SY11", "SY31", "SY33",
"SY34", "SY53", "SY54", "SY71", "SYN1E", "SZ58K3", "SZ58K7",
"SZ5953", "SZ5957", "SZ59G300", "SZ59G700", "SZ7144", "SZ7146",
"SZ793700", "SZ7964", "SZ7967", "SZ799400", "T11", "T12",
"T1X000", "T1X004", "T1X300", "T1X305", "T1X805", "T1XE05",
"T1XF05", "T27WWT270", "T27WWT271", "T27ZRT270", "T27ZRT271",
"T2DG1", "T2DH1", "T2DH2", "T2DJ1", "T2DJ2", "T2W300", "T2W305",
"T2W800", "T2W805", "T2WE05", "T2WF05", "T31DD03", "T31EE01",
"T32AA", "T32AA01", "T32AA02", "T32AA03", "T32AA04", "T32BB",
"T32BB01", "T32BB02", "T32BB05", "T32BB06", "T32CC", "T32CC01",
"T32CC02", "T32CC03", "T32CC04", "T32DD", "T32EE", "T3408",
"T3419", "T3435", "T3448", "T3467", "T3DB1", "T3DE1", "T3DE2",
"T3LA1", "T3LA2", "T3X000", "T3X100", "T3X300", "T3X305",
"T3X800", "T3X805", "T3XE05", "T3XF05", "T4BBD", "T4BBG",
"T4BCD", "T4BCE", "T4BCF", "T4DCA", "T4DCD", "T4DCT", "T4DCX",
"T4DCY", "T4X000", "T4X100", "T4X305", "T4X405", "T4X800",
"T4X805", "T4XE05", "T4XF05", "T4XG05", "T5408", "T5419",
"T5435", "T5448", "T5808", "T5819", "T5835", "T5848", "T5X000",
"T5X200", "T5X205", "T5X300", "T5X305", "T5X405", "T5X800",
"T5X805", "T5XF05", "T5XG05", "T6EB1", "T6EB4", "T6EB6",
"T6EB7", "T6ED5", "T6EE2", "T6MB1", "T6MB6", "T6MB7", "T6MC1",
"T6MD5", "T72", "T7JA1", "T7W200", "T7W205", "T7W300", "T7W405",
"T7WG05", "T824833", "T82W433", "T82W434", "T8344", "T8358A",
"T8378A", "T8380", "T8390A", "T8394", "T83T4", "T844433",
"T844434", "T844533", "T844544", "T845034", "T845043", "T845044",
"T8458", "T847433", "T847443", "T847833", "T8478A", "T8480",
"T8488", "T849033", "T849043", "T8490A", "T8494", "T8494B43",
"T8494B44", "T84T4", "T84T443", "T84T444", "T84T543", "T84T544",
"T84T833", "T84T843", "T855", "T857", "T85T4", "T85T8", "T9408",
"T9419", "T9435", "T9448", "T9508", "T9519", "T9535", "T9548",
"T9808", "T9819", "T9835", "T9848", "T9PG2", "TA", "TA12",
"TA12F2", "TA12J5", "TA12L2", "TA12L5", "TA13008", "TA13035",
"TA13068", "TA1308", "TA1335", "TA1368", "TA14", "TA16008",
"TA16035", "TA16068", "TA1608", "TA1635", "TA1668", "TA2",
"TA22", "TA23H", "TA23MB", "TA23MQG", "TA2422", "TA2422A",
"TA28MB", "TA32408", "TA32419", "TA32468", "TA40", "TA40AKS",
"TA40AMS", "TA43035", "TA43068", "TA4308", "TA4319", "TA4335",
"TA4368", "TA4408", "TA4419", "TA4435", "TA4468", "TA60AMS",
"TA60BLMB", "TA72L2", "TA72L5", "TA8408", "TA8419", "TA8435",
"TA8468", "TA9408", "TA9419", "TA9435", "TA9468", "TA94E08",
"TA94E19", "TA94E35", "TA94E68", "TAA408", "TAA419", "TAA435",
"TAA468", "TAA8408", "TAA9408", "TAA94E08", "TAAA408", "TAAP11",
"TAAW10", "TABCAS", "TABCDS", "TAC408", "TAC419", "TAC468",
"TAD308", "TAD3G08", "TAF408", "TAF419", "TAF435", "TAF468",
"TAJ3G008", "TAJ3G08", "TAK1367", "TAK4367", "TAKD467", "TAKU467",
"TAKV467", "TAM3019", "TAM3035", "TAM3068", "TAM319", "TAM335",
"TAM368", "TAM6019", "TAM6035", "TAM6068", "TAM619", "TAM635",
"TAM668", "TAN308", "TAN419", "TAN435", "TAN468", "TAN619",
"TAN635", "TAN668", "TANT30", "TAS335", "TAS3G08", "TATB",
"TATF", "TATHA", "TATHB", "TATJA", "TATJB", "TAU8470", "TAUA470",
"TAW4035", "TAW4068", "TAW6035", "TAW6068", "TAX100", "TAX300",
"TAZ100", "TAZ300", "TB", "TB2", "TB2412", "TB367", "TBAABS",
"TBABBS", "TBAP12", "TBAV10", "TBBCBS", "TBC1NPLY", "TBC1NRLY",
"TBCAAS", "TBCADS", "TBCAES", "TBCBAS", "TBCBDS", "TBCBES",
"TBDCAS", "TBDCDS", "TBDCES", "TBE1OVM", "TBE1OVN", "TBE2PZN",
"TBE2UZN", "TBE4TWN", "TBE4TYN", "TBE4TYNC", "TBE5IWN", "TBE5IWNC",
"TBE5TWM", "TBE5TWN", "TBE5TWNC", "TBE5TYN", "TBGMSLV", "TBGMTLVI",
"TBGNSLV", "TBGNSLVC", "TBGNSLY", "TBGNTLVI", "TBIF5P11M51AZ1",
"TBIF5P21M52CZ1", "TBNT30", "TBUR20", "TBX200", "TBX205",
"TBX300", "TBX305", "TBX405", "TBXE05", "TBXG05", "TBZ200",
"TBZ205", "TBZ300", "TBZ305", "TBZ405", "TBZ800", "TBZE05",
"TBZG05", "TC2", "TCAP11", "TCAP12", "TCAV10", "TCTG05",
"TCY405", "TCYG05", "TD2", "TD367", "TD4HSJ", "TD4HTH", "TDABKS",
"TDABTS", "TDABUS", "TDAP11", "TDAV10", "TDAW10", "TDAW10M",
"TDAW10U", "TDFBAS", "TDGCKS", "TDGCTS", "TDGCUS", "TDHCAS",
"TDSY61", "TDUHZJ", "TDX8ZA", "TDXFVJ", "TE2", "TE51", "TEABKL",
"TEABTL", "TEAP12", "TEBBAL", "TECCKL", "TECCTL", "TEDCAL",
"TENT30", "TESY61", "TF08II51", "TF08J551", "TF08M351", "TF35II51",
"TF35J551", "TF35M351", "TF408", "TF419", "TF435", "TF448",
"TF48II51", "TF48J551", "TF48M351", "TFABAL", "TFABKL", "TFABSL",
"TFABTL", "TFABUL", "TFAP12", "TFAY10", "TFBCAL", "TFBCKL",
"TFBCSL", "TFBCTL", "TFBCUL", "TG08GCA1", "TG08GCS1", "TG08ICA1",
"TG08ICS1", "TG08M351", "TG08M3A1", "TG2", "TG35GCA1", "TG35GCS1",
"TG35ICA1", "TG35ICS1", "TG35M351", "TG35M3A1", "TG408",
"TG419", "TG435", "TG448", "TG48GCA1", "TG48GCS1", "TG48ICA1",
"TG48ICS1", "TG48M351", "TG48M3A1", "TGABAL", "TGABKL", "TGABSL",
"TGABTE", "TGABTL", "TGBN", "TGCCAL", "TGCCKL", "TGCCSL",
"TGCCTE", "TGCCTL", "TGFCAL", "TGFCTL", "TGFCUL", "TH308",
"TH348", "TJAC9S", "TJAN91", "TJAN9S", "TJBBAL", "TJBBTE",
"TJBBTL", "TJBBUL", "TJBCAL", "TJBCTE", "TJBCTL", "TJBCUL",
"TK308", "TK348", "TKACAL", "TKACTE", "TKACTL", "TKACUL",
"TLB310", "TLEF5D14A63ZZ1", "TLEF5D24M62ZZ1", "TLEF5D31M62ZZ1",
"TLEF5D51M66ZZ1", "TLEF5D61D7", "TLEF5P31M64ZZ1", "TLEF5P41D71ZZ1",
"TLEF5P44D71ZZ1", "TM4BUL", "TM4DBC", "TP260", "TPAD", "TPADJ",
"TPAE", "TPAEJ", "TQF8D62M53AZ1", "TQF8D82A51AZ1", "TR160",
"TR160T", "TR467", "TR567", "TR7969", "TR9145", "TR9245",
"TS08ICS1", "TS08MCS1", "TS31", "TS48ICS1", "TS6142", "TS6149",
"TS61E2", "TS61P2", "TS61P200", "TS61P9", "TS61P900", "TS61S200",
"TS61S900", "TS65E2", "TS65P2", "TS65P200", "TS65P9", "TS65P900",
"TS65S200", "TS65S900", "TS7202", "TS7206", "TS7432", "TS743200",
"TS7439", "TS743900", "TS7462", "TS7469", "TS7932", "TS793200",
"TS793900", "TS7962", "TS7969", "TS90C5", "TS90K5", "TS9145",
"TS91J500", "TS91K5", "TS91K500", "TS9245", "TS92K5", "TS92K500",
"TS94K2", "TS94K5", "TS97C2", "TS97C5", "TT132", "TT408",
"TT419", "TT435", "TT448", "TT508", "TT519", "TT535", "TT548",
"TT808", "TT819", "TT835", "TT848", "TTFN44", "TU308", "TU319",
"TU348", "TU408", "TU419", "TU435", "TU448", "TU467", "TU508",
"TU519", "TU535", "TU548", "TU567", "TU808", "TU819", "TU835",
"TU848", "TVUF", "TVUR20", "TVUR20U", "TW308", "TW319", "TW348",
"TW3T08", "TW3T19", "TW3T35", "TW3T48", "TWUR20", "TX31",
"TX71", "TY260", "TY260T", "U11", "U11T", "U2", "U2MAC",
"U2NAC", "U6UA", "U6UB", "U6UC", "U6UE", "U6UF", "U6UG",
"U6UJ", "U6UJT", "U6UK", "U6UR", "U6UR9", "U6UT", "U6UT9",
"U6UU", "U6UU9", "U6UW", "U6UWT", "U857", "U858", "U859533",
"U85T", "U9C1G6", "U9C1GH", "U9C1K6", "U9C1KH", "U9C2G6",
"U9C2K6", "U9CYG6", "U9CYK6", "U9VCK5", "UA5FV81P", "UA5FWC",
"UA5FWC1", "UA5FXH1P", "UA6FYC", "UA71", "UA9HR8", "UA9HR82PS",
"UA9HR8P", "UA9HR8PS", "UA9HZC", "UA9HZC1", "UA9HZH1P", "UA9HZHP",
"UARFJHP", "UARHB8P", "UARHE8", "UARHHA", "UARHJH1P", "UARHJHP",
"UARHRJ", "UB11", "UB31", "UB51", "UB53", "UB71", "UB91",
"UC11", "UC31", "UC71", "UC91", "UD11", "UD1Y11", "UD51",
"UD5FS0", "UD5FV81P", "UD5FWC", "UD5FXH1P", "UD5FXHP", "UD6FYC",
"UD71", "UD91", "UD9HR8", "UD9HR82PS", "UD9HR8P", "UD9HR8PS",
"UD9HZC", "UD9HZC1", "UD9HZC1CU1", "UD9HZH1P", "UD9HZH1PCU1",
"UD9HZHP", "UDC1G6", "UDC1K6", "UDC2G6", "UDC2K6", "UDC3G6",
"UDC3K6", "UDCAG5", "UDCAK5", "UDCCG5", "UDCCK5", "UDCEG5",
"UDCEK5", "UDCGG5", "UDCGK5", "UDCJG5", "UDCJK5", "UDCMG5",
"UDCMK5", "UDCNG5", "UDCNK5", "UDCSG6", "UDCSK6", "UDCUG5",
"UDCUG6", "UDCUK5", "UDCUK6", "UDCVG5", "UDCVK5", "UDCYG6",
"UDCYK6", "UDRFJHP", "UDRHB8P", "UDRHE8", "UDRHHA", "UDRHJH1P",
"UDRHJHP", "UDRHRJ", "UE11", "UE31", "UE51", "UE9HR8", "UE9HR8P",
"UE9HZC1", "UE9HZH1P", "UF11", "UF1Y32", "UF31", "UF51",
"UF8U52", "UF8UL2", "UF91", "UG31", "UG51", "UH11", "UH31",
"UH51", "UK11", "UK31", "UK51", "UL91", "UM11", "UM51", "UM71",
"UM91", "UMC7D2", "UN10", "UN13", "UN1A22", "UN71", "UN8B42",
"UN8D32", "UN8F42", "UN91", "UP11", "UR11", "UR31", "UR51",
"UR91", "URMD21", "US31", "US91", "USD135", "USD145", "USD1F5",
"USD1K5", "USD1W5", "USDBL5", "USDUK5", "USDUW5", "UT31",
"UT71", "UU11", "UU51", "UU6M", "UU71", "UU91", "UV51", "UV71",
"UV91", "UW71", "UW91", "UX11", "UX31", "UX51", "UX71", "UX91",
"UXC1", "UY11", "UY31", "UY51", "UY71", "UY91", "UZ10BC",
"UZ68BC", "UZA2BC", "UZA8BC", "UZBABD", "UZJ100LGNAEKW",
"V1DKS", "V1DVS", "V1JKS", "V1JVS", "V23CGRHE", "V23WGNXE",
"V23WGNXES", "V24WGNXF", "V24WGNXFS", "V24WNDF", "V24WNDFS",
"V24WNHF", "V24WNHFS", "V25WGNX", "V25WGRX", "V26WGNX", "V26WGNXS",
"V2DAC", "V2JAC", "V2W200", "V2W300", "V36MM01", "V36NN01",
"V36PP01", "V36RR01", "V36SS01", "V36TT01", "V37CC03", "V37DD03",
"V37EE01", "V37FF01", "V37GG01", "V3X208", "V3X308", "V3XG08",
"V43WGRXE", "V44WGNXF", "V44WGNXFS", "V44WNHF", "V45WGRX",
"V46WGNX", "V46WGRX", "V46WNH", "V46WNHS", "V4X208", "V4X300",
"V4X308", "V4X408", "V4XE08", "V4XG08", "V4Y208", "V4Y408",
"V4YG08", "V521L22HCR167", "V521SLLDA5865", "V521SLLDAR165",
"V5W208", "V5W408", "V5WG08", "V6419", "V6435", "V64WMN",
"V7419", "V7435", "V9X300", "VA", "VA51", "VA71", "VA91",
"VABHSH", "VABHVB", "VABHXH", "VAJ", "VAJI", "VAJIA", "VAL",
"VAM", "VAN", "VANA", "VB11", "VB31", "VB71", "VB84035",
"VB84035M", "VB84069", "VB84069M", "VB8435", "VB8469", "VB86035",
"VB86035M", "VB86069", "VB86069M", "VB8635", "VB8669", "VB94035",
"VB94069", "VB9435", "VB9469", "VB96035", "VB96069", "VB9635",
"VB9669", "VBBHSH", "VBBHVB", "VBBHXH", "VBW4035", "VBW4069",
"VBW435", "VBW469", "VBW6035", "VBW6069", "VBW635", "VBW669",
"VBY4035", "VBY4069", "VBY6035", "VBY6069", "VBZ4035", "VBZ4069",
"VBZ6035", "VBZ6069", "VBZ6E035", "VBZ6E069", "VC11", "VC31",
"VC419", "VC435", "VC51", "VC619", "VC635", "VC91", "VCA419",
"VCA435", "VCA619", "VCA635", "VCDZ", "VCM36V", "VD0419",
"VD0619", "VD11", "VD21SDDAAN735", "VD21SEEAAN735", "VD31",
"VD419", "VD435", "VD51", "VD619", "VD635", "VD71", "VD91",
"VDGCS", "VDGDS", "VDL", "VDM", "VDNS", "VDPA", "VDPAF",
"XWYWMX", "XWYWTP", "XWYWTX", "XWYWXT", "XWZLUR", "XX11",
"XX31", "XX51", "XY11", "XY31", "XY51", "Y3AA", "Y3AB", "Y3AC",
"Y3ACA", "Y3AE", "Y3AF", "Y3AG", "Y3AH", "Y3AHA", "Y3AL",
"Y3AP", "Y3AR", "Y3AS", "Y3AT", "Y3AW", "Y3AX", "Y3AY", "Y3AZ",
"Y3CN", "Y4CW", "Y4CZ", "Y4GB", "Y4GG", "Y4GM", "Y4GN", "Y4GR",
"Y4GU", "Y4GV", "Y4GW", "Y4GX", "Y4GY", "Y4GZ", "Y4MZ", "Y4NW",
"Y4NX", "Y4NY", "Y4NZ", "Y4RM", "Y4RN", "Y4TD", "Y4TN", "Y4TR",
"Y4TS", "Y4TT", "Y4TU", "Y4TV", "Y4TX", "Y4WC", "Y4WG", "Y4WH",
"Y4WK", "Y51AA01", "Y51BB0", "Y51BB01", "Y51CC01", "Y51DD01",
"Y51FF0", "Y51HEE0", "Y51HEE01", "Y910", "YA01", "YA1MFA",
"YA1MFB", "YA1MRA", "YA2MFA", "YA2MFB", "YA2MRA", "YA3MFA",
"YA3MFB", "YA3MRA", "YA41", "YA61", "YA81", "YA9S", "YAAMFA",
"YAAMFAAX", "YAAMFB", "YAAMFBBX", "YAAMPA", "YAAMRA", "YABMFA",
"YABMFAAX", "YABMFB", "YABMFBBX", "YABMPA", "YABMRA", "YASMFA",
"YASMFB", "YASMPA", "YASMRA", "YATMFA", "YATMFB", "YATMPA",
"YATMRA", "YAUMPA", "YAUMRA", "YB01", "YB1MFA", "YB1MFB",
"YB1MFC", "YB1MRB", "YB2MFA", "YB2MFB", "YB2MFC", "YB2MRB",
"YB2R", "YB3MFA", "YB3MFB", "YB3MFC", "YB3MRB", "YB4R", "YB61",
"YB81", "YBAMAA", "YBAMAAAX", "YBAMAB", "YBAMABAX", "YBAMAC",
"YBAMACAX", "YBAMADAX", "YBAMCB", "YBAMCBAX", "YBAMCC", "YBAMCCAX",
"YBAMDBAX", "YBAMDCAX", "YBAMFA", "YBAMFAAX", "YBAMFB", "YBAMFBAX",
"YBAMFBBX", "YBAMFC", "YBAMFCBX", "YBAMFCCX", "YBAMGBAX",
"YBAMHBAX", "YBAMHCAX", "YBAMRB", "YBB5D11M6", "YBB5P11M6",
"YBB5P21M5", "YBB5P31M5", "YBB5P51A4", "YBBMAA", "YBBMAB",
"YBBMABAX", "YBBMAC", "YBBMACAX", "YBBMADAX", "YBBMCB", "YBBMCBAX",
"YBBMCC", "YBBMCCAX", "YBBMDBAX", "YBBMDC", "YBBMDCAX", "YBBMFA",
"YBBMFAAX", "YBBMFB", "YBBMFBAX", "YBBMFBBX", "YBBMFC", "YBBMFCBX",
"YBBMFCCX", "YBBMGBAX", "YBBMHBAX", "YBBMHCAX", "YBBMPB",
"YBBMRB", "YBC5D31M6", "YBCP11M6", "YBCP41M6", "YBDMAB",
"YBDMAC", "YBDMADAX", "YBDMDC", "YBDMDCAX", "YBDMFA", "YBDMFB",
"YBDMFBAX", "YBDMFBBX", "YBDMFC", "YBDMFCBX", "YBDMFCCX",
"YBDMHCAX", "YBDMPB", "YBPMFB", "YBPMFC", "YBPMPB", "YBSMFA",
"YBSMFB", "YBSMFC", "YBSMRB", "YBTMFA", "YBTMFB", "YBTMFC",
"YBTMPB", "YBTMRB", "YBUMFA", "YBUMFB", "YBUMFC", "YBUMPB",
"YBUMRB", "YC1MFA", "YC1MFB", "YC1MFC", "YC21", "YC2MFA",
"YC2MFB", "YC2MFC", "YC3MFB", "YC3MFC", "YC41", "YC81", "YCAMAB",
"YCAMABAX", "YCAMAC", "YCAMACAX", "YCAMACAXL", "YCAMAD",
"YCAMADAX", "YCAMCB", "YCAMCBAX", "YCAMCC", "YCAMCCAX", "YCAMCCAXL",
"YCAMDB", "YCAMDBAX", "YCAMDC", "YCAMDCAX", "YCAMFB", "YCAMFBAX",
"YCAMFBBX", "YCAMFC", "YCAMFCBX", "YCAMFCCX", "YCAMGCAX",
"YCAMHC", "YCAMHCAX", "YCBMAB", "YCBMABAX", "YCBMAC", "YCBMACAX",
"YCBMACAXL", "YCBMAD", "YCBMADAX", "YCBMCB", "YCBMCBAX",
"YCBMCC", "YCBMCCAX", "YCBMCCAXL", "YCBMDB", "YCBMDBAX",
"YCBMDC", "YCBMDCAX", "YCBMFB", "YCBMFBAX", "YCBMFBBX", "YCBMFC",
"YCBMFCBX", "YCBMFCCX", "YCBMGC", "YCBMGCAX", "YCBMHC", "YCBMHCAX",
"YCDMAB", "YCDMABAX", "YCDMAC", "YCDMACAX", "YCDMACAXL",
"YCDMAD", "YCDMADAX", "YCDMCB", "YCDMCC", "YCDMCCAX", "YCDMCCAXL",
"YCDMDB", "YCDMDC", "YCDMDCAX", "YCDMFB", "YCDMFBAX", "YCDMFBBX",
"YCDMFC", "YCDMFCBX", "YCDMFCCX", "YCPMFB", "YCPMFC", "YCSMFB",
"YCSMFC", "YCTMFA", "YCTMFB", "YCTMFC", "YCUMFB", "YCUMFC",
"YD2MFC", "YD3MFC", "YDBMACAX", "YDBMACAXL", "YDBMBCAX",
"YDBMCCAXL", "YDBMDCAXL", "YDBMFCBX", "YDBMFCCX", "YDBMFCCXL",
"YDBMGCAXL", "YDBMHCAXL", "YDDMACAX", "YDDMACAXL", "YDDMCCAXL",
"YDDMDCAXL", "YDDMFCBX", "YDDMFCBXL", "YDDMFCCX", "YDDMFCCXL",
"YDDMHCAXL", "YDPMFC", "YDTMFC", "YDUMFC", "YE01", "YE41",
"YE81", "YF61", "YF81", "YG01", "YG41", "YM", "YM11", "YM31",
"YM91", "YN", "YN1P", "YN2B", "YN2BCF", "YN2BDG", "YN2C",
"YN2M", "YN2MC", "YN2MD", "YN4M", "YN5B", "YN5M", "YN9P",
"YN9S", "YNA", "YNSF5DH1M6", "YNSF5P71M5", "YNSF5P91M6",
"YP", "YP11", "YP31", "YP51", "YP91", "YPA", "YS", "YS31",
"YS3B55D", "YS3F55E", "YS3F55L", "YS3F59E", "YS3GG4JA6A01",
"YS3GG4LA6F01", "YS3GG4LM6F02", "YS3GG4ZA6A01", "YS3GG4ZA6F01",
"YS3GG4ZM6A01", "YS3GG4ZM6F01", "YS51", "YS91", "YT11", "YT54Y",
"YT71", "YT91", "YU11", "YU31", "YU51", "YU71", "YV1PW10BD",
"YV1PW68BC", "YV1PW79B0", "YV1PW79B1", "YV1PWA2BC", "YV1PWA8B1",
"YV1PWA8BC", "YV1PWA8BD", "YV1PWARBC", "YV1PZ68BC", "YV1PZA2BC",
"YV1PZA8B4", "YV1PZA8BC", "YV71", "YV91", "YY23P", "YYCAD2M",
"Z10", "Z12", "Z12AA01", "Z12AA02", "Z12BB01", "Z16AMJ",
"Z16AMN", "Z34AA01", "Z34AA02", "Z34AA03", "Z34AA04", "Z34AA05",
"Z34BB01", "Z34BB02", "Z34BB03", "Z51AA01", "Z51BB01", "Z51CC01",
"ZA31", "ZAAMFA/BX", "ZAAMFAAX", "ZAAMFABX", "ZAAMFBAX",
"ZAAMNABX", "ZAAMPA", "ZAAMRA", "ZADA", "ZADAB", "ZADAC",
"ZADB", "ZADBB", "ZADBC", "ZADD", "ZADDB", "ZADE", "ZADEB",
"ZADFT", "ZADH", "ZADJ", "ZADM", "ZADN", "ZAKE", "ZAKET",
"ZAKF", "ZAKH", "ZAKJ", "ZALAT", "ZALB", "ZALC", "ZALF",
"ZALG", "ZALH", "ZALHT", "ZALJ", "ZAPAPA", "ZAPMFAAX", "ZAPMFAAY",
"ZAPMNAAX", "ZAPMPA", "ZARMFAAX", "ZARMFABX", "ZARMFBAX",
"ZARMNAAX", "ZARMPA", "ZARMRA", "ZATMFAAX", "ZATMFABX", "ZATMFBAX",
"ZATMNAAX", "ZAXZ", "ZAZA", "ZAZAT", "ZAZB", "ZAZBT", "ZAZC",
"ZAZD", "ZAZE", "ZAZF", "ZAZH", "ZAZJ", "ZAZK", "ZAZL", "ZAZT",
"ZAZTT", "ZAZU", "ZAZY", "ZAZZ", "ZB31", "ZB51", "ZB71",
"ZB8S", "ZB8Y", "ZB8Z", "ZBAMAAAX", "ZBAMABAX", "ZBAMDAAX",
"ZBAMDBAX", "ZBAMDCAX", "ZBAMFAAX", "ZBAMFABX", "ZBAMFBAX",
"ZBAMNAAX", "ZBAMNBAX", "ZBAMRB", "ZBC", "ZBD", "ZBPANBAX",
"ZBPANCAX", "ZBPARB", "ZBPMABAY", "ZBPMACAY", "ZBPMBBAY",
"ZBPMBCAY", "ZBPMCBAX", "ZBPMDCAY", "ZBPMFAAY", "ZBPMFABY",
"ZBPMFBAY", "ZBPMGBAY", "ZBPMGCAY", "ZBPMHCAY", "ZBPMNAAX",
"ZBPMNABY", "ZBPMNBAY", "ZBPMNCAX", "ZBPMNCAY", "ZBPMRB",
"ZBPWFAAY", "ZBPWFABY", "ZBPWNBAY", "ZBRMAAAX", "ZBRMABAX",
"ZBRMACAX", "ZBRMCBAX", "ZBRMDAAX", "ZBRMDBAX", "ZBRMDCAX",
"ZBRMFAAX", "ZBRMFABX", "ZBRMFBAX", "ZBRMGBAX", "ZBRMGCAX",
"ZBRMHCAX", "ZBRMNAAX", "ZBRMNBAX", "ZBRMNCAX", "ZBRMRB",
"ZBTMFAAX", "ZBTMFABX", "ZBTMFBAX", "ZBTMNAAX", "ZBTMNBAX",
"ZBTMNCAX", "ZBZMACAY", "ZBZMDCAY", "ZBZMFAAY", "ZBZMFABY",
"ZBZMFBAY", "ZBZMGCAY", "ZBZMHCAY", "ZBZMNBAY", "ZBZMNCAY",
"ZC31", "ZC51", "ZCBHZH", "ZCBHZW", "ZCPANBAX", "ZCPANBBX",
"ZCPANCAX", "ZCPANCBX", "ZCPMABAY", "ZCPMACAY", "ZCPMAGAY",
"ZCPMBBAY", "ZCPMBCAY", "ZCPMCBAY", "ZCPMCCAY", "ZCPMDBAY",
"ZCPMDCAY", "ZCPMFAAY", "ZCPMFABY", "ZCPMGCAY", "ZCPMHCAX",
"ZCPMHCAY", "ZCPMNBAY", "ZCPMNBBY", "ZCPMNCAY", "ZCPMNCBY",
"ZCPWABAY", "ZCPWACAY", "ZCPWCBAY", "ZCPWCCAY", "ZCPWDBAY",
"ZCPWDCAY", "ZCPWNBAY", "ZCPWNCAY", "ZCRMABAX", "ZCRMACAX",
"ZCRMAGAX", "ZCRMCBAX", "ZCRMCCAX", "ZCRMDBAX", "ZCRMDCAX",
"ZCRMFAAX", "ZCRMFABX", "ZCRMGCAX", "ZCRMHCAX", "ZCRMNBAX",
"ZCRMNBBX", "ZCRMNCAX", "ZCRMNCBX", "ZCTMCBAX", "ZCTMCCAX",
"ZCTMNBAX", "ZCTMNBBX", "ZCTMNCAX", "ZCTMNCBX", "ZCZMABAY",
"ZCZMACAY", "ZCZMAGAY", "ZCZMCBAY", "ZCZMCCAY", "ZCZMDBAY",
"ZCZMDCAY", "ZCZMDGAY", "ZCZMFAAY", "ZCZMFABY", "ZCZMGCAY",
"ZCZMGGAY", "ZCZMHCAY", "ZCZMHGAY", "ZCZMNBAY", "ZCZMNBBY",
"ZCZMNCAY", "ZCZMNCBY", "ZD11", "ZD31", "ZD51", "ZD71", "ZE2",
"ZE31", "ZF111", "ZF31", "ZFANF6EK6", "ZFANF6EKA", "ZG31",
"ZH51", "ZH71", "ZHNC9L", "ZHNE9L", "ZM31", "ZN31", "ZN57",
"ZN67", "ZN8M", "ZP31", "ZR31", "ZR71", "ZRHNYH", "ZRHNYW",
"ZT14", "ZT24", "ZT35", "ZT37", "ZT38", "ZT45", "ZT47", "ZT48",
"ZT55", "ZT57", "ZT58", "ZT65", "ZT67", "ZT68", "ZV18", "ZV30",
"ZV38", "ZV41", "ZV81", "ZW41", "ZW61", "ZW81", "ZZT220LAEMNKW",
"ZZT220LALMNKW", "ZZT221LAEMEKW", "ZZT221LAEPEKW", "ZZT221LALMEKW",
"ZZT221LALPEKW", "ZZT230LBLFGHW", "ZZT231LBLFVFW", "ZZT251LALMEKW",
"ZZT251LALMNKW", "ZZT251LALPEKW", "ZZW30LAKMQHW"), class = "factor")), .Names
= c("Lib_Marque__MRQ_",
"Lib_Modele__MOD_", "Lib_Carrosserie__CAR_", "Lib_Energie__ENE_",
"Puiss_Fiscale", "Nb_Places", "Nb_Cylindres", "Cylindree", "Vitesse_Max",
"Puiss_Reelle_kW", "Puiss_Reelle_DIN", "Regime_Puiss", "Couple_Max",
"Regime_Couple_Max", "Nb_Rapports", "Longueur", "Largeur", "Hauteur",
"Empattement", "Voie_AV", "Voie_AR", "Poids_Vide", "PTAC", "Charge_Utile",
"Valeur_Neuf_Orig_EUR", "Code_SRA"), row.names = c(NA, 10L), class =
"data.frame")
Thank you for your kind help

Related

factoextra variable plotting and labeling subset

I've run a PCA using prcomp in R and I am trying to produce a variable plot that has 1) a subset of the variables (arrows) in a different color (black) than the rest of the variables, 2) sort those variables prior to plotting so the black arrows aren't covered up by any of the other arrows, and 3) label the black arrows with their TUXXXX number.
Here is a truncated version of my data:
structure(list(sdev = c(21.7106794138444, 15.6885074594869, 11.9124316528111,
10.155277241318, 9.31528828036412, 7.56876266263865, 7.19938201515987,
5.81620977435434, 5.00785424840699, 4.57228787327195, 4.51525494575488,
3.20601607034873, 2.91477640215067, 2.48737967730048, 2.13230488376163,
1.74923754200417, 1.32745772948038, 1.27373216417502, 0.924437474777366,
0.749074623004602, 2.499709597053e-15), rotation = structure(c(-0.0710441966458092,
0.091894514828866, -0.0892433537986534, -0.269473709517009, -0.270455466278075,
0.217492458575054, 0.104541973199297, 0.198858094257877, 0.0222680112919805,
-0.220704163347643, -0.0144913885562279, 0.191255085890651, -0.0639203495167002,
0.156262929972648, 0.184067836594737, -0.221797618857792, 0.152932751853774,
0.218733634550932, 0.213989867048259, -0.219209176045661, 0.162232843055052,
-0.182649403408074, 0.0732706002149817, -0.0636694683826245,
0.197950156891487, -0.201332798849071, -0.0908133550739104, 0.204561640782066,
0.144543461720936, 0.128722984809536, 0.152014925749702, -0.219186163224382,
0.137427869376807, -0.0385728465064452, -0.210836096156869, 0.295086522896984,
0.0791956927556792, 0.154250304318938, 0.212537035577304, 0.165554637810987,
0.0559168852882808, 0.0389301896007549, 8.50109782205011e-06,
0.0386719091643949, -0.223181316780788, 0.0201295766763838, -0.0993945550528442,
-0.0797657364873552, 0.290392094157839, -0.210104310439075, 0.190507620860241,
0.288216604566037, -0.128091623622577, 0.0523741236254804, 0.165286635170839,
0.26567738477018, 0.067304658063138, -0.185395359345644, -0.0824392053628523,
0.0232331903282599, 0.206712718290849, -0.0599454190622519, 0.0694655529225049,
0.27934713843206, 0.120105146108152, 0.276987279291797, 0.137068573563571,
0.290227550805898, 0.0299855300238849, -0.048045392789825, 0.217209812823655,
-0.245207498414819, -0.0969050397538762, 0.0152958298727508,
0.0611874790392221, 0.244015616675892, -0.341439467152496, -0.0574074669754257,
-0.187473105527714, 0.0859725296785313, -0.230526618631008, 0.164238788534203,
-0.422116092865793, -0.0847447867791298, 0.0984005915083912,
0.0400031956936472, -0.0768787993932683, -0.127305543959199,
0.174417860300221, 0.00642366483942508, -0.0644270895895563,
-0.0445557418009, -0.206781215165792, -0.398796252833277, 0.198729650467593,
0.0351312161529938, -0.149474677035792, -0.0671760700655275,
-0.0776573448858521, -0.0276268199179851, -0.0622850132226139,
-0.0133848915206553, -0.0412751078511757, -0.196695235499305,
0.035533391699955, -0.0471461480863407, -0.471887698745297, 0.385807939659813,
-0.0521508210675749, -0.106054753553622, -0.0520098951237357,
-0.328301752147492, -0.0885218905714762, -0.392528395483506,
-0.0535243088811493, -0.0012232141956296, -0.143968515821013,
0.110020791115645, 0.105789408005642, -0.0173550741395983, -0.0754711706175302,
0.105789800532602, 0.035696880367874, -0.0235700328573188, -0.086664772131814,
0.140659513401983, -0.147738109860937, 0.158253547879328, 0.096508294839766,
-0.0405645836586841, -0.0308947063294566, 0.196563611460491,
-0.163272613036823, 0.102159062108236, -0.242801481572191, 0.100060947435785,
-0.122408620775568, 0.0879253395566385, 0.0964448760240853, -0.10574290240921,
0.473324985332234, 0.237791221156891, 0.121312056042028, -0.0156952213549262,
-0.0509545579371996, -0.188663582956394, -0.0296470996543493,
0.259217775431442, -0.151966417414955, -0.0246227447960926, 0.412107323913548,
0.135772975480753, -0.0902168853917747, -0.0478519874649824,
-0.0293395316078502, 0.036873372126565, -0.0600803315985544,
0.0951569802806819, -0.174539345831377, -0.0567399129758035,
-0.0522218071944251, -0.0208963041931566, 0.15376867866167, -0.0906491458699936,
-0.13257887196968, -0.0137277293203767, -0.329880055323168, -0.227898895128165,
-0.0402178711138279, -0.191724054954671, -0.0457418642155951,
-0.113122585201102, -0.0523451728177034, -0.0619052030873901,
-0.232037793152732, -0.286608825250971, -0.337575786471338, -0.106930203013502,
-0.0488020861881439, -0.0342694484533206, -0.316010730818033,
-0.138362452107825, 0.000204654351180751, 0.34062110315846, -0.0174472565351551,
0.321216705099307, 0.109402271713093, -0.195953316697484, 0.106147314965255,
0.0965509971711528, -0.0619150877056984, 0.0823900429544073,
0.107331603831664, -0.196505739977505, -0.106531330626324, 0.083316396319378,
-0.0150328553267955, -0.131557865292901, -0.197676924192316,
-0.302438247351333, 0.0850937235677142, -0.0588088540505814,
-0.0137660099545295, 0.0981614485249126, 0.064387690302654, 0.0870877447014138,
0.115369776587117, 0.0743160202050587, -0.302341999379974, 0.0990657432090211,
-0.109416851119016, 0.0566207941620112, -0.563376445425201, 0.022987878311214,
0.00914995477596945, -0.0698458973541682, -0.339551294424273,
0.328653723240687, -0.311621856766325, 0.0451475830297207, 0.0486778657760599,
-0.203890915518391, -0.00733314039012801, 0.0302380986964549,
-0.187740946530342, 0.107505967223115, 0.0112058761308914, 0.0124189091072754,
-0.0946013978939246, -0.0108516955206006, -0.0224544300789198,
-0.200447923165361, 0.00227210575436315, -0.0230219082173417,
-0.115276809069961, 0.113599893064251, 0.0547021334782484, 0.0750295713780988,
0.0318176533771422, 0.270756307602172, 0.0158888930662066, -0.0321100878211108,
0.0137635276916354, 0.285629078757821, -0.0707869220022327, -0.196194173921016,
0.0691894805409008, 0.196425060869134, 0.0609662656649608, 0.0112726648905893,
0.0763548314916228, -0.0203154117969338, -0.154183879477363,
-0.263435512251247, 0.0904584427059006, 0.443081105454767, 0.145760707944433,
-0.124076693641366, -0.00926033658765893, 0.322008337751576,
0.038976848601001, -0.00243771729397693, 0.0682300992336678,
0.101208051579165, -0.0044801862648156, -0.0288479608546419,
0.338293188340527, -0.148520145256712, -0.114001067101895, 0.0429068793268258,
-0.0808048267081677, 0.0147906601414549, 0.00024012812721683,
-0.0245592922986743, 0.26189600932665, 0.0089069926197661, 0.102640316156789,
0.0293398861736338, 0.461748240785653, 0.0268162505216955, -0.0262617915066989,
0.128477574136056, 0.304269602566599, -0.00833894425455883, 0.0183612622798514,
-0.0694598653855358, 0.143473468921974, 0.494741840190451, 0.11710470731812,
0.0938975501248067, -0.111819356177393, 0.074487393087207, -0.236744656433776,
-0.00888263838265717, -0.0411308668141714, -0.0205247425377322,
0.00682064532990936, -0.0657589971316789, -0.0854778766938379,
-0.0446898232128541, 0.0595158665026168, -0.164975323219787,
-0.21297106776461, -0.24328292167101, -0.0421999896796148, -0.0454152302659223,
0.536798625888851, -0.107184764029374, -0.134710620292912, -0.0486878301757869,
0.0112145455041351, -0.0888773206829193, -0.0231311387150055,
0.160224502964451, 0.116642580196556, 0.132842779999407, 0.0815222556677455,
0.0846715273158058, -0.168358316697627, -0.141086214309714, -0.0812000194350307,
0.108662664398591, -0.0391921007274459, -0.231315089883372, 0.25650378734853,
-0.0459946623780035, -0.366253502200094, 0.0485143397750607,
0.0417032700002287, -0.133038776710167, -0.230298287475923, 0.0369759420468897,
-0.00906710613565646, 0.0342935061381997, -0.273232725280753,
0.0602621389601039, 0.206808600842623, -0.32050527301245, 0.0622454407253566,
-0.0606525149750042, -0.0660628546307464, -0.038482743495315,
-0.198081930190034, -0.0732284456644516, 0.405606839140943, 0.0459681574877996,
-0.0809991829793473, -0.0121246261443008, -0.326485629157016,
0.0750251561011149, -0.0511696428776832, -0.0776271119484428,
0.0114894367280979, 0.014021492503364, 0.118849898460583, -0.0350044617639092,
0.0269961041673681, 0.239744113644073, -0.233879279575839, -0.115473220682409,
-0.139126309932733, 0.11002945246376, -0.0830577400425309, -0.0642289884705754,
-0.0817307298240943, 0.0291046627888711, -0.0466920006759583,
0.256672775663942, -0.0137954035992047, 0.17957481447807, -0.0303657675236596,
0.518263963411537, 0.344005787563606, -0.0655688570898937, -0.0265294401946153,
-0.0263107898868621, 0.289506920843548, 0.118475732210224, 0.053567958881615,
0.146877133183997, -0.0549414997788912, 0.143851895777107, 0.0428308701652828,
-0.348959761946987, -0.189096210288467, -0.00385035890156567,
0.150120708161381, 0.0607203081654835, 0.000166036942981724,
-0.0397011322296128, 0.0239760961564877, -0.00913095901818713,
-0.136862964262375, 0.102111106897839, 0.0687169707815706, 0.239013538410316,
-0.39892902681439, -0.197510750116376, 0.0499804963638917, 0.128640553281137,
0.110040614593457, -0.0490679379082568, -0.234025706976098, 0.157764576030734,
0.0571664700394519, -0.074307378291659, -0.231764546118876, 0.565447067892318,
-0.21480675567977, 0.0854469138131175, -0.0976097155414531, 0.160801495571792,
-0.0624041394929365, -0.0127140410117323, 0.196633195933416,
0.0340211274197625, 0.0195595932420065, 0.0964345475133984, -0.174817763577626,
0.118153342593374, 0.225094093283825, 0.0276798513722757, -0.39244132040106,
0.0738620568768489, 0.027031867335908, 0.0584738274201628, 0.00728266929277696,
-0.200928813049723, 0.100479151028423, 0.217133686900663, 0.152350478604359,
0.0798552081200005, 0.00566909653422267, 0.15071802028838, -0.0828967915619975,
0.0689991484295119, 0.118221935665031, 0.418906970577945, 0.161468821548893,
-0.0443917405359232, 0.127346300562372, 0.0854487046042784, 0.0086243432217815,
0.0186528057922736, 0.143224492276055, -0.113522100459258, 0.365748845830972,
-0.353026210924788, 0.0928434654809545, -0.217256921150109, 0.0926292235900054,
-0.0360081503134767, -0.0761247497474667, 0.0137710983238269,
0.135604749840715, -0.366785665744512, 0.174928851514231, 0.0364877873595186,
0.0808239023932249, 0.057715463934493, 0.103601691734105, -0.109666857605533,
0.38393023627746, -0.117248332196572, 0.134270206368149, 0.0580313640704774,
0.0649484539445183, 0.215353645432973, 0.0977108936702795, 0.16612143102929,
0.152770485581267, -0.0516344648811396, -0.0620940862015108,
0.114473317921704, -0.0383202829927206, 0.0820220075422196, 0.0556449561108403,
0.0053103511581772, 0.141569483443786, 0.264761186392854, 0.231379833347928,
-0.186458908266326, -0.280612868599116, -0.0134977078164976,
-0.190682413873154, 0.103622962625572, 0.048589128670959, 0.189228510250879,
-0.267141675131746, 0.24968486643315, 0.000515248155113446, 0.0518714761513495,
-0.0123619986636973, -0.0400774164248301, 0.14696585867848, 0.00893605318819822,
-0.115310054522583, 0.0730556770081751, -0.0415182843892857,
-0.100197819082248, 0.366565649542296, -0.280217314004845, 0.0742548639941826,
-0.0598573375691124, 0.0773367591528449, 0.00440008401952238,
-0.133823453930746, 0.0129306082883093, 0.249237874757721, 0.178566150191566,
0.0236542331383419, -0.121983928027758, -0.407639692892733, 0.105625218150781,
0.0606170741355181, -0.205658012407281, 0.198411895098939, 0.314706002474467,
-0.0699572649574542, -0.256054196724344, -0.0597932960838045,
0.12552805883941, -0.0738282459049305, -0.270044343022259, -0.241030766471284,
0.101198016298546, 0.207020228203116, -0.105134856921501, -0.0677078010226698,
0.0597983546937891, -0.181549492585234, -0.0707807644693492,
-0.242992185702685, -0.164512180143508, 0.0345701932987703, -0.0663154906257285,
0.302765631613708, 0.118224308922645, 0.0673423264385151, 0.417740310978627,
0.111554431260226, 0.16022442648127, -0.25635936207313, -0.35265959952747,
0.0429263261414316, 0.140480243375922, -0.130382613873709, -0.0446328161712632,
0.120679204177165, 0.100894280068327, 0.102396715497024, 0.292226072514004,
0.0170232777619504, -0.0854499461046589, 0.150649869168952, 0.054457847943396,
-0.0755734422376126, -0.0485946974863497, -0.214957242429833,
-0.19078567042026, -0.265677083691519, 0.11169177584997, -0.0546945656068388,
-0.133918556644411, -0.0815433043760734, 0.0419081230722499,
-0.119806690064691, -0.129001645490559, 0.164330559962565, -0.494999436348284,
-0.0104711534954494, -0.151933262861035, -0.0616048245349729,
0.0510091356535412, -0.15286661063535, 0.286795952380893, -0.00227878893487643,
-0.121875652782209, -0.0463279998907995, -0.08440989195395, 0.0161463685432679,
0.283239464786081, -0.0997334879966379, -0.107077349937415, 0.0797083319878824,
-0.023817698507559, 0.0308411589066249, -0.33639040110823, -0.22283646210506,
-0.0472382156514798, -0.0383954704026199, -0.279873414947505,
-0.110928067466998, 0.0224738031700519, -0.240448693328791, -0.0234165327843327,
-0.164995870598194, 0.0704836439566211, -0.0341351365684308,
0.253109207656731, 0.0986224720533927, 0.0788051554263656, 0.0348921204456385,
0.179396594950779, 0.183681460022634, 0.165162541829685, -0.131056895026594,
-0.043658366747374, -0.164919051972395, 0.000438005379084683,
-0.203731301273092, 0.156795003278361, 0.147134057978626, 0.0674666995224469,
0.0387098969653998, 0.0780676163151537, -0.020902824954741, 0.0863172379869736,
0.0254543096586073, 0.221894385139484, 0.605679699321179, 0.00510726652451246,
0.0122597366937914, -0.177909018628657, 0.112879199323714, 0.00722763837901889,
-0.226515396833189, -0.179516219763039, 0.0427914553668244, -0.301499857490821,
0.07077374887633, 0.0684478824696676, 0.109600278015023, -0.246938356324243,
0.0361050298642269, -0.273671368850468, 0.0361740234532937, -0.0379154357295922,
-0.140858482198813, -0.210557939874765, -0.183530140411959, -0.170246755949232,
-0.153695213839514, 0.197257212733899, 0.176328880404244, 0.267335680405474,
0.0108203611164604, 0.420718967278865, 0.0610513794750232, -0.0695142190235678,
-0.0211301631659223, -0.109598478540236, 0.0168455051311258,
0.0297211637285332, 0.0641419705460361, 0.196768178957862, -0.101223881022882,
0.156790420489079, -0.248396712859248, -0.0324362090799154, 0.116497846273851,
0.206631759837322, -0.26949738606709, 0.0523825016986687, 0.273991705979531,
-0.211717836239047, 0.343025575540513, 0.123225187210276, -0.130175293604759,
0.383814266477628, -0.0425846714760806, -0.120958839664608, -0.222129739206683,
0.0129931836329733, 0.144776049791581, -0.162517014653887, -0.0859042045925978,
-0.181054333724447, 0.0216585016380889, -0.0923250223535876,
-0.103640362754872, -0.223956862384563, 0.213416939275391, -0.21381164272001,
-0.235056303853187, -0.0630316125230271, -0.105100763021652,
-0.0360147146171049, -0.0709796908578211, 0.113552355258653,
-0.00724023466942227, -0.0325253318186826, -0.0460572605581843,
0.362655177721721, -0.102542875980008, -0.0801797191999012, 0.107198034030814,
0.183373945987406, 0.0309647928318137, -0.236970374446373, 0.0520664942182686,
-0.0402703424381589, 0.0504291632173252, -0.158130484290709,
-0.112283134517499, -0.300637215703608, -0.231320162708774, 0.0785169224262154,
0.23958352054759, 0.426485005426312, -0.0815406319434192, 0.00340039424643938,
-0.0375428689912434, 0.33351700972973, -0.0800149829632403, 0.140498383489292,
0.167368656035586, -0.0844117015281891, 0.0785085162751926, 0.0489486062002369,
-0.0561511863757523, 0.234387154088994, 0.0481142285230063, 0.0705808780719704,
0.221875388986379, -0.148031374880166, -0.0894717302805895, 0.231743942045981,
-0.210616362796393, -0.0812013243962482, -0.185771800435443,
-0.0438135376399639, 0.218374086144347, 0.121623152294345, -0.170058260806661
), .Dim = c(35L, 21L), .Dimnames = list(c("TU35976", "TU38792",
"TU35975", "TU4897", "TU9262", "TU18312", "TU38793", "TU30299",
"TU38794", "TU16422", "TU32068", "TU12311", "TU18325", "TU22117",
"TU20746", "TU19660", "TU41790", "TU43092", "TU18309", "TU19659",
"TU16277", "TU34798", "TU10953", "TU18317", "TU18307", "TU9186",
"TU17864", "TU15658", "TU14030", "TU15669", "TU9890", "TU33617",
"TU16279", "TU27042", "TU17167"), c("PC1", "PC2", "PC3", "PC4",
"PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13",
"PC14", "PC15", "PC16", "PC17", "PC18", "PC19", "PC20", "PC21"
))), center = c(TU35976 = 6.61238491831215, TU38792 = 10.2487864648085,
TU35975 = 7.41959195648095, TU4897 = 10.9311685931669, TU9262 = 11.0918083964267,
TU18312 = 11.7076238975148, TU38793 = 9.74398564779285, TU30299 = 12.892315214803,
TU38794 = 9.54139631961704, TU16422 = 12.3329627148834, TU32068 = 7.97610519995008,
TU12311 = 10.3617106799956, TU18325 = 7.59060411317826, TU22117 = 9.03799676912002,
TU20746 = 9.178102720165, TU19660 = 9.87502757868133, TU41790 = 8.9943466756264,
TU43092 = 10.9585816938684, TU18309 = 10.6298994150062, TU19659 = 10.3934726050624,
TU16277 = 8.32556725898017, TU34798 = 7.02103110645297, TU10953 = 7.01860382462013,
TU18317 = 7.36244270525821, TU18307 = 11.3778296252987, TU9186 = 10.7024172065364,
TU17864 = 8.2903853475227, TU15658 = 6.58819311715545, TU14030 = 8.134641008701,
TU15669 = 7.01449935590416, TU9890 = 8.13988320730633, TU33617 = 10.6809972208427,
TU16279 = 7.9614057227348, TU27042 = 7.34221912393268, TU17167 = 11.2592403834747
), scale = FALSE, x = structure(c(24.4897868475554, 12.4416010164283,
12.3200413661576, 6.91612686789472, 30.5655787046573, 33.5373707608136,
6.7521417841798, 31.2938791704631, 29.0635289584208, -23.3354523484558,
-15.6229701200559, 6.43010789907339, -24.9147092475567, -31.0094950116289,
-28.4137928961069, -21.5926413362042, -3.97585196983663, -20.8563124842282,
-0.593920033332157, -3.64572299218967, -19.8492949360489, -9.96693484414473,
-23.5449684594658, -18.996265716943, -23.7811581634436, 3.93738430048,
9.37353195322868, -19.423648038774, 7.87596964384287, -3.13661328005585,
-7.09016527838172, 3.71259770410569, 23.247076153704, -2.03249135782906,
-3.64325919770972, -6.94450353973124, 7.55306940052889, 31.346240781817,
-3.48931847017886, 29.4056029647248, 12.4861765573918, -6.8883231131661,
-6.8786118382072, 15.8325477899497, 15.3870141654559, -11.3237572934353,
-4.49560209730399, 1.115062768913, -20.2141393532659, 9.76193925462921,
-1.15731242202584, 6.22677163564855, 14.431909276018, -13.4812455995592,
-9.58096578254001, -10.0824168036361, -10.1417065317313, 6.11246229818054,
-4.84525793168699, 14.9352609583166, 16.1272133946181, -17.0836840355263,
9.35451814718846, -6.63382933222961, 5.79244304277846, 7.73028939318989,
-6.00113726185851, -8.57575275731579, -6.70414747438031, 11.0021295692077,
7.62205208005063, -6.03281844054887, -1.59444275830952, -7.70227835025931,
-6.4184560830441, -12.3696585650364, 1.42826497938592, 8.28315195406988,
-13.8464231033084, -6.95076374785849, 5.03179685038719, 16.6482451825695,
25.4557137741208, -6.16437895161065, -0.188023057317339, 3.51919999146276,
-3.06021456766217, 12.7300628490286, 0.340348842202129, -4.18342952961951,
9.91999265542052, -6.2673275997563, -6.19445525060979, -4.89432563084305,
13.3155996092707, -17.5672684031691, -11.0570104414685, -10.1512940397755,
-2.83422832939901, 11.2933772476208, 18.438427176494, -10.6101681685668,
2.08048057352476, 5.50745324586983, -0.13719717270706, -8.9884667602456,
-2.05928444313446, -0.305773393272364, 4.86554463593651, 3.76285186780856,
6.3828926870771, -9.3655246100571, 7.43651870615979, -1.67082019758757,
10.9895599029683, -13.9919213196391, -7.47010213808747, -5.18316808251628,
3.09935494483666, 0.0636557688816208, -1.54858827353552, 5.76445544260896,
-7.0244817763404, -6.91485718432494, 6.12343812013661, 16.0347161023267,
-6.04452306419056, 0.503323158087318, 1.11905480618314, -3.32310396567328,
3.1274151532053, -1.0139189902977, -2.77210893619864, 5.73300675328722,
-2.20016077060467, 6.88733384115661, 9.29615931028018, 7.89283806484175,
-0.0231784873612931, -13.6472361241707, 8.57047305874539, 9.82836851225084,
-12.0042402273719, -9.50514572716062, -7.91330903314343, 8.52172081325052,
-3.03276814511544, -8.49580406093405, -2.33842120098311, -0.32804627167184,
-3.21259723306479, 11.1229701308803, 0.598883041283415, 5.30460923308376,
1.00174438392002, -1.97289932239362, -10.2991918599681, -3.87835358264123,
-2.25659286308468, -0.166946108131337, -4.78949081440092, 3.19183354598423,
4.8383258847991, 0.890821633270318, 14.2375666218091, -6.1498396420083,
0.00274092818159516, 2.69868755607018, -6.72994548395586, -2.87563409646143,
6.39162216555694, -1.86430696261611, 1.49349337044142, -0.729377873822674,
3.91976580406387, -4.55169784656593, 4.01470477896383, 9.45815735561592,
3.87143750044459, 2.8485319829077, -3.54554995799273, 2.1592779575771,
-10.2265407210419, -2.57734842434015, 3.85728531842232, 3.91861430861892,
-6.08938026261039, 2.90775931244037, -5.65086822564584, -7.43442226552497,
-0.28834246695089, 4.46777893840091, 1.61867182502613, -1.24379496084697,
3.09330484415506, 4.6129428255061, 4.21327794340158, -2.73480960596815,
-1.34501116390485, -4.95417459779772, -1.50853746838879, 4.27315750243976,
5.82184171959861, -3.417633941994, 9.09574374372561, -2.51371486672449,
-5.3839624715871, 4.02549123440248, -4.25205519103745, -6.14575157593085,
3.39653326861517, 2.02195972923006, 0.737129651195039, -3.82060608464456,
-5.8916049884138, -1.48103866101421, -4.15462594283813, 2.85762680978641,
8.01848063520863, -0.33318325779775, -4.11692676832453, -3.14609004733945,
-3.87716607273847, 2.15863837910027, 5.89633795035078, 6.78408908767204,
5.31335299395838, 2.26271596099398, -6.04004269690954, 0.66943773718038,
-7.25501768327073, -1.85352333808763, 0.881321761644734, -3.37300816578494,
1.72336449307423, -1.12738959732561, -1.00315691989581, 1.22856047955961,
-5.49078567616185, 7.36566150881169, 1.5098504796481, -4.40047569826546,
1.27392003732061, -1.32431052177641, -3.49056795319117, -1.81317399652518,
4.21470358856118, -3.35477920804357, 0.76847614798403, 4.53289945581295,
1.08860795433414, 2.64380516830634, -3.5282442958868, 0.44695028657078,
6.40236529107031, 1.40990912221294, -0.646731159533322, -0.886819655598922,
-0.75355529529178, -3.22681748481868, 1.14443040171423, -1.01721629940821,
-1.91406441412825, 2.79795257160194, 1.42125707801834, -3.78513731974819,
5.22015934186783, -3.11038146921718, 4.2502371748613, -2.23573426796635,
1.2890326250481, -3.2044887828359, -0.0731034485321765, 1.00689042463065,
3.10770789167095, 0.653717111815948, 2.0046773828616, -5.05502285926648,
0.670269628945531, -0.0735066911646989, 0.567378074513561, -4.12216401435608,
-1.34361612453716, -2.31031886740573, 4.81653041064168, 0.0225272846463933,
-2.29390683891735, -3.34883149458521, 1.62567523985947, 1.46413728406672,
2.19861127383831, -2.2813563892377, 1.48246659900362, 1.20813467297598,
4.19016124903691, -3.8965814643401, 3.56184752348759, -1.3878373295987,
1.21458977444305, -0.654562661488364, 0.95632241225039, -1.55232118983605,
-2.44238882925152, 1.13264815277383, -1.78862294430386, 0.991256365490394,
-3.88951966260596, 0.202107196565979, 0.551090451321218, 2.66348016156913,
-0.854309938495967, -0.232716071672556, 0.851674118269924, -0.985653498045505,
1.36933618443016, -0.586856938122795, -4.1119301713715, 1.0178280457984,
0.338189042904915, -3.94726389810293, 1.81377558126379, 1.58372328030388,
1.72308989346244, 2.19193280022478, -1.61256462530986, 1.96795000825428,
-0.618527965915178, 0.0756192601567935, -0.659358025397941, 0.0429550715360451,
-0.381324238450748, -0.652905276182954, 0.170764900323459, -0.641706794178386,
-0.0221222785810836, 2.30873232738461, 1.27649223277723, 0.0239704300112933,
1.61258498499148, -2.05589657580369, 0.0265571467877399, 1.25029287962319,
-0.571431828720408, -1.73619374916576, -0.0382088144200337, -0.321239936961026,
-0.611330806517872, -2.02090803294801, 3.14396363436869, -1.10262030332252,
-1.04168768271449, 0.37429480503427, 0.104514606536275, -0.478767952336214,
-0.192546893385304, 2.1627661920923, 0.195395664072845, -0.782469508379251,
2.08546244595102, -0.0517755897340584, -2.39907743930418, -0.211807017194547,
1.71381905614487, 0.83072521628824, -1.60469551897193, 0.245800797687136,
-1.46819802906202, 0.849407708022543, 0.917523253251796, -1.60319562494994,
1.89391093257302, 0.378604048008997, 0.14292959825461, -0.126413703865446,
-1.54645185235878, -0.749700454486876, -0.0658077625468692, 1.55140944467166,
0.302322289091245, 0.458890126236888, -0.788003883776506, -1.8522098865949,
-0.303600234099745, -0.869244048674518, 2.09285131170145, 1.13594169034256,
0.00257581110260907, 1.28821287823238, -0.603719944771219, -0.0929817189825319,
0.646083878133434, -0.997976432253114, -0.0887921104756663, -0.252335674196718,
0.885171983511843, -0.455664633944459, -0.080944547822266, -1.11153038212543,
0.684953529364659, 0.00107091275654292, -0.0523472212020604,
-0.722665903230519, 0.112695429436832, -0.431332703576418, 2.28632079906497,
0.389976510624337, -0.672770348738164, -0.710872748519771, 1.11097033239239,
-0.117525841496901, -0.38659967304807, -0.311519238694312, -0.58769206070627,
0.880912821150173, -0.223180949008615, -0.0563287542495416, 0.677577799103385,
0.174786309548343, -0.486054451272286, -0.875421020334039, -1.99840144432528e-15,
-2.19269047363468e-15, -2.80331313717852e-15, 3.39658856596259e-15,
4.44089209850063e-16, 4.44089209850063e-16, -2.44249065417534e-15,
1.11022302462516e-15, -6.66133814775094e-16, -4.44089209850063e-15,
-3.5527136788005e-15, -2.33146835171283e-15, -6.43929354282591e-15,
2.44249065417534e-15, -1.4432899320127e-15, -2.19269047363468e-15,
1.0547118733939e-15, -1.11022302462516e-15, -9.99200722162641e-16,
1.33226762955019e-15, -1.55431223447522e-15), .Dim = c(21L, 21L
), .Dimnames = list(c("EDA_01", "EDA_02", "EDA_03", "EDA_04",
"EDA_05", "EDA_06", "EDA_07", "EDA_08", "EDA_09", "NDA_01", "NDA_02",
"NDA_03", "NDA_04", "NDA_05", "NDA_06", "NDA_08", "NDA_09", "NDA_10",
"NDA_11", "NDA_12", "NDA_13"), c("PC1", "PC2", "PC3", "PC4",
"PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13",
"PC14", "PC15", "PC16", "PC17", "PC18", "PC19", "PC20", "PC21"
)))), class = "prcomp")
Here is the minimal code to reproduce this problem:
library(factoextra)
library(tidyverse)
# create a named factor for coding the coloration of the variables in the plot
markers <- facto_summarize(pca,
element = "var",
result = "contrib",
axes = c(1, 2)) %>%
mutate(candidate = ifelse(name == "TU35976" | name == "TU18317" | name == "TU12311" | name == "TU3565" | name == "TU9890" | name == "TU18316", "1", "0")) %>%
select(name, candidate)
markers_vec <- as.factor(markers$candidate)
names(markers_vec) <- markers$name
(var_cluster_PC12 <- fviz_pca_var(pca,
col.var = markers_vec,
axes = c(1,2),
select.var = list(contrib = 200),
palette = c(
"grey90",
"black"),
label = "none",
) +
theme_bw()
)
Which produces this plot:
This image doesn't quite do it justice, so here is a plot of the full data set that shows how bad the overlap is:
Probably the simplest method, given your particular colour scheme, is to make the arrows all black but use the alpha channel to make the gray ones gray. This means the black arrows will still be completely black even if other arrows are drawn over the top:
fviz_pca_var(pca,
axes = c(1,2),
select.var = list(contrib = 200),
alpha.var = ifelse(markers_vec == 0, 0.2, 1),
label = "none") +
theme_bw()

Arima model with Rolling Origin in R

I am working on a data set with 14 variables. I have used the Arima model with Rolling Origin but applying the rolling origin method on each variable every time is a bit slow and want to automate the process. I have tried to automate the process so that it gives me outputs for 14 models but it gives me an error. Please any help is appreciated.
Data:
structure(list(Date = structure(c(289094400, 297043200, 304992000,
312854400, 320716800, 328665600, 336614400, 344476800, 352252800,
360201600, 368150400, 376012800, 383788800, 391737600, 399686400,
407548800, 415324800, 423273600, 431222400, 439084800, 446947200,
454896000, 462844800, 470707200, 478483200, 486432000, 494380800,
502243200, 510019200, 517968000, 525916800, 533779200, 541555200,
549504000, 557452800, 565315200, 573177600, 581126400, 589075200,
596937600, 604713600, 612662400, 620611200, 628473600, 636249600,
644198400, 652147200, 660009600, 667785600, 675734400), tzone = "UTC", class = c("POSIXct",
"POSIXt")), NORTH = c(4.06976744186047, 5.51675977653633, 7.2799470549305,
4.75015422578655, 4.59363957597172, 3.15315315315317, 1.2008733624454,
-0.377562028047452, -0.108283703302655, 0.650406504065032, 0.969305331179318,
0.106666666666688, 3.09003729355352, 2.11886304909562, 2.32793522267207,
5.68743818001977, -1.46934955545156, 3.95611702127658, 5.19438987619354,
-0.0912012507600199, 2.81677896109541, 3.97412590369087, 1.30118326353028,
3.31553807249226, 1.32872294960955, 2.93700394923507, 0.908853875665812,
1.81241002546971, -1.3414545718222, 4.81772747317361, -3.4743890895067,
4.63823913990992, 0.857370960463727, 1.78620594713658, 0.527472527472524,
-4.05973562947765, -0.136726966764838, 3.16657890117607, 5.95161125667812,
8.01002055498458, 10.5501040737437, 13.4138468987035, 2.93371279497212,
8.84291046495554, -6.87764606265876, 2.90741287990725, 3.71548486856639,
1.23317430567388, -1.1153443739474, 4.31313207880924), YORKSANDTHEHUMBER = c(4.0121120363361,
5.45851528384282, 9.52380952380951, 6.04914933837431, 3.03030303030299,
5.42099192618225, 2.78993435448577, -0.53219797764768, 1.97966827180309,
1.15424973767052, 0.466804979253115, -1.96179659266907, 2.42232754081095,
0.719794344473031, -0.306278713629415, 3.37941628264209, 2.74393263992076,
3.91920555341303, 1.91585099967527, 0.892125625853447, 2.91888477848958,
3.78293078507868, 0.109815847271484, 6.83486625601216, 0.722691730511011,
3.56008625759656, -0.227160867754524, 2.69419041475355, -1.17134094520194,
2.78546324684064, 1.01487759630426, 1.54843356139717, 4.15602836879435,
4.43619773934357, -0.309698451507728, -1.45519947678222, -1.09839057574248,
9.08267346664877, 11.8913598474363, 13.9511229623114, 9.71243848306475,
7.66524473371739, 6.46801731884651, -2.26736490763654, -4.35729847494552,
-2.93870179974964, -7.72353426221536, -7.01127302722023, 2.02543627323513,
2.51245245873873), NORTHWEST = c(6.57894736842105, 6.95256660168939,
6.50060753341436, 5.5904164289789, 4.59211237169096, 4.70041322314051,
2.96003946719288, -1.38955438428365, 0.242954324586984, 2.18128938439167,
-0.853889943073994, -2.15311004784691, 0.929095354523226, 2.51937984496125,
0.189035916824195, 2.21698113207546, 2.51499769266268, 3.5066396578888,
1.77437592415414, 0.948636868643719, 4.60125296308836, 3.95775160859537,
-0.237455720347246, 4.218042765725, 2.79306600771276, 2.22545984338008,
0.709042970141798, 0.258269945161875, 0.663420142564747, 2.23655612423752,
1.69729803867784, 0.792339593378065, 2.82330902522246, 2.20899212700891,
1.48327338701976, -1.78151365931687, 1.8457608174996, 5.06380710500736,
7.57132625044768, 9.28561520321818, 9.51969943135663, 11.3671132539057,
10.5960954085668, -1.43026516363364, 3.55308627832826, 3.99351008518014,
-1.44138713566414, -0.165494414563527, 2.01304344107922, 1.70645628251555
), EASTMIDS = c(4.98489425981872, 8.20143884892085, 6.91489361702127,
5.22388059701494, 5.61465721040189, 4.64465584778958, 2.03208556149733,
0.314465408805028, 2.82131661442007, 0, 2.79471544715448, -0.939199209095414,
-1.14770459081835, 2.97829379101462, -0.68627450980392, 3.40572556762095,
3.42243436754175, 4.89223242719342, 0.730408764905171, 2.10107893242476,
2.31025926242835, 5.01798109893785, 0.382256908497274, 4.64894882982943,
3.04374194526571, 2.25491999264298, 0.651125980286367, 1.40105078809108,
2.87265165133409, 3.59418899472349, 1.76616504051596, 3.78627839708797,
3.9017974572556, 3.85473176612416, 0.0696479874633737, 1.45578980947134,
2.96698585107904, 12.8612275490659, 16.8142463597009, 10.6860102754148,
5.80782620275077, 2.65911542610573, -2.54295171544163, 4.66512121048756,
-3.66911045104132, -1.75382312052187, -3.61743042705271, -5.070772474025,
-1.21063610003222, 1.9530155970429), WESTMIDS = c(4.65838509316771,
4.74777448071216, 8.66855524079319, 6.56934306569344, 3.22896281800389,
3.17535545023698, 0.643086816720257, -1.36923779096303, 1.61962054604351,
2.00364298724953, -0.491071428571428, -2.78151637505608, 0, 2.39963082602676,
0.540784136998647, 1.83774092335275, 4.66989436619718, 1.82498633362771,
2.51909973157134, 0.644511581067457, 3.9503702221333, 3.15724626520867,
0.548671245147809, 4.19837410445824, 3.20983256145349, 1.12526319422872,
1.4028740144042, 0.434226470984247, -0.194389516372279, 2.32714328889485,
1.7360199527435, 3.3224734685978, 4.23339889482064, 5.79267379518974,
4.39964893406187, 0.374237288135615, 4.31199848701807, 13.9164443523531,
18.0050929925879, 6.07502745611839, 3.93976822755839, 4.07004176642259,
3.48434981192908, -1.92610381813166, 0.438451356717408, -0.103780578206083,
-3.0952145377791, -1.72381519612015, -2.02143896779759, 4.40768347678723
), EASTANGLIA = c(6.74525212835624, 8.58895705521476, 8.47457627118643,
10.7291666666667, 4.8447789275635, 4.84522207267835, -0.299529311082601,
1.45922746781116, 0.88832487309645, 0.29350104821803, -0.877926421404701,
1.64487557992411, -2.69709543568468, 3.49680170575694, 3.25504738360115,
2.39425379090184, 2.98519095869059, 4.36691137516082, 3.57868020304568,
1.66275772744776, 3.79450451070863, 4.52162951167727, 2.28203256419209,
4.17054552224914, 3.2439678284182, 4.76643873164257, 0.955633279171614,
2.91614381581101, 0.848198902642676, 5.02010671012167, 2.80551592962435,
5.64292321924145, 4.17550004608719, 9.7903026013095, 5.88709352460008,
3.07862089961185, 8.83080444493668, 14.1609281183215, 14.9330678829839,
-2.38242974223737, 1.8287757399192, 1.22633166874738, -5.71564382892894,
-5.25820956533587, -9.72515856236787, 0.957479010339489, -3.50481300299826,
-3.45549395738277, -0.828308094308001, -0.331408094033985), OUTERSEAST = c(6.7110371602884,
7.53638253638255, 9.47317544707589, 8.56512141280351, 3.82269215128102,
2.11515863689776, 1.64940544687381, -1.73584905660378, 1.34408602150539,
1.78097764304659, 0.446760982874161, -1.26019273535953, 0.150150150150159,
3.11094452773611, 1.4176663031625, 2.54480286738352, 5.56448794127927,
4.89371564797033, 3.88257575757575, 1.85961713764815, 5.54859495256845,
4.29879599796508, 2.00525702517411, 3.63679834232127, 3.44509381728699,
3.46664684309643, 1.93988743863012, 2.50440502760482, 2.96578121060713,
4.47634947134114, 4.50826657576274, 4.92742395824838, 5.38770910645244,
7.13653626341212, 6.15524925576032, 1.08283352245096, 6.66955322492704,
9.69075574665124, 11.4606033194907, 3.4233015677836, 1.10095233565968,
1.65461280649144, -3.58737650679069, -5.85546129756061, -4.98846560711691,
-2.32068359558401, -5.55914140928629, -4.66925504224286, -1.07093896112692,
2.07357059157311), OUTERMET = c(4.54545454545458, 6.58505698607005,
7.36633663366336, 7.08225746956843, 4.3747847054771, 1.68316831683168,
1.00616682895164, -1.28534704370181, 2.01822916666665, 0.797702616464613,
0.949667616334271, -0.940733772342415, 1.10794555238999, 2.19160926737633,
2.84926470588237, 2.62138814417631, 5.02467343976781, 5.65213786241397,
3.22555328833776, 3.73552294786995, 5.05948745510956, 4.28797321179426,
2.86300392436674, 2.60339894216597, 4.28031183318191, 3.43199821714381,
3.34554286721641, 3.04770569170409, 1.65167650683293, 4.62120252591965,
6.34025700005186, 6.1931790459772, 8.10781836281492, 6.14401677315165,
5.88313802952244, 0.112183931227468, 4.21036727396348, 5.85740693754756,
8.61496319123439, 2.24246818616477, 2.39678510128783, 1.57885756155336,
-2.68472955079939, -5.09925369345585, -6.23990242127901, -2.51851513733724,
-2.72874133732908, -5.45172276846427, 0.20833593462305, 2.61721355963614
), LONDON = c(8.11719500480309, 10.3065304309196, 6.32299637535239,
7.65151515151515, 1.30190007037299, 2.1535255296978, -0.204012240734436,
-0.306643952299836, 0.786056049213951, 1.18684299762631, 1.00536193029493,
-2.85335102853352, 2.76639344262296, 2.06048521103356, 1.23738196027352,
2.70183338694115, 3.30410272471031, 5.76322570865546, 4.73255747291176,
1.98428989791171, 6.03563952552197, 4.88977753030802, 2.12581135535556,
4.43247330120026, 5.42986425339366, 3.96781115879828, 3.43247538648888,
4.0668901660281, 4.09587727708534, 4.81707991010573, 7.42869193863026,
6.70069362648866, 6.67699006500675, 7.43184006668679, 5.53177257525084,
-1.06737656081638, 1.7605678920595, 5.86902048679756, 6.75919979067056,
0.943616938313976, 1.29679498499027, 1.95787891003782, -1.64030775806797,
-2.62806236080178, -2.6208912592328, -4.49717565910836, -5.18403877531433,
-5.57502752084625, -0.947552316580683, 0.978175016770521), SOUTHWEST = c(6.17577197149644,
7.71812080536912, 7.63239875389407, 9.45489628557649, 2.46804759806079,
2.19354838709679, 1.72558922558922, 0.248241621845247, 1.48576145274456,
2.03334688897925, -0.677560781187733, -2.3274478330658, 1.80772391125718,
2.42130750605327, 1.85185185185186, 0.928433268858785, 5.95247221157533,
4.38447346525341, 3.30272049904696, 2.25107353730542, 3.86823714688802,
2.04371722787289, 3.04596811639065, 4.19057346270538, 2.45646407565451,
2.17525889239081, 2.83400809716597, 1.58015962290428, 2.77894958869438,
4.08650146221331, 4.40418977202712, 2.87285774987016, 3.86424654076504,
5.69560126372535, 5.04170063334797, 1.07854257457266, 6.75066443547593,
13.56963706108, 16.2190250397843, 2.62121000419169, -0.940827274460141,
2.85066318466084, -0.886020125887025, -6.46387832699618, -3.51150320013839,
-0.306262698697259, 0.555963495227118, -7.19650681052728, -1.76899526612503,
0.528003461834023), WALES = c(6.09418282548476, 8.35509138381203,
7.40963855421687, 7.01065619742007, 1.15303983228513, 3.47150259067357,
-0.150225338007013, 0.852557673019058, 0.944803580308295, -1.13300492610835,
0.946686596910786, -2.17176702862782, 3.98587285570131, 0.485201358563789,
3.62143891839691, 1.63094128611373, 1.61852361302152, 4.32251951450617,
1.28887158859911, 0.68747598104105, 3.71925360474978, 4.66941979801284,
1.44927536231884, 1.05121293800539, 1.67663757954501, 2.9419480568152,
-0.422309596621509, 2.67987715706347, 0.0249243368346056, 2.03260714794249,
1.14433241461116, 3.01472870890965, 0.7768290641219, 3.81433365451707,
-0.140822531605095, -2.99349379827568, 4.11669475005782, 4.95668454288706,
12.973544973545, 15.3990258523792, 9.25324675324674, 6.63977924007642,
0.236872486962066, -0.381277677383487, 0.681750224259938, -2.67091690260756,
-5.39078074779283, -3.51337404317537, 0.996191624080064, 2.8524564276044
), SCOTLAND = c(5.15222482435597, 4.12026726057908, 5.40106951871658,
8.67579908675796, -0.280112044817908, 2.94943820224719, 1.04592996816735,
1.21512151215122, 1.33392618941751, 3.59806932865292, 0.974163490046604,
0.125838926174496, 1.46627565982404, 3.42691990090835, -0.838323353293421,
1.97262479871176, 3.40702724042636, 4.30649410147751, 2.44866586142527,
1.93997856377279, 2.09581887638873, 4.22573890357352, 0.833278440155458,
4.15155969296095, 2.01655899140689, 1.93980755633434, 0.325693606755129,
0.796561260069754, -0.381713535919834, 2.90974405029185, 0.802862378916138,
0.473263498109834, 1.33268231036562, 0.742609336470062, 0.427651014264418,
-2.00028015128168, -2.46419484863213, 3.18590814502184, 4.33732886439812,
3.78406337625565, 4.59302783096821, 9.65541455585091, 7.16082700576343,
2.74890619997868, -6.81926759861247, 3.2880071333036, 2.69558648969462,
-2.78454942837929, 1.79123210602768, 2.88825864878425), NIRELAND = c(4.54545454545454,
4.94752623688156, 4.42857142857145, 2.96397628818967, 6.06731620903454,
0.0835073068893502, -1.66875260742594, -2.96987696224015, -1.18058592041975,
-0.884955752212393, -1.74107142857143, -0.545206724216265, 1.96436729100047,
-0.224014336917564, -1.84104176021554, 1.6010978956999, 1.42278253039172,
1.97993429814437, 1.29287828660979, 1.61158623060724, 2.28387751649466,
1.84005954349984, 1.79057208981284, 2.22177901874749, 2.88757950598978,
-0.731975575530031, 3.07939176281808, -0.0593031875463392, -1.05696484201158,
3.40717418194087, 1.07655502392344, -1.70701093778018, -2.34959319931409,
6.56454324677751, -1.80912979454455, -4.90966221523961, 0.319176899102556,
1.67315466387184, -2.88259765121672, 2.95678544351781, -0.54123711340205,
4.15355569540591, -1.90510040874357, 0.923946519801462, 4.1035398865513,
-2.3519674449081, -5.50238389546177, 7.24670179766041, 2.75090864790844,
0.446509889559553), UK = c(5.76890543055322, 7.20302836425676,
7.39543442582184, 7.22885986848197, 3.23472252213347, 2.95766398929048,
1.20271423347285, -0.554061107319231, 0.98913965036942, 1.55113136643479,
0.373986300291293, -1.61195434757029, 1.59052858167903, 2.07573082205217,
1.17628969016684, 2.44680851063832, 2.84453345201007, 4.10010457610617,
2.88208396840793, 1.58922558922557, 3.67559326527908, 3.90013106997858,
1.36611181194425, 4.12505691303686, 2.02017257462689, 2.93167985827357,
1.54068234183715, 2.12149379408387, 0.594313861969269, 3.83755588673622,
3.33948434056075, 3.50933756603259, 3.25378570059421, 5.14920870654849,
3.36548010504709, -0.177206541696886, 1.65971553844507, 8.51865098567251,
11.0759984490113, 5.32351247098249, 3.99880682100659, 4.55095927082668,
0.864171188197283, -2.04898834977862, -3.10383660120637, -1.01415357182659,
-2.94496091613858, -4.06343734981687, -0.677156948752485, 1.59717017296902
)), row.names = c(NA, -50L), class = c("tbl_df", "tbl", "data.frame"
))
This manual code works:
y <- data2$NORTH
ourCall <- "predict(arima(x=data,order=c(1,0,0)),n.ahead=h)"
ourValue <- c("pred")
returnedValues1 <- ro(y, h=4, origins = 8,
call=ourCall, value=ourValue)
returnedValues1$actuals
returnedValues1$holdout
returnedValues1$pred
But this doesn't:
y <- data2
y %<>% dplyr::select(-Date)
ourCall <- "predict(arima(x=data,order=c(1,0,0)),n.ahead=h)"
ourValue <- c("pred")
ar_ro_model_4 = apply(y,2,function(x){
return(
list(
returnedValues1 <- ro(y, h=4, origins = 8,
call=ourCall, value=ourValue)
))
} )
ar_ro_model_4

GSVA function to calculate ssGSEA score

I'm trying to run an R code for calculating the ssGSEA score between a gene expression dataset and a gene list.
The function I'm trying to run is:
GSVAtumor_UCS_Epi<-gsva(file, EM_gene_signature_tumor_KS_Epi_list, method=c("gsva", "ssgsea", "zscore", "plage"))
I'm facing the same error and two warning messages every time I run the code and there is not much information available for it over the internet for the same:
Error in relist(v, part) :
shape of 'skeleton' is not compatible with 'NROW(flesh)'
In addition: Warning messages:
1: In .filterFeatures(expr, method) :
6171 genes with constant expression values throuhgout the samples.
2: In .filterFeatures(expr, method) :
Since argument method!="ssgsea", genes with constant expression values are discarded.
Here EM_gene_signature_tumor_KS_Epi_list is
list(structure(list(...1 = c("KRT19", "AGR2", "RAB25", "CDH1",
"ERBB3", "FXYD3", "SLC44A4", "S100P", "SCNN1A", "GALNT3", "PRSS8",
"ELF3", "CEACAM6", "TMPRSS4", "CLDN7", "TACSTD2", "CLDN3", "EPCAM",
"SPINT1", "TSPAN1", "PLS1", "TMEM30B", "PRR15L", "KRT8", "ST14",
NA, "RBM47", "S100A14", "C1orf106", "NQO1", "TOX3", "PTK6", "TFF1",
"CLDN4", "GPRC5A", "TJP3", "KRT18", "MAP7", "CKMT1A", "ESRP1",
"MUC1", "SPINT2", "ESRP2", "CDS1", "PPAP2C", "CEACAM7", "TTC39A",
"OVOL2", "EHF", "AP1M2", "CEACAM5", "LAD1", "ARHGAP8", "TFF3",
"JUP", "CD24", "TMC5", "MLPH", "ELMO3", "ERBB2", "LLGL2", "DDR1",
"FA2H", "CBLC", "TMPRSS2", "LSR", "PERP", "POF1B", "MYO5C", "RAB11FIP1",
"MAPK13", "KRT7", "CEACAM1", "CXADR", "ATP2C2", "RNF128", "MPZL2",
"EPS8L1", "GALNT7", "CORO2A", "BCAS1", "TPD52", "ARHGAP32", "FUT2",
"OR7E14P", "GALE", "GRHL2", "BIK", "RAPGEFL1", "STYK1", "F11R",
"PKP3", "CYB561", "SH3YL1", "GDF15", "PSCA", "EZR", "TJP2", "FGFR3",
"FUT3", "BSPRY", "TOM1L1", "IRF6", "EPB41L4B", "OCLN", "LRRC1",
"C19orf21", "ABHD11", "EPS8L2", "MYO6", "TSPAN8", "MST1R", "SLC16A5",
"GPR56", "AZGP1", "TOB1", "SLC35A3", "TRPM4", "PHLDA2", "VAMP8",
"SLC22A18", "AKR1B10", "VAV3", "SPAG1", "ABCC3", "SYNGR2", "STAP2",
"C4orf19", "PPL", "PLLP", "DSG2", "HDHD3", "CD2AP", "MANSC1",
"DHCR24", "EPN3", "TUFT1", "GMDS", "EXPH5", "DSP", "SDC4", "IL20RA",
"FAM174B", "PTPRF", "SORD")), row.names = c(NA, -145L), class = c("tbl_df",
"tbl", "data.frame")))
And file is
new("ExpressionSet", experimentData = new("MIAME", name = "",
lab = "", contact = "", title = "", abstract = "", url = "",
pubMedIds = "", samples = list(), hybridizations = list(),
normControls = list(), preprocessing = list(), other = list(),
.__classVersion__ = new("Versions", .Data = list(c(1L, 0L,
0L), c(1L, 1L, 0L)))), assayData = <environment>, phenoData = new("AnnotatedDataFrame",
varMetadata = structure(list(labelDescription = "state"), row.names = "state", class = "data.frame"),
data = structure(list(state = c("TCGA-N6-A4V9-01A", "TCGA-QM-A5NM-01A",
"TCGA-N8-A4PM-01A", "TCGA-NG-A4VU-01A", "TCGA-NG-A4VW-01A",
"TCGA-N8-A4PN-01A", "TCGA-N5-A4RA-01A", "TCGA-N6-A4VD-01A",
"TCGA-N7-A4Y8-01A", "TCGA-N6-A4VE-01A", "TCGA-N5-A59F-01A",
"TCGA-N9-A4PZ-01A", "TCGA-N6-A4VF-01A", "TCGA-NF-A5CP-01A",
"TCGA-N6-A4VC-01A", "TCGA-N5-A4RF-01A", "TCGA-N8-A4PL-01A",
"TCGA-ND-A4WA-01A", "TCGA-N5-A4RU-01A", "TCGA-N9-A4Q3-01A",
"TCGA-NA-A4R1-01A", "TCGA-N7-A4Y5-01A", "TCGA-N5-A4RV-01A",
"TCGA-QN-A5NN-01A", "TCGA-N9-A4Q1-01A", "TCGA-N5-A59E-01A",
"TCGA-NA-A4QW-01A", "TCGA-N5-A4RM-01A", "TCGA-NF-A4X2-01A",
"TCGA-N5-A4RN-01A", "TCGA-N5-A4RS-01A", "TCGA-N8-A4PQ-01A",
"TCGA-N9-A4Q4-01A", "TCGA-NA-A4QY-01A", "TCGA-N5-A4RJ-01A",
"TCGA-N5-A4RD-01A", "TCGA-NA-A5I1-01A", "TCGA-NA-A4R0-01A",
"TCGA-NA-A4QV-01A", "TCGA-N7-A4Y0-01A", "TCGA-N5-A4R8-01A",
"TCGA-NF-A4WU-01A", "TCGA-N6-A4VG-01A", "TCGA-N8-A4PI-01A",
"TCGA-N8-A4PO-01A", "TCGA-N8-A4PP-01A", "TCGA-ND-A4WF-01A",
"TCGA-NA-A4QX-01A", "TCGA-N9-A4Q7-01A", "TCGA-N5-A4RO-01A",
"TCGA-N5-A4RT-01A", "TCGA-NF-A4WX-01A", "TCGA-N7-A59B-01A",
"TCGA-ND-A4W6-01A", "TCGA-N8-A56S-01A", "TCGA-ND-A4WC-01A"
)), row.names = c("TCGA-N6-A4V9-01A", "TCGA-QM-A5NM-01A",
"TCGA-N8-A4PM-01A", "TCGA-NG-A4VU-01A", "TCGA-NG-A4VW-01A",
"TCGA-N8-A4PN-01A", "TCGA-N5-A4RA-01A", "TCGA-N6-A4VD-01A",
"TCGA-N7-A4Y8-01A", "TCGA-N6-A4VE-01A", "TCGA-N5-A59F-01A",
"TCGA-N9-A4PZ-01A", "TCGA-N6-A4VF-01A", "TCGA-NF-A5CP-01A",
"TCGA-N6-A4VC-01A", "TCGA-N5-A4RF-01A", "TCGA-N8-A4PL-01A",
"TCGA-ND-A4WA-01A", "TCGA-N5-A4RU-01A", "TCGA-N9-A4Q3-01A",
"TCGA-NA-A4R1-01A", "TCGA-N7-A4Y5-01A", "TCGA-N5-A4RV-01A",
"TCGA-QN-A5NN-01A", "TCGA-N9-A4Q1-01A", "TCGA-N5-A59E-01A",
"TCGA-NA-A4QW-01A", "TCGA-N5-A4RM-01A", "TCGA-NF-A4X2-01A",
"TCGA-N5-A4RN-01A", "TCGA-N5-A4RS-01A", "TCGA-N8-A4PQ-01A",
"TCGA-N9-A4Q4-01A", "TCGA-NA-A4QY-01A", "TCGA-N5-A4RJ-01A",
"TCGA-N5-A4RD-01A", "TCGA-NA-A5I1-01A", "TCGA-NA-A4R0-01A",
"TCGA-NA-A4QV-01A", "TCGA-N7-A4Y0-01A", "TCGA-N5-A4R8-01A",
"TCGA-NF-A4WU-01A", "TCGA-N6-A4VG-01A", "TCGA-N8-A4PI-01A",
"TCGA-N8-A4PO-01A", "TCGA-N8-A4PP-01A", "TCGA-ND-A4WF-01A",
"TCGA-NA-A4QX-01A", "TCGA-N9-A4Q7-01A", "TCGA-N5-A4RO-01A",
"TCGA-N5-A4RT-01A", "TCGA-NF-A4WX-01A", "TCGA-N7-A59B-01A",
"TCGA-ND-A4W6-01A", "TCGA-N8-A56S-01A", "TCGA-ND-A4WC-01A"
), class = "data.frame"), dimLabels = c("sampleNames", "sampleColumns"
), .__classVersion__ = new("Versions", .Data = list(c(1L,
1L, 0L)))), featureData = new("AnnotatedDataFrame", varMetadata = structure(list(
labelDescription = character(0)), row.names = character(0), class = "data.frame"),
data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("5_8S_rRNA",
"5S_rRNA", "7SK", "A1BG", "A1BG-AS1", "A1CF", "A2M", "A2M-AS1",
"A2ML1", "A2ML1-AS1", "A2ML1-AS2", "A2MP1", "A3GALT2", "A4GALT",
"A4GNT", "AA06", "AAAS", "AACS", "AACSP1", "AADAC", "AADACL2",
"AADACL2-AS1", "AADACL3", "AADACL4", "AADACP1", "AADAT",
"AAED1", "AAGAB", "AAK1", "AAMDC", "AAMP", "AANAT", "AAR2",
"AARD", "AARS", "AARS2", "AARSD1", "AARSP1", "AASDH", "AASDHPPT",
"AASS", "AATBC", "AATF", "AATK", "AATK-AS1", "AB015752.3",
"AB019438.66", "AB019440.50", "AB019441.29", "ABALON", "ABAT",
"ABBA01017803.1", "ABC12-47043100G14.2", "ABC12-47964100C23.1",
"ABC12-49244600F4.4", "ABC14-1080714F14.1", "ABC7-42391500H16.2",
"ABC7-42418200C9.1", "ABC7-43041300I9.1", "ABC7-481722F1.1",
"ABCA1", "ABCA10", "ABCA11P", "ABCA12", "ABCA13", "ABCA17P",
"ABCA2", "ABCA3", "ABCA4", "ABCA5", "ABCA6", "ABCA7", "ABCA8",
"ABCA9", "ABCA9-AS1", "ABCB1", "ABCB10", "ABCB10P1", "ABCB10P3",
"ABCB10P4", "ABCB11", "ABCB4", "ABCB5", "ABCB6", "ABCB7",
"ABCB8", "ABCB9", "ABCC1", "ABCC10", "ABCC11", "ABCC12",
"ABCC13", "ABCC2", "ABCC3", "ABCC4", "ABCC5", "ABCC5-AS1",
"ABCC6", "ABCC6P1", "ABCC6P2", "ABCC8", "ABCC9", "ABCD1",
"ABCD1P2", "ABCD1P3", "ABCD1P4", "ABCD1P5", "ABCD2", "ABCD3",
"ABCD4", "ABCE1", "ABCF1", "ABCF2", "ABCF2P1", "ABCF2P2",
"ABCF3", "ABCG1", "ABCG2", "ABCG4", "ABCG5", "ABCG8", "ABHD1",
"ABHD10", "ABHD11", "ABHD11-AS1", "ABHD12", "ABHD12B", "ABHD13",
"ABHD14A", "ABHD14A-ACY1", "ABHD14B", "ABHD15", "ABHD15-AS1",
"ABHD16A", "ABHD16B", "ABHD17A", "ABHD17AP1", "ABHD17AP3",
"ABHD17AP4", "ABHD17AP6", "ABHD17AP9", "ABHD17B", "ABHD17C",
"ABHD2", "ABHD3", "ABHD4", "ABHD5", "ABHD6", "ABHD8", "ABI1",
"ABI2", "ABI3", "ABI3BP", "ABL1", "ABL2", "ABLIM1", "ABLIM2",
"ABLIM3", "ABO", "ABR", "ABRA", "ABRACL", "ABT1", "ABT1P1",
"ABTB1", "ABTB2", "AC000003.1", "AC000029.1", "AC000032.2",
"AC000036.4", "AC000041.10", "AC000041.8", "AC000067.1",
"AC000068.10", "AC000068.5", "AC000068.9", "AC000077.2",
"AC000078.5", "AC000081.2", "AC000089.3", "AC000095.11",
"AC000095.9", "AC000099.1", "AC000110.1", "AC000111.3", "AC000111.4",
"AC000111.5", "AC000111.6", "AC000120.7", "AC000123.2", "AC000123.3",
"AC000123.4", "AC000124.1", "AC000354.1", "AC000362.1", "AC000367.1",
"AC000370.2", "AC000374.1", "AC000403.1", "AC000403.4", "AC001226.7",
"AC002044.1", "AC002044.3", "AC002044.4", "AC002056.3", "AC002056.5",
"AC002059.10", "AC002064.4", "AC002064.5", "AC002064.7",
"AC002066.1", "AC002069.5", "AC002069.6", "AC002070.1", "AC002072.1",
"AC002075.3", "AC002075.4", "AC002076.10", "AC002115.5",
"AC002115.9", "AC002116.7", "AC002116.8", "AC002117.1", "AC002127.2",
"AC002127.4", "AC002128.5", "AC002306.1", "AC002310.10",
"AC002310.12", "AC002310.13", "AC002310.14", "AC002310.17",
"AC002310.7", "AC002314.4", "AC002331.1", "AC002365.5", "AC002366.1",
"AC002366.3", "AC002368.4", "AC002383.2", "AC002386.1", "AC002389.1",
"AC002395.1", "AC002398.11", "AC002398.12", "AC002398.13",
"AC002398.9", "AC002400.1", "AC002401.1", "AC002407.1", "AC002429.1",
"AC002429.4", "AC002429.5", "AC002451.3", "AC002454.1", "AC002456.2",
"AC002463.3", "AC002464.1", "AC002465.2", "AC002467.7", "AC002472.11",
"AC002480.2", "AC002480.3", "AC002480.4", "AC002480.5", "AC002486.2",
"AC002486.3", "AC002511.2", "AC002511.3", "AC002519.6", "AC002519.8",
"AC002523.1", "AC002530.1", "AC002539.1", "AC002539.2", "AC002542.2",
"AC002543.2", "AC002550.5", "AC002550.6", "AC002551.1", "AC002553.4",
"AC002558.1", "AC002978.1", "AC002979.1", "AC002981.1", "AC002984.2",
"AC002985.3", "AC003001.1", "AC003002.4", "AC003002.6", "AC003003.5",
"AC003005.2", "AC003005.4", "AC003006.1", "AC003006.7", "AC003009.1",
"AC003045.1", "AC003075.4", "AC003080.4", "AC003084.2", "AC003088.1",
"AC003090.1", "AC003092.1", "AC003092.2", "AC003101.1", "AC003104.1",
"AC003658.1", "AC003664.1", "AC003666.1", "AC003681.1", "AC003682.16",
"AC003682.17", "AC003688.1", "AC003956.1", "AC003958.2",
"AC003958.6", "AC003968.1", "AC003973.1", "AC003973.3", "AC003973.4",
"AC003973.5", "AC003984.1", "AC003985.1", "AC003986.5", "AC003986.6",
"AC003986.7", "AC003988.1", "AC003989.3", "AC003989.4", "AC003991.3",
"AC004000.1", "AC004000.2", "AC004004.2", "AC004006.2", "AC004009.1",
"AC004009.2", "AC004009.3", "AC004012.1", "AC004014.3", "AC004014.4",
"AC004016.1", "AC004019.10", "AC004019.13", "AC004022.7",
"AC004022.8", "AC004041.2", "AC004051.2", "AC004052.1", "AC004053.1",
"AC004053.2", "AC004054.1", "AC004057.1", "AC004062.2", "AC004063.1",
"AC004066.2", "AC004066.3", "AC004067.5", "AC004069.1", "AC004069.2",
"AC004070.1", "AC004074.4", "AC004076.5", "AC004076.7", "AC004076.9",
"AC004079.1", "AC004108.1", "AC004112.4", "AC004112.5", "AC004112.7",
"AC004125.3", "AC004129.7", "AC004129.9", "AC004156.3", "AC004158.1",
"AC004158.3", "AC004159.1", "AC004160.4", "AC004166.6", "AC004221.2",
"AC004231.2", "AC004237.1", "AC004257.1", "AC004381.6", "AC004381.7",
"AC004383.3", "AC004386.3", "AC004386.4", "AC004447.2", "AC004448.2",
"AC004448.5", "AC004449.6", "AC004453.1", "AC004453.8", "AC004458.1",
"AC004460.1", "AC004461.4", "AC004470.1", "AC004471.10",
"AC004471.9", "AC004477.1", "AC004485.3", "AC004490.1", "AC004492.1",
"AC004510.3", "AC004520.1", "AC004535.2", "AC004538.3", "AC004540.4",
"AC004540.5", "AC004541.1", "AC004543.1", "AC004543.2", "AC004549.6",
"AC004552.1", "AC004593.3", "AC004595.1", "AC004603.4", "AC004623.2",
"AC004623.3", "AC004637.1", "AC004655.1", "AC004656.1", "AC004673.1",
"AC004687.1", "AC004691.1", "AC004691.5", "AC004692.4", "AC004692.5",
"AC004699.1", "AC004702.2", "AC004744.3", "AC004745.1", "AC004754.3",
"AC004769.1", "AC004775.5", "AC004791.2", "AC004812.1", "AC004813.1",
"AC004816.1", "AC004819.1", "AC004824.1", "AC004824.2", "AC004832.1",
"AC004837.1", "AC004837.3", "AC004837.4", "AC004837.5", "AC004840.8",
"AC004846.1", "AC004850.1", "AC004854.4", "AC004854.5", "AC004862.6",
"AC004866.1", "AC004866.3", "AC004869.2", "AC004869.3", "AC004870.3",
"AC004870.4", "AC004870.5", "AC004875.1", "AC004878.2", "AC004878.8",
"AC004893.10", "AC004893.11", "AC004895.1", "AC004895.4",
"AC004899.3", "AC004901.1", "AC004906.3", "AC004911.2", "AC004915.1",
"AC004920.2", "AC004920.3", "AC004924.1", "AC004932.1", "AC004938.5",
"AC004941.3", "AC004941.5", "AC004943.1", "AC004945.1", "AC004946.1",
"AC004947.2", "AC004951.5", "AC004951.6", "AC004953.1", "AC004967.7",
"AC004969.1", "AC004980.1", "AC004980.10", "AC004980.11",
"AC004980.7", "AC004980.8", "AC004980.9", "AC004984.1", "AC004985.12",
"AC004987.10", "AC004987.9", "AC004988.1", "AC005000.1",
"AC005007.3", "AC005008.2", "AC005008.3", "AC005009.1", "AC005009.2",
"AC005013.5", "AC005014.5", "AC005017.2", "AC005019.2", "AC005019.3",
"AC005020.1", "AC005024.1", "AC005027.3", "AC005033.6", "AC005034.2",
"AC005037.1", "AC005037.3", "AC005037.4", "AC005037.6", "AC005040.3",
"AC005041.11", "AC005042.1", "AC005042.2", "AC005042.3",
"AC005042.4", "AC005042.5", "AC005048.1", "AC005052.1", "AC005062.2",
"AC005071.1", "AC005071.2", "AC005071.3", "AC005071.4", "AC005076.5",
"AC005077.12", "AC005077.14", "AC005077.5", "AC005077.7",
"AC005077.8", "AC005077.9", "AC005082.1", "AC005082.12",
"AC005083.1", "AC005086.1", "AC005086.2", "AC005086.3", "AC005088.1",
"AC005094.2", "AC005102.1", "AC005104.3", "AC005105.2", "AC005150.1",
"AC005150.2", "AC005150.3", "AC005152.3", "AC005154.6", "AC005154.7",
"AC005154.8", "AC005158.1", "AC005159.1", "AC005160.3", "AC005162.4",
"AC005162.5", "AC005176.1", "AC005176.2", "AC005176.3", "AC005178.1",
"AC005187.1", "AC005189.6", "AC005197.2", "AC005204.1", "AC005215.1",
"AC005220.3", "AC005224.2", "AC005227.1", "AC005229.1", "AC005229.5",
"AC005229.7", "AC005235.1", "AC005237.2", "AC005237.4", "AC005251.3",
"AC005253.2", "AC005253.4", "AC005255.3", "AC005255.5", "AC005255.6",
"AC005256.1", "AC005262.2", "AC005262.3", "AC005262.4", "AC005264.2",
"AC005276.1", "AC005281.1", "AC005281.2", "AC005284.1", "AC005284.2",
"AC005288.1", "AC005300.5", "AC005301.8", "AC005304.1", "AC005306.3",
"AC005307.1", "AC005307.3", "AC005324.6", "AC005324.7", "AC005329.7",
"AC005330.2", "AC005336.4", "AC005336.5", "AC005339.1", "AC005339.2",
"AC005351.1", "AC005355.1", "AC005355.2", "AC005355.3", "AC005357.1",
"AC005358.3", "AC005363.11", "AC005363.9", "AC005371.1",
"AC005375.1", "AC005387.2", "AC005387.3", "AC005391.2", "AC005392.13",
"AC005394.1", "AC005412.1", "AC005477.1", "AC005480.1", "AC005481.5",
"AC005487.2", "AC005488.11", "AC005498.1", "AC005498.3",
"AC005498.4", "AC005510.3", "AC005513.1", "AC005514.2", "AC005517.3",
"AC005518.2", "AC005519.4", "AC005522.6", "AC005522.7", "AC005523.2",
"AC005523.3", "AC005532.5", "AC005534.6", "AC005534.8", "AC005537.2",
"AC005538.1", "AC005538.3", "AC005538.5", "AC005539.2", "AC005540.1",
"AC005540.3", "AC005546.2", "AC005549.1", "AC005549.2", "AC005550.3",
"AC005550.5", "AC005559.3", "AC005562.1", "AC005562.2", "AC005578.3",
"AC005588.2", "AC005592.1", "AC005592.2", "AC005592.3", "AC005593.2",
"AC005597.1", "AC005599.1", "AC005606.14", "AC005606.15",
"AC005609.16", "AC005609.17", "AC005609.18", "AC005609.19",
"AC005609.2", "AC005609.20", "AC005614.3", "AC005614.5",
"AC005616.1", "AC005616.2", "AC005618.6", "AC005618.8", "AC005618.9",
"AC005621.1", "AC005624.2", "AC005625.1", "AC005626.3", "AC005631.1",
"AC005668.1", "AC005682.5", "AC005682.6", "AC005682.7", "AC005686.1",
"AC005701.1", "AC005702.1", "AC005702.2", "AC005702.3", "AC005702.4",
"AC005703.2", "AC005703.3", "AC005722.4", "AC005725.1", "AC005730.2",
"AC005740.3", "AC005740.4", "AC005740.5", "AC005740.6", "AC005741.2",
"AC005752.10", "AC005753.1", "AC005754.7", "AC005754.8",
"AC005757.6", "AC005757.7", "AC005758.1", "AC005772.2", "AC005775.2",
"AC005776.1", "AC005777.3", "AC005779.2", "AC005780.1", "AC005783.1",
"AC005785.2", "AC005785.5", "AC005786.3", "AC005786.5", "AC005786.6",
"AC005786.7", "AC005789.9", "AC005794.1", "AC005795.1", "AC005796.2",
"AC005808.3", "AC005822.1", "AC005828.1", "AC005838.2", "AC005863.1",
"AC005863.2", "AC005884.1", "AC005901.1", "AC005915.1", "AC005926.1",
"AC005932.1", "AC005943.6", "AC005944.2", "AC005954.3", "AC005954.4",
"AC006000.5", "AC006003.3", "AC006004.1", "AC006007.1", "AC006011.4",
"AC006014.7", "AC006014.8", "AC006019.1", "AC006019.3", "AC006019.4",
"AC006022.4", "AC006026.1", "AC006026.10", "AC006026.12",
"AC006026.13", "AC006026.9", "AC006028.11", "AC006033.22",
"AC006037.2", "AC006041.1", "AC006042.6", "AC006042.7", "AC006042.8",
"AC006050.2", "AC006070.12", "AC006076.1", "AC006077.3",
"AC006077.4", "AC006088.1", "AC006115.1", "AC006115.6", "AC006116.1",
"AC006116.12", "AC006116.13", "AC006116.14", "AC006116.15",
"AC006116.17", "AC006116.19", "AC006116.20", "AC006116.21",
"AC006116.22", "AC006116.24", "AC006116.27", "AC006126.3",
"AC006126.4", "AC006128.2", "AC006129.1", "AC006129.2", "AC006129.3",
"AC006130.1", "AC006130.3", "AC006130.4", "AC006133.3", "AC006133.7",
"AC006145.1", "AC006145.4", "AC006150.1", "AC006150.2", "AC006153.3",
"AC006156.2", "AC006159.4", "AC006159.5", "AC006160.5", "AC006195.2",
"AC006196.1", "AC006227.1", "AC006262.10", "AC006262.11",
"AC006262.4", "AC006262.5", "AC006272.1", "AC006272.2", "AC006273.4",
"AC006273.5", "AC006277.2", "AC006277.3", "AC006288.1", "AC006296.1",
"AC006296.2", "AC006322.1", "AC006326.3", "AC006326.5", "AC006328.1",
"AC006328.2", "AC006328.3", "AC006328.4", "AC006328.9", "AC006335.10",
"AC006335.11", "AC006335.2", "AC006335.6", "AC006355.3",
"AC006366.3", "AC006369.2", "AC006369.3", "AC006371.1", "AC006372.4",
"AC006372.5", "AC006372.6", "AC006373.1", "AC006377.1", "AC006378.2",
"AC006380.1", "AC006380.3", "AC006386.1", "AC006390.4", "AC006427.2",
"AC006445.1", "AC006445.6", "AC006445.7", "AC006449.2", "AC006452.1",
"AC006452.2", "AC006458.3", "AC006460.2", "AC006461.1", "AC006461.2",
"AC006466.5", "AC006478.1", "AC006480.1", "AC006482.1", "AC006483.1",
"AC006483.5", "AC006486.10", "AC006486.9", "AC006487.1",
"AC006499.1", "AC006499.2", "AC006499.3", "AC006499.4", "AC006499.5",
"AC006499.6", "AC006499.7", "AC006499.9", "AC006509.4", "AC006509.7",
"AC006534.1", "AC006534.2", "AC006534.3", "AC006538.1", "AC006538.4",
"AC006538.8", "AC006539.1", "AC006539.2", "AC006539.3", "AC006539.6",
"AC006547.13", "AC006547.14", "AC006547.15", "AC006547.8",
"AC006548.19", "AC006548.26", "AC006548.28", "AC006552.1",
"AC006557.1", "AC006840.1", "AC006925.1", "AC006926.1", "AC006942.4",
"AC006946.12", "AC006946.15", "AC006946.16", "AC006946.17",
"AC006947.1", "AC006960.5", "AC006960.7", "AC006978.6", "AC006987.4",
"AC006987.5", "AC006987.6", "AC006987.7", "AC006988.1", "AC006989.2",
"AC006994.1", "AC006994.2", "AC006994.3", "AC006995.8", "AC007000.10",
"AC007000.11", "AC007000.12", "AC007003.1", "AC007006.1",
"AC007009.1", "AC007009.2", "AC007016.3", "AC007036.4", "AC007036.5",
"AC007036.6", "AC007038.7", "AC007040.1", "AC007040.11",
"AC007040.2", "AC007040.3", "AC007040.6", "AC007040.8", "AC007041.1",
"AC007041.2", "AC007050.1", "AC007050.17", "AC007050.18",
"AC007056.1", "AC007064.22", "AC007064.24", "AC007064.25",
"AC007078.4", "AC007091.1", "AC007096.1", "AC007098.1", "AC007099.1",
"AC007099.2", "AC007106.1", "AC007115.3", "AC007126.1", "AC007128.1",
"AC007131.1", "AC007131.2", "AC007131.3", "AC007136.1", "AC007161.5",
"AC007163.1", "AC007163.10", "AC007163.11", "AC007163.2",
"AC007163.3", "AC007163.6", "AC007163.8", "AC007163.9", "AC007179.1",
"AC007179.2", "AC007182.6", "AC007191.4", "AC007192.6", "AC007193.10",
"AC007193.6", "AC007193.8", "AC007193.9", "AC007204.2", "AC007204.3",
"AC007216.1", "AC007224.1", "AC007228.11", "AC007228.5",
"AC007228.8", "AC007228.9", "AC007229.3", "AC007237.2", "AC007238.1",
"AC007241.1", "AC007242.1")), dimLabels = c("featureNames",
"featureColumns"), .__classVersion__ = new("Versions", .Data = list(
c(1L, 1L, 0L)))), annotation = character(0), protocolData = new("AnnotatedDataFrame",
varMetadata = structure(list(labelDescription = character(0)), row.names = character(0), class = "data.frame"),
data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("TCGA-N6-A4V9-01A",
"TCGA-QM-A5NM-01A", "TCGA-N8-A4PM-01A", "TCGA-NG-A4VU-01A",
"TCGA-NG-A4VW-01A", "TCGA-N8-A4PN-01A", "TCGA-N5-A4RA-01A",
"TCGA-N6-A4VD-01A", "TCGA-N7-A4Y8-01A", "TCGA-N6-A4VE-01A",
"TCGA-N5-A59F-01A", "TCGA-N9-A4PZ-01A", "TCGA-N6-A4VF-01A",
"TCGA-NF-A5CP-01A", "TCGA-N6-A4VC-01A", "TCGA-N5-A4RF-01A",
"TCGA-N8-A4PL-01A", "TCGA-ND-A4WA-01A", "TCGA-N5-A4RU-01A",
"TCGA-N9-A4Q3-01A", "TCGA-NA-A4R1-01A", "TCGA-N7-A4Y5-01A",
"TCGA-N5-A4RV-01A", "TCGA-QN-A5NN-01A", "TCGA-N9-A4Q1-01A",
"TCGA-N5-A59E-01A", "TCGA-NA-A4QW-01A", "TCGA-N5-A4RM-01A",
"TCGA-NF-A4X2-01A", "TCGA-N5-A4RN-01A", "TCGA-N5-A4RS-01A",
"TCGA-N8-A4PQ-01A", "TCGA-N9-A4Q4-01A", "TCGA-NA-A4QY-01A",
"TCGA-N5-A4RJ-01A", "TCGA-N5-A4RD-01A", "TCGA-NA-A5I1-01A",
"TCGA-NA-A4R0-01A", "TCGA-NA-A4QV-01A", "TCGA-N7-A4Y0-01A",
"TCGA-N5-A4R8-01A", "TCGA-NF-A4WU-01A", "TCGA-N6-A4VG-01A",
"TCGA-N8-A4PI-01A", "TCGA-N8-A4PO-01A", "TCGA-N8-A4PP-01A",
"TCGA-ND-A4WF-01A", "TCGA-NA-A4QX-01A", "TCGA-N9-A4Q7-01A",
"TCGA-N5-A4RO-01A", "TCGA-N5-A4RT-01A", "TCGA-NF-A4WX-01A",
"TCGA-N7-A59B-01A", "TCGA-ND-A4W6-01A", "TCGA-N8-A56S-01A",
"TCGA-ND-A4WC-01A")), dimLabels = c("sampleNames", "sampleColumns"
), .__classVersion__ = new("Versions", .Data = list(c(1L,
1L, 0L)))), .__classVersion__ = new("Versions", .Data = list(
c(4L, 1L, 2L), c(2L, 54L, 0L), c(1L, 3L, 0L), c(1L, 0L, 0L
))))
All suggestions shall be helpful.

Linear Regression Analysis of population data with R

I have a homework assignment where I need to take a CSV file based around population data around the United States and do some data analysis on the data inside. I need to find the data that exists for my state and for starters run a Linear Regression Analysis to predict the size of the population.
I've been studying R for a few weeks now, went through a LinkedIn Learning training, as well as 2 different trainings on pluralsight about R. I have also tried searching for how to do a Linear Regression Analysis in R and I find plenty of examples for how to do it when the data is perfectly laid out in a table in just the right way to Analyze.
The CSV file is laid out so that each state is defined on a single line/row so I used the filter function to grab just the data for my State and put it into a variable.
Within that dataset the population data is defined across several columns with the most important data being the Population Estimates for each year from 2010 to 2018.
library(tidyverse)
population.data <- read_csv("nst-est2018-alldata.csv")
mn.state.data <- filter(population.data, NAME == "Minnesota")
I'm looking for some help to get headed in the right direction my thought is that I will need to create to containers of data 1 having each year from 2010 to 2018 and one that contains the population data for each of those years. And then use the xyplot function with those two containers? If you have some experience in this area please help me think this through I'm not looking for anybody to do the assignment for me just want some help trying to think it through.
Edit: Here is the results of the
dput(head(population.data))
command:
structure(list(SUMLEV = c("010", "020", "020", "020", "020",
"040"), REGION = c("0", "1", "2", "3", "4", "3"), DIVISION = c("0",
"0", "0", "0", "0", "6"), STATE = c("00", "00", "00", "00", "00",
"01"), NAME = c("United States", "Northeast Region", "Midwest Region",
"South Region", "West Region", "Alabama"), CENSUS2010POP = c(308745538L,
55317240L, 66927001L, 114555744L, 71945553L, 4779736L), ESTIMATESBASE2010
= c(308758105L,
55318430L, 66929743L, 114563045L, 71946887L, 4780138L), POPESTIMATE2010 =
c(309326085L,
55380645L, 66974749L, 114867066L, 72103625L, 4785448L), POPESTIMATE2011 =
c(311580009L,
55600532L, 67152631L, 116039399L, 72787447L, 4798834L), POPESTIMATE2012 =
c(313874218L,
55776729L, 67336937L, 117271075L, 73489477L, 4815564L), POPESTIMATE2013 =
c(316057727L,
55907823L, 67564135L, 118393244L, 74192525L, 4830460L), POPESTIMATE2014 =
c(318386421L,
56015864L, 67752238L, 119657737L, 74960582L, 4842481L), POPESTIMATE2015 =
c(320742673L,
56047587L, 67869139L, 121037542L, 75788405L, 4853160L), POPESTIMATE2016 =
c(323071342L,
56058789L, 67996917L, 122401186L, 76614450L, 4864745L), POPESTIMATE2017 =
c(325147121L,
56072676L, 68156035L, 123598424L, 77319986L, 4875120L), POPESTIMATE2018 =
c(327167434L,
56111079L, 68308744L, 124753948L, 77993663L, 4887871L), NPOPCHG_2010 =
c(567980L,
62215L, 45006L, 304021L, 156738L, 5310L), NPOPCHG_2011 = c(2253924L,
219887L, 177882L, 1172333L, 683822L, 13386L), NPOPCHG_2012 = c(2294209L,
176197L, 184306L, 1231676L, 702030L, 16730L), NPOPCHG_2013 = c(2183509L,
131094L, 227198L, 1122169L, 703048L, 14896L), NPOPCHG_2014 = c(2328694L,
108041L, 188103L, 1264493L, 768057L, 12021L), NPOPCHG_2015 = c(2356252L,
31723L, 116901L, 1379805L, 827823L, 10679L), NPOPCHG_2016 = c(2328669L,
11202L, 127778L, 1363644L, 826045L, 11585L), NPOPCHG_2017 = c(2075779L,
13887L, 159118L, 1197238L, 705536L, 10375L), NPOPCHG_2018 = c(2020313L,
38403L, 152709L, 1155524L, 673677L, 12751L), BIRTHS2010 = c(987836L,
163454L, 212614L, 368752L, 243016L, 14227L), BIRTHS2011 = c(3973485L,
646265L, 834909L, 1509597L, 982714L, 59689L), BIRTHS2012 = c(3936976L,
637904L, 830701L, 1504936L, 963435L, 59070L), BIRTHS2013 = c(3940576L,
635741L, 830869L, 1504799L, 969167L, 57936L), BIRTHS2014 = c(3963195L,
632433L, 836505L, 1525280L, 968977L, 58907L), BIRTHS2015 = c(3992376L,
634515L, 837968L, 1545722L, 974171L, 59637L), BIRTHS2016 = c(3962654L,
628039L, 831667L, 1541342L, 961606L, 59388L), BIRTHS2017 = c(3901982L,
616552L, 816177L, 1519944L, 949309L, 58259L), BIRTHS2018 = c(3855500L,
609336L, 804431L, 1499838L, 941895L, 57216L), DEATHS2010 = c(598691L,
110848L, 140785L, 228706L, 118352L, 11073L), DEATHS2011 = c(2512442L,
470816L, 586840L, 962751L, 492035L, 48818L), DEATHS2012 = c(2501531L,
460985L, 584817L, 960575L, 495154L, 48364L), DEATHS2013 = c(2608019L,
480032L, 605188L, 1011093L, 511706L, 50847L), DEATHS2014 = c(2582448L,
470196L, 597078L, 1006057L, 509117L, 49692L), DEATHS2015 = c(2699826L,
488881L, 626494L, 1052360L, 532091L, 51820L), DEATHS2016 = c(2703215L,
480331L, 619471L, 1058173L, 545240L, 51662L), DEATHS2017 = c(2779436L,
501022L, 620556L, 1092949L, 564909L, 53033L), DEATHS2018 = c(2814013L,
506909L, 621030L, 1109152L, 576922L, 53425L), NATURALINC2010 = c(389145L,
52606L, 71829L, 140046L, 124664L, 3154L), NATURALINC2011 = c(1461043L,
175449L, 248069L, 546846L, 490679L, 10871L), NATURALINC2012 = c(1435445L,
176919L, 245884L, 544361L, 468281L, 10706L), NATURALINC2013 = c(1332557L,
155709L, 225681L, 493706L, 457461L, 7089L), NATURALINC2014 = c(1380747L,
162237L, 239427L, 519223L, 459860L, 9215L), NATURALINC2015 = c(1292550L,
145634L, 211474L, 493362L, 442080L, 7817L), NATURALINC2016 = c(1259439L,
147708L, 212196L, 483169L, 416366L, 7726L), NATURALINC2017 = c(1122546L,
115530L, 195621L, 426995L, 384400L, 5226L), NATURALINC2018 = c(1041487L,
102427L, 183401L, 390686L, 364973L, 3791L), INTERNATIONALMIG2010 =
c(178835L,
45723L, 25158L, 68742L, 39212L, 928L), INTERNATIONALMIG2011 = c(792881L,
206686L, 116948L, 285343L, 183904L, 4716L), INTERNATIONALMIG2012 =
c(858764L,
207584L, 120995L, 344198L, 185987L, 5874L), INTERNATIONALMIG2013 =
c(850952L,
194103L, 126681L, 329897L, 200271L, 5111L), INTERNATIONALMIG2014 =
c(947947L,
222685L, 134310L, 365281L, 225671L, 3753L), INTERNATIONALMIG2015 =
c(1063702L,
227275L, 142759L, 429088L, 264580L, 4685L), INTERNATIONALMIG2016 =
c(1069230L,
236718L, 144859L, 436795L, 250858L, 5950L), INTERNATIONALMIG2017 =
c(953233L,
215872L, 126013L, 404582L, 206766L, 3190L), INTERNATIONALMIG2018 =
c(978826L,
229700L, 127583L, 418418L, 203125L, 3344L), DOMESTICMIG2010 = c(0L,
-32918L, -50873L, 90679L, -6888L, 1238L), DOMESTICMIG2011 = c(0L,
-159789L, -186896L, 335757L, 10928L, -2239L), DOMESTICMIG2012 = c(0L,
-205314L, -181285L, 336615L, 49984L, 59L), DOMESTICMIG2013 = c(0L,
-216273L, -123814L, 293443L, 46644L, 2641L), DOMESTICMIG2014 = c(0L,
-274391L, -182730L, 373439L, 83682L, -755L), DOMESTICMIG2015 = c(0L,
-339996L, -234823L, 452879L, 121940L, -1553L), DOMESTICMIG2016 = c(0L,
-372953L, -228200L, 442633L, 158520L, -1977L), DOMESTICMIG2017 = c(0L,
-316879L, -161387L, 364465L, 113801L, 2065L), DOMESTICMIG2018 = c(0L,
-292928L, -157048L, 345132L, 104844L, 5718L), NETMIG2010 = c(178835L,
12805L, -25715L, 159421L, 32324L, 2166L), NETMIG2011 = c(792881L,
46897L, -69948L, 621100L, 194832L, 2477L), NETMIG2012 = c(858764L,
2270L, -60290L, 680813L, 235971L, 5933L), NETMIG2013 = c(850952L,
-22170L, 2867L, 623340L, 246915L, 7752L), NETMIG2014 = c(947947L,
-51706L, -48420L, 738720L, 309353L, 2998L), NETMIG2015 = c(1063702L,
-112721L, -92064L, 881967L, 386520L, 3132L), NETMIG2016 = c(1069230L,
-136235L, -83341L, 879428L, 409378L, 3973L), NETMIG2017 = c(953233L,
-101007L, -35374L, 769047L, 320567L, 5255L), NETMIG2018 = c(978826L,
-63228L, -29465L, 763550L, 307969L, 9062L), RESIDUAL2010 = c(0L,
-3196L, -1108L, 4554L, -250L, -10L), RESIDUAL2011 = c(0L, -2459L,
-239L, 4387L, -1689L, 38L), RESIDUAL2012 = c(0L, -2992L, -1288L,
6502L, -2222L, 91L), RESIDUAL2013 = c(0L, -2445L, -1350L, 5123L,
-1328L, 55L), RESIDUAL2014 = c(0L, -2490L, -2904L, 6550L, -1156L,
-192L), RESIDUAL2015 = c(0L, -1190L, -2509L, 4476L, -777L, -270L
), RESIDUAL2016 = c(0L, -271L, -1077L, 1047L, 301L, -114L), RESIDUAL2017 =
c(0L,
-636L, -1129L, 1196L, 569L, -106L), RESIDUAL2018 = c(0L, -796L,
-1227L, 1288L, 735L, -102L), RBIRTH2011 = c(12.79898857, 11.646389369,
12.449493906, 13.0753983, 13.564866164, 12.455601786), RBIRTH2012 =
c(12.589173852,
11.454833676, 12.353389372, 12.900715293, 13.172754439, 12.287820829
), RBIRTH2013 = c(12.511116578, 11.384582534, 12.318197145, 12.770698648,
13.1250523, 12.012410502), RBIRTH2014 = c(12.493440163, 11.301146646,
12.363692308, 12.814734, 12.993051496, 12.179749675), RBIRTH2015 =
c(12.493175596,
11.324209532, 12.357461907, 12.843808208, 12.92441189, 12.301816868
), RBIRTH2016 = c(12.309933949, 11.20434042, 12.242454436, 12.663079639,
12.619264908, 12.222387438), RBIRTH2017 = c(12.039095529, 10.996948983,
11.989119413, 12.357287884, 12.333939366, 11.962999487), RBIRTH2018 =
c(11.820984126,
10.863177115, 11.789576855, 12.078306222, 12.128940451, 11.720998206
), RDEATH2011 = c(8.0928244199, 8.4846099623, 8.7504877826, 8.3388830191,
6.7917918366, 10.187095914), RDEATH2012 = c(7.9990857588, 8.2779015368,
8.6968381072, 8.2343067033, 6.7700904074, 10.060744313), RDEATH2013 =
c(8.2803198685,
8.5962112289, 8.9723230665, 8.5807898649, 6.9298356343, 10.542582104
), RDEATH2014 = c(8.1408206164, 8.4020820365, 8.8249187702, 8.4524499397,
6.8267702932, 10.274434632), RDEATH2015 = c(8.4484528254, 8.7250748685,
9.2388679994, 8.7443343664, 7.0592978512, 10.689339673), RDEATH2016 =
c(8.3975028099,
8.5692003816, 9.1188486402, 8.6935469035, 7.1552465339, 10.632332792
), RDEATH2017 = c(8.5756150392, 8.9363320099, 9.1155717285, 8.8857783149,
7.3396052849, 10.889883997), RDEATH2018 = c(8.6277792774, 9.0371195009,
9.1016891619, 8.9320830002, 7.4291216994, 10.944391939), RNATURALINC2011 =
c(4.7061641498,
3.161779407, 3.6990061239, 4.7365152812, 6.7730743272, 2.2685058724
), RNATURALINC2012 = c(4.5900880929, 3.1769321388, 3.656551265,
4.66640859, 6.402664032, 2.2270765159), RNATURALINC2013 = c(4.2307967093,
2.7883713049, 3.3458740787, 4.1899087829, 6.1952166656, 1.4698283977
), RNATURALINC2014 = c(4.3526195469, 2.89906461, 3.5387735378,
4.3622840605, 6.1662812026, 1.9053150433), RNATURALINC2015 =
c(4.0447227708,
2.5991346635, 3.1185939072, 4.0994738414, 5.8651140389, 1.6124771946
), RNATURALINC2016 = c(3.912431139, 2.6351400388, 3.123605796,
3.969532736, 5.4640183742, 1.5900546466), RNATURALINC2017 =
c(3.4634804902,
2.0606169731, 2.8735476848, 3.4715095687, 4.9943340813, 1.0731154898
), RNATURALINC2018 = c(3.1932048488, 1.8260576141, 2.687887693,
3.1462232219, 4.6998187519, 0.7766062675), RINTERNATIONALMIG2011 =
c(2.5539481982,
3.7247036946, 1.7438348531, 2.4715029092, 2.5385138982, 0.9841112772
), RINTERNATIONALMIG2012 = c(2.7460490726, 3.7275831375, 1.7993217139,
2.9505576333, 2.5429438207, 1.2219173785), RINTERNATIONALMIG2013 =
c(2.7017267715,
3.4759149144, 1.8781318506, 2.7997195452, 2.7121923767, 1.0597112344
), RINTERNATIONALMIG2014 = c(2.988275652, 3.9792291689, 1.9851256285,
3.0689308523, 3.0260314993, 0.7759790947), RINTERNATIONALMIG2015 =
c(3.3285982753,
4.0561842059, 2.1052580818, 3.5654043717, 3.5102060089, 0.9664136698
), RINTERNATIONALMIG2016 = c(3.3215493142, 4.2230961065, 2.1323795548,
3.5885415898, 3.2920380658, 1.2245437674), RINTERNATIONALMIG2017 =
c(2.9410856198,
3.8503376372, 1.8510505744, 3.2892897676, 2.6864164429, 0.6550398799
), RINTERNATIONALMIG2018 = c(3.0010858795, 4.0950670621, 1.8698304564,
3.3695510667, 2.6156748143, 0.685035969), RDOMESTICMIG2011 = c(0,
-2.879569389, -2.786843372, 2.9081645678, 0.1508443529, -0.467223314
), RDOMESTICMIG2012 = c(0, -3.686820778, -2.69589683, 2.8855541222,
0.6834160664, 0.0122732593), RDOMESTICMIG2013 = c(0, -3.872925953,
-1.835626629, 2.4903472978, 0.6316815776, 0.5475831286), RDOMESTICMIG2014
= c(0,
-4.903180146, -2.700781819, 3.1374707924, 1.1220952977, -0.156105573
), RDOMESTICMIG2015 = c(0, -6.067919504, -3.462920156, 3.7630900106,
1.6177886489, -0.320350145), RDOMESTICMIG2016 = c(0, -6.653555548,
-3.359190761, 3.6365043774, 2.0802759896, -0.40687782), RDOMESTICMIG2017 =
c(0,
-5.651919379, -2.370672066, 2.963134779, 1.4785645494, 0.4240305179
), RDOMESTICMIG2018 = c(0, -5.222289092, -2.301663494, 2.7793734944,
1.350093835, 1.1713623417), RNETMIG2011 = c(2.5539481982, 0.845134306,
-1.043008519, 5.379667477, 2.6893582511, 0.516887963), RNETMIG2012 =
c(2.7460490726,
0.0407623599, -0.896575116, 5.8361117555, 3.2263598871, 1.2341906378
), RNETMIG2013 = c(2.7017267715, -0.397011039, 0.0425052219,
5.2900668429, 3.3438739543, 1.6072943629), RNETMIG2014 = c(2.988275652,
-0.923950977, -0.71565619, 6.2064016447, 4.148126797, 0.6198735214
), RNETMIG2015 = c(3.3285982753, -2.011735298, -1.357662074,
7.3284943823, 5.1279946578, 0.6460635248), RNETMIG2016 = c(3.3215493142,
-2.430459441, -1.226811206, 7.2250459672, 5.3723140554, 0.8176659475
), RNETMIG2017 = c(2.9410856198, -1.801581742, -0.519621492,
6.2524245465, 4.1649809923, 1.0790703978), RNETMIG2018 = c(3.0010858795,
-1.12722203, -0.431833037, 6.1489245611, 3.9657686492, 1.8563983107
)), .Names = c("SUMLEV", "REGION", "DIVISION", "STATE", "NAME",
"CENSUS2010POP", "ESTIMATESBASE2010", "POPESTIMATE2010",
"POPESTIMATE2011",
"POPESTIMATE2012", "POPESTIMATE2013", "POPESTIMATE2014",
"POPESTIMATE2015",
"POPESTIMATE2016", "POPESTIMATE2017", "POPESTIMATE2018", "NPOPCHG_2010",
"NPOPCHG_2011", "NPOPCHG_2012", "NPOPCHG_2013", "NPOPCHG_2014",
"NPOPCHG_2015", "NPOPCHG_2016", "NPOPCHG_2017", "NPOPCHG_2018",
"BIRTHS2010", "BIRTHS2011", "BIRTHS2012", "BIRTHS2013", "BIRTHS2014",
"BIRTHS2015", "BIRTHS2016", "BIRTHS2017", "BIRTHS2018", "DEATHS2010",
"DEATHS2011", "DEATHS2012", "DEATHS2013", "DEATHS2014", "DEATHS2015",
"DEATHS2016", "DEATHS2017", "DEATHS2018", "NATURALINC2010",
"NATURALINC2011",
"NATURALINC2012", "NATURALINC2013", "NATURALINC2014", "NATURALINC2015",
"NATURALINC2016", "NATURALINC2017", "NATURALINC2018",
"INTERNATIONALMIG2010",
"INTERNATIONALMIG2011", "INTERNATIONALMIG2012", "INTERNATIONALMIG2013",
"INTERNATIONALMIG2014", "INTERNATIONALMIG2015", "INTERNATIONALMIG2016",
"INTERNATIONALMIG2017", "INTERNATIONALMIG2018", "DOMESTICMIG2010",
"DOMESTICMIG2011", "DOMESTICMIG2012", "DOMESTICMIG2013",
"DOMESTICMIG2014",
"DOMESTICMIG2015", "DOMESTICMIG2016", "DOMESTICMIG2017",
"DOMESTICMIG2018",
"NETMIG2010", "NETMIG2011", "NETMIG2012", "NETMIG2013", "NETMIG2014",
"NETMIG2015", "NETMIG2016", "NETMIG2017", "NETMIG2018", "RESIDUAL2010",
"RESIDUAL2011", "RESIDUAL2012", "RESIDUAL2013", "RESIDUAL2014",
"RESIDUAL2015", "RESIDUAL2016", "RESIDUAL2017", "RESIDUAL2018",
"RBIRTH2011", "RBIRTH2012", "RBIRTH2013", "RBIRTH2014", "RBIRTH2015",
"RBIRTH2016", "RBIRTH2017", "RBIRTH2018", "RDEATH2011", "RDEATH2012",
"RDEATH2013", "RDEATH2014", "RDEATH2015", "RDEATH2016", "RDEATH2017",
"RDEATH2018", "RNATURALINC2011", "RNATURALINC2012", "RNATURALINC2013",
"RNATURALINC2014", "RNATURALINC2015", "RNATURALINC2016",
"RNATURALINC2017",
"RNATURALINC2018", "RINTERNATIONALMIG2011", "RINTERNATIONALMIG2012",
"RINTERNATIONALMIG2013", "RINTERNATIONALMIG2014", "RINTERNATIONALMIG2015",
"RINTERNATIONALMIG2016", "RINTERNATIONALMIG2017", "RINTERNATIONALMIG2018",
"RDOMESTICMIG2011", "RDOMESTICMIG2012", "RDOMESTICMIG2013",
"RDOMESTICMIG2014",
"RDOMESTICMIG2015", "RDOMESTICMIG2016", "RDOMESTICMIG2017",
"RDOMESTICMIG2018",
"RNETMIG2011", "RNETMIG2012", "RNETMIG2013", "RNETMIG2014", "RNETMIG2015",
"RNETMIG2016", "RNETMIG2017", "RNETMIG2018"), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
In order to help you out, an example data using dput(head(population.data)) would be helpful. Based on your comments, your data is in what is called 'wide' format, meaning each observation is contained in a column, rather than a row (pupulation 2010, population 2011 etc.).
As i hinted in my comment, a sub-goal within statistical modelling is always to clean and reshape data to a proper format, that will work for running models. In this case the problem is that your format is in an incorrect shape. The most common is likely melting to long format via the reshape2 or data.table package as explained in this link. I personally prefer the data.table package, as it seems to have better large scale performance. Their usage however is identical.
Lets say you have a column 'NAME' for states and 9 columns for population estimates (2010 population estimates, 2011 population estimates and so on), we could then convert these columns into a long format, using melt from either of the two suggested packages (They are identical in use)
require(data.table)
value_columns <- paste(2010:2018, "Population Estimates")
population.data_long <- melt(population.data, id.vars = "NAME",
measure.vars = value_columns, #Columns containing values we (that are grouped by their column names)
variable.name = 'Year (Population Estimate)', #Name of the column which tells us [(Year) Population Estimate]
value.name = 'Population Estimate') #Name of the column with values
population.data_long$year <- as.integer(substr(population.data_long$`Year (Population Estimate)`, 1, 4)) #Create a year column in a bit of a hacky way
Note i have ignored any additional columns, and these should be included in your melt statement. From here on a linear regression should follow any standard example that you have found.

How to write the list of list in a text file

I am interest to write a list of lists in a text file in the same patters as it is. The data I would like to write is shown
structure(list(alpha = structure(list(coord = structure(c(-12.2866476198535,
-18.316117409566, -8.967429617903, 1.12428419143426, 5.64841344065713,
5.44808832719262, 5.4933681771463, 1.9309844060162, 0.233398747299152,
-2.99825174446503, -0.614368425069781, 2.46564289448005, 4.66090502549971,
5.85072710241625, 6.05039548299675, 3.76632919408699, 1.41357656882162,
-0.903298741189705, -2.04803182906018, -4.29159971822507, -10.9370577335933,
-10.4408842089726, -3.96875616934913, 0.121960788365283, 6.18374509958836,
8.14853675618862, 9.88793476169869, 3.88115658226667, -2.54678957335455,
-6.47283540567184, -4.77245571184901, -0.627696099407765, 1.88975367842293,
3.5575754911426, 6.77903556061373, 5.65640773119659), .Dim = c(18L,
2L), .Dimnames = list(c("alpha0", "alpha7", "alpha14", "alpha21",
"alpha28", "alpha35", "alpha42", "alpha49", "alpha56", "alpha63",
"alpha70", "alpha77", "alpha84", "alpha91", "alpha98", "alpha105",
"alpha112", "alpha119"), NULL)), totalVar = 224.006168211038), .Names = c("coord",
"totalVar")), cdc15 = structure(list(coord = structure(c(3.47162630576928,
8.48782177704198, 15.0137638851927, 10.7906288581053, 3.63385217951696,
5.35572208423149, -3.25353199133528, -1.56135110102186, -7.75612902660608,
0.336703958433859, 0.369082417850372, 5.34503555916275, 1.92967854766031,
6.51852381743397, -1.21720901946083, 4.5170731102192, -3.30408507300723,
-0.984750968271877, -8.40102749295709, -8.46082456852006, -12.9415452444904,
-5.24176034595145, -6.55825327910539, -6.08904438989054, -1.86350110076595,
-11.4352897317111, -7.97410132086123, 4.0084226414636, 5.73268492795077,
9.73019959676426, 8.39274636758967, 9.64829450668746, 4.37500530928532,
-4.46583186497905, -7.38893631815797, -7.96186328098463, -5.8246279470231,
-3.7664732488773, -0.197403598498376, 5.49542607598301, 4.32441586772294,
6.97775742830444, 4.22579465801243, 1.89421538493436, -2.49167768466654,
-4.00933035006213, -4.2725035868669, -3.15342273124391), .Dim = c(24L,
2L), .Dimnames = list(c("cdc15_10", "cdc15_30", "cdc15_50", "cdc15_70",
"cdc15_80", "cdc15_90", "cdc15_100", "cdc15_110", "cdc15_120",
"cdc15_130", "cdc15_140", "cdc15_150", "cdc15_160", "cdc15_170",
"cdc15_180", "cdc15_190", "cdc15_200", "cdc15_210", "cdc15_220",
"cdc15_230", "cdc15_240", "cdc15_250", "cdc15_270", "cdc15_290"
), NULL)), totalVar = 465.172014273611), .Names = c("coord",
"totalVar")), cdc28 = structure(list(coord = structure(c(-17.0546131306391,
-3.66229994382873, 11.6887094745458, 9.1742388638346, 8.52829507051842,
5.07577055316834, 4.08395116454314, -0.173829127948164, -4.55958318577516,
-2.26498682123389, -1.96917640175427, 1.2139570540714, 0.949348894924083,
1.42543768864397, -1.34172880845612, -4.09831002297555, -7.01518132163873,
-6.11841279145655, -7.46318485493823, -11.0977474794828, -6.5158721204813,
0.100407193168119, 2.48089061979771, 6.88321073830055, 8.8512526398517,
6.44139467778423, -1.4938717542132, -6.27905863623537, -4.7271008527727,
-1.28540378171629, 2.52270971781573, 5.39065653580633, 7.37698285416012,
4.933147294612), .Dim = c(17L, 2L), .Dimnames = list(c("cdc28_0",
"cdc28_10", "cdc28_20", "cdc28_30", "cdc28_40", "cdc28_50", "cdc28_60",
"cdc28_70", "cdc28_80", "cdc28_90", "cdc28_100", "cdc28_110",
"cdc28_120", "cdc28_130", "cdc28_140", "cdc28_150", "cdc28_160"
), NULL)), totalVar = 434.213382002418), .Names = c("coord",
"totalVar")), elu = structure(list(coord = structure(c(-16.5385661891214,
-7.22079482875697, -3.54426033968934, -0.490137067585021, 6.41505042855706,
8.5763425812589, 7.09765646432215, 5.08639180593248, 2.03913603133563,
4.82068185798214, 3.3960214921007, -2.08018553751718, -4.74563686297203,
-2.81169983584704, -6.14568798086542, 1.07761816321543, -3.65016036562603,
-6.63747020746656, -8.38502803731479, -6.58956439536117, -2.03845851348116,
3.12479766419619, 7.8140081835477, 8.65512130826726, 7.31933446871695,
6.30983959657581, 4.23861782098735, -5.09296770539154), .Dim = c(14L,
2L), .Dimnames = list(c("elu0", "elu30", "elu60", "elu90", "elu120",
"elu150", "elu180", "elu210", "elu240", "elu270", "elu300", "elu330",
"elu360", "elu390"), NULL)), totalVar = 264.546605949057), .Names = c("coord",
"totalVar"))), .Names = c("alpha", "cdc15", "cdc28", "elu"))
The data given above should be written to a text file (list of lists). How to do this ??
Edited The expected output in txt/csv format
$alpha
$alpha$coord
[,1] [,2]
alpha0 -12.2866476 -2.0480318
alpha7 -18.3161174 -4.2915997
alpha14 -8.9674296 -10.9370577
alpha21 1.1242842 -10.4408842
alpha28 5.6484134 -3.9687562
alpha35 5.4480883 0.1219608
alpha42 5.4933682 6.1837451
alpha49 1.9309844 8.1485368
alpha56 0.2333987 9.8879348
alpha63 -2.9982517 3.8811566
alpha70 -0.6143684 -2.5467896
alpha77 2.4656429 -6.4728354
alpha84 4.6609050 -4.7724557
alpha91 5.8507271 -0.6276961
alpha98 6.0503955 1.8897537
alpha105 3.7663292 3.5575755
alpha112 1.4135766 6.7790356
alpha119 -0.9032987 5.6564077
$alpha$totalVar
[1] 224.0062
$cdc15
$cdc15$coord
[,1] [,2]
cdc15_10 3.4716263 -1.8635011
cdc15_30 8.4878218 -11.4352897
cdc15_50 15.0137639 -7.9741013
cdc15_70 10.7906289 4.0084226
cdc15_80 3.6338522 5.7326849
cdc15_90 5.3557221 9.7301996
cdc15_100 -3.2535320 8.3927464
cdc15_110 -1.5613511 9.6482945
cdc15_120 -7.7561290 4.3750053
cdc15_130 0.3367040 -4.4658319
cdc15_140 0.3690824 -7.3889363
cdc15_150 5.3450356 -7.9618633
cdc15_160 1.9296785 -5.8246279
cdc15_170 6.5185238 -3.7664732
cdc15_180 -1.2172090 -0.1974036
cdc15_190 4.5170731 5.4954261
cdc15_200 -3.3040851 4.3244159
cdc15_210 -0.9847510 6.9777574
cdc15_220 -8.4010275 4.2257947
cdc15_230 -8.4608246 1.8942154
cdc15_240 -12.9415452 -2.4916777
cdc15_250 -5.2417603 -4.0093304
cdc15_270 -6.5582533 -4.2725036
cdc15_290 -6.0890444 -3.1534227
$cdc15$totalVar
[1] 465.172
$cdc28
$cdc28$coord
[,1] [,2]
cdc28_0 -17.0546131 -6.1184128
cdc28_10 -3.6622999 -7.4631849
cdc28_20 11.6887095 -11.0977475
cdc28_30 9.1742389 -6.5158721
cdc28_40 8.5282951 0.1004072
cdc28_50 5.0757706 2.4808906
cdc28_60 4.0839512 6.8832107
cdc28_70 -0.1738291 8.8512526
cdc28_80 -4.5595832 6.4413947
cdc28_90 -2.2649868 -1.4938718
cdc28_100 -1.9691764 -6.2790586
cdc28_110 1.2139571 -4.7271009
cdc28_120 0.9493489 -1.2854038
cdc28_130 1.4254377 2.5227097
cdc28_140 -1.3417288 5.3906565
cdc28_150 -4.0983100 7.3769829
cdc28_160 -7.0151813 4.9331473
$cdc28$totalVar
[1] 434.2134
$elu
$elu$coord
[,1] [,2]
elu0 -16.5385662 -6.145688
elu30 -7.2207948 1.077618
elu60 -3.5442603 -3.650160
elu90 -0.4901371 -6.637470
elu120 6.4150504 -8.385028
elu150 8.5763426 -6.589564
elu180 7.0976565 -2.038459
elu210 5.0863918 3.124798
elu240 2.0391360 7.814008
elu270 4.8206819 8.655121
elu300 3.3960215 7.319334
elu330 -2.0801855 6.309840
elu360 -4.7456369 4.238618
elu390 -2.8116998 -5.092968
$elu$totalVar
[1] 264.5466
While you can combine writeLines and capture.output, I prefer the sink function in these cases which simply diverts the R output to a file or connection. So, you should get what you want with:
sink("myfile.txt")
print(mylist)
sink()
where mylist is your list and "myfile.txt" is the text file (including path) you write to.

Resources