XmRChart.RdA function to construct individual (X) and moving range (mR) control charts
XmRChart(
data = NULL,
peptide,
L = 1,
U = 5,
metric,
normalization = FALSE,
ytitle = "Individual observations",
type = "mean",
selectMean = NULL,
selectSD = NULL
)comma-separated (.csv), metric file. It should contain a "Precursor" column and the metrics columns. It should also include "Annotations" for each observation.
the name of precursor of interest.
Lower bound of the guide set.
Upper bound of the guide set.
the name of metric of interest.
TRUE if metric is standardized and FALSE if not standardized.
the y-axis title of the plot. Defaults to "Individual observations". The x-axis title is by default "Time : name of peptide"
the type of the control chart. Two values can be assigned, "mean" or "variability". Default is "mean".
the mean of a metric. It is used when mean is known. It is NULL when mean is not known. The default is NULL.
the standard deviation of a metric. It is used when standard deviation is known. It is NULL when mean is not known. The default is NULL.
A plot of individual values or moving ranges versus time per peptide and metric generated from XmR.data.prepare data frame.
# First process the data to make sure it's ready to use
sampleData <- DataProcess(S9Site54)
#> Your data is ready to go!
head(sampleData)
#> AcquiredTime Precursor Annotations MinStartTime MaxEndTime
#> 1 9/19/11 13:14 VLVLDTDYK Not Available 24.30 25.08
#> 2 9/19/11 14:45 VLVLDTDYK Not Available 24.36 25.17
#> 3 9/19/11 16:15 VLVLDTDYK Not Available 24.19 24.96
#> 4 9/19/11 17:46 VLVLDTDYK Not Available 24.22 25.02
#> 5 9/19/11 19:16 VLVLDTDYK Not Available 24.27 25.05
#> 6 9/19/11 20:47 VLVLDTDYK Not Available 24.42 25.22
#> BestRetentionTime TotalArea MaxFWHM missing
#> 1 24.62 116034248 0.29 0
#> 2 24.70 127339240 0.31 0
#> 3 24.53 110745576 0.31 0
#> 4 24.59 130619640 0.31 0
#> 5 24.62 113469472 0.30 0
#> 6 24.76 120836432 0.30 0
# Find the name of the peptides
levels(sampleData$Precursor)
#> [1] "CAVVDVPFGGAK" "DDGSWEVIEGYR" "DGGIDPLVR" "FFVAPFPEVFGK"
#> [5] "GFCGLSQPK" "HLVDEPQNLIK" "LVNELTEFAK" "SLHTLFGDELCK"
#> [9] "TAAYVNAIEK" "VGPLLACLLGR" "VLDALDSIK" "VLVLDTDYK"
#> [13] "YNGVFQECCQAEDK" "YNLGLDLR" "YSTDVSVDEVK"
# Calculate X and mR statistics
XmRChart(data = sampleData, peptide = "VLVLDTDYK", metric = "BestRetentionTime")
XmRChart(
data = sampleData, peptide = "VLVLDTDYK", metric = "BestRetentionTime",
ytitle = "moving ranges", type = "variability"
)
XmRChart(
data = sampleData, peptide = "VLVLDTDYK", metric = "BestRetentionTime",
selectMean = 27.78, selectSD = 8.19
)
XmRChart(data = sampleData, peptide = "DDGSWEVIEGYR", metric = "TotalArea")
XmRChart(
data = sampleData, peptide = "DDGSWEVIEGYR", metric = "TotalArea",
selectMean = 35097129, selectSD = 34132861
)
XmRChart(data = sampleData, peptide = "TAAYVNAIEK", metric = "MaxFWHM")
XmRChart(data = sampleData, peptide = "LVNELTEFAK", metric = "MinStartTime")