Learn R Programming

Bios2cor (version 1.2)

create_screeplot: Creates PCA screeplot

Description

Given a PCA structure (result of the centered_pca function), creates a screeplot of the positive eigen values

Usage

create_screeplot(pca_struct, pca_index= NULL, filepath)

Arguments

pca_struct

An object created by the centered_pca function

filepath

The full path name of the output file

pca_index

An integer indicating the number of selected eigenvalues. Its value must not exceed correlation matrix length. DEFAULT is NULL (all positive eigen values are plotted)

Value

A screeplot of selected eigen values

Examples

Run this code
# NOT RUN {
   msf <- system.file("msa/toy_align.msf", package = "Bios2cor")
  align <- import.msf(msf)

  #Creating OMES object
  omes <- omes(align,fileHelix= NULL , diag= 0, fileCSV= NULL, gap_val= 0.8, z_score= TRUE)
  omes <-omes$normalized

  pca <- centered_pca(omes, m = NULL, pc= NULL, dec_val= 5,eigenvalues_csv= NULL)

  create_screeplot(pca, pca_index= NULL, "screeplot.png")
  
# }

Run the code above in your browser using DataLab