rsd_calculator {LipidomicsR}R Documentation

Calculate Relative Standard Deviation (RSD)

Description

This function calculates the relative standard deviation (RSD) based on the specified data range.

Usage

rsd_calculator(
  data,
  start,
  end,
  threshold = 0.2,
  show.del = FALSE,
  del.zero = TRUE
)

Arguments

data

The data frame containing abundance data.

start

The starting column index of the QC data range.

end

The ending column index of the QC data range.

threshold

The threshold value for RSD. Default is 0.2.

show.del

Logical value indicating whether to show the deleted data. Default is FALSE.

del.zero

Logical value indicating whether to delete rows with all QC being zero . Default is TRUE.

Value

A data frame containing the calculated RSD values and the corresponding data.

Examples

qc_1=rnorm(n=5,mean=0.3,sd=0.2)
qc_2=rnorm(n=5,mean=0.3,sd=0.2)
qc_3=rnorm(n=5,mean=0.3,sd=0.2)
qc_4=rnorm(n=5,mean=0.3,sd=0.2)
qc_5=rnorm(n=5,mean=0.3,sd=0.2)
WT_1=rnorm(n=5,mean=0.3,sd=0.1)
WT_2=rnorm(n=5,mean=0.3,sd=0.1)
WT_3=rnorm(n=5,mean=0.3,sd=0.1)
KO_1=rnorm(n=5,mean=0.3,sd=0.1)
KO_2=rnorm(n=5,mean=0.3,sd=0.1)
KO_3=rnorm(n=5,mean=0.3,sd=0.1)
data=data.frame(qc_1,qc_2,qc_3,qc_4,qc_5,WT_1,WT_2,WT_3,KO_1,KO_2,KO_3)
rownames(data)=c("LPC(16:0)","PC(14:0/16:1)","PC(18:1/18:1)","PE(18:0/20:1)","PS(20:1/20:1)")
rsd_calculator(data,1,5,show.del = TRUE)

[Package LipidomicsR version 0.3.6 Index]