# NOT RUN {
# }
# NOT RUN {
## Prepare the radial data for analysis
radialData <- read.csv(system.file("extdata/radial.csv", package="memgene"))
radialGen <- radialData[, -c(1,2)]
radialXY <- radialData[, 1:2]
if (require(adegenet)) {
radialDM <- codomToPropShared(radialGen)
} else {
stop("adegenent package required to produce genetic distance matrix in example.")
}
## Run the MEMGENE analysis
radialAnalysis <- mgQuick(radialDM, radialXY)
## Extract the scores on the first 3 MEMGENE variables
## for subsequent analysis
radialMEMGENE1 <- radialAnalysis$memgene[, 1]
radialMEMGENE2 <- radialAnalysis$memgene[, 2]
radialMEMGENE3 <- radialAnalysis$memgene[, 3]
## Find the proportion of variation explained by all MEMGENE variables
propVariation <- radialAnalysis$sdev/sum(radialAnalysis$sdev)
# }
Run the code above in your browser using DataLab