scatterplot_predictions function

scatterplot_predictions

scatterplot_predictions

Function to visualize a scatter-plot comparing two variables

scatterplot_predictions(x, p, title, xname = "x", yname = "predicted x")

Arguments

  • x: numeric vector
  • p: second numeric vector
  • title: string vector with the title
  • xname: string vector with the name of the variable on the x axis
  • yname: string vector with the name of the variable on the y axis

Returns

plotly image with the scatterplot

Examples

library(plotly) #load the dataset metabolic_measures <- synthetic_metabolic_dataset phenotypes <- synthetic_phenotypic_dataset #Pre-process the metabolic features prepped_met<-QCprep(as.matrix(metabolic_measures), MiMIR::PARAM_metaboAge) #Apply the metaboAge metaboAge<-apply.fit(prepped_met, FIT=PARAM_metaboAge$FIT_COEF) age<-data.frame(phenotypes$age) rownames(age)<-rownames(phenotypes) scatterplot_predictions(age, metaboAge, title="Chronological Age vs MetaboAge")
  • Maintainer: Daniele Bizzarri
  • License: GPL-3
  • Last published: 2024-02-01

Useful links