scatterplot_predictions {MiMIR} | R Documentation |
scatterplot_predictions
Description
Function to visualize a scatter-plot comparing two variables
Usage
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 |
Value
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")
[Package MiMIR version 1.5 Index]