Description Usage Arguments Value Note Author(s) Examples
visualizes the correction of PAM values by correction value.
1 2 3 4 5 6 7 8 | plotPAMcorr(
df,
al = -1,
yl = c(0, 2),
sortby = NULL,
abs_dif = T,
titel = "PAM Correction"
)
|
df |
data.frame - with column "CTR" for control values, "PAM" for pam values and optional "PAM_corr" for corrected PAM values. |
al |
numeric - a vector of numeric values on the x axes to draw lines. Default=0 |
yl |
numeric - ylim adjustment. Default=c(0,2) |
sortby |
character - column name to reorder the inoput datafram 'df'. IF set the argument 'al' will not be used. |
abs_dif |
boolean - IF TRUE plots the differences as absolute values (no negative values). Default=TRUE. |
titel |
character - desired maintitel for the plot . Default="PAMcorrection". |
returns a plot containing the original PAM (orange) and Control (blue) values along with the difference (grey). If corrected PAM values are available those will be plotted in red along with the differnece between the corrected PAM and COntrol values. Additionally prints the total Difference along with mean and standart divation for PAM or if given PAM corrected and Control
For visualization purposes the difference between the corrected PAM and Control is used as absolute values (negative values are plotted as positive). Further the mean and sd is calculated for the absolute values.
Andreas Schönberg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # load data
dat <- read.csv(system.file("extdata","exp_PAM.csv",package = "PAMcorrection"))
head(dat)
# plot control and PAM
plotPAMcorr(dat)
# adjust y limit
plotPAMcorr(dat,yl = c(-1,4))
# use vertical lines
abl <- seq(10,40,10)
plotPAMcorr(dat,yl = c(0,4),al = abl)
# order values by PAM
plotPAMcorr(dat,sortby = "PAM")
# get correction value by mean
datf <-dat
datf$PAM_corr <-dat$PAM * mean(dat$CTR/dat$PAM) # factor
# plot correction and use titel
plotPAMcorr(datf,sortby = "PAM",titel="PAM corr factor")# for factor
# show difference in both poisitve and negative directions
plotPAMcorr(datf,sortby = "PAM",abs_dif=F,yl=c(-1,2))
# Note: The total and mean diffenrece is still calculcated in absolute values.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.