I'd like to report a failure of the get_PCA() function that presents the following error indicating that NAs are not allowed even though the dataset is complete and has no missing values.
Error in wlist$Weight[match(outPCA$iCodes, wlist$iCode)] <- outPCA$wts :
NAs are not allowed in subscripted assignments
I should point out that I'm trying to obtain the relative weights for each dimension (level 2) from the first principal component, as indicated in the COINr documentation.
To do this, I've built the " coin " and treated, normalized and aggregated the data. The dataset is written to "Aggregated".
The script used for all these steps is as follows:
library(COINr)
coin <- new_coin(iData = iData, iMeta = iMeta)
iData checked and OK.
iMeta checked and OK.
Error in new_coin(iData = iData, iMeta = iMeta) :
Panel data detected, but you have not specifed split_to - please specify this.
coin <- new_coin(iData = iData, iMeta = iMeta, split_to = "all")
iData checked and OK.
iMeta checked and OK.
Written data set to .$Data$Raw
Written data set to .$Data$Raw
Written data set to .$Data$Raw
Written data set to .$Data$Raw
Written data set to .$Data$Raw
Written data set to .$Data$Raw
Written data set to .$Data$Raw
Written data set to .$Data$Raw
coin <- qNormalise(coin, dset = "Raw", f_n = "n_minmax",
f_n_para = list(l_u = c(1, 100)))
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
Written data set to .$Data$Normalised
coin <- Aggregate(coin, dset = "Normalised", f_ag = "a_amean")
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
Written data set to .$Data$Aggregated
**> coin <- get_PCA(coin, dset = "Aggregated", Level = 2,
weights_to = "PCAwtsLev2", out2 = "coin")
Error in wlist$Weight[match(outPCA$iCodes, wlist$iCode)] <- outPCA$wts :
NAs are not allowed in subscripted assignments**
The reproducible dataset used for these calculations is attached to my request.
get_PCA_Data.xlsx
I would like to thank you in advance for your usual responsiveness and cooperation, and ask you to intervene to resolve the situation.
I'd like to report a failure of the get_PCA() function that presents the following error indicating that NAs are not allowed even though the dataset is complete and has no missing values.
Error in wlist$Weight[match(outPCA$iCodes, wlist$iCode)] <- outPCA$wts : NAs are not allowed in subscripted assignments
I should point out that I'm trying to obtain the relative weights for each dimension (level 2) from the first principal component, as indicated in the COINr documentation. To do this, I've built the " coin " and treated, normalized and aggregated the data. The dataset is written to "Aggregated".
The script used for all these steps is as follows:
The reproducible dataset used for these calculations is attached to my request. get_PCA_Data.xlsx
I would like to thank you in advance for your usual responsiveness and cooperation, and ask you to intervene to resolve the situation.