bslnoff               package:PROcess               R Documentation

_B_a_s_e_l_i_n_e _S_u_b_s_t_r_a_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     This function estimates the baseline and then removes baseline
     from the raw spectrum.

_U_s_a_g_e:

     bslnoff(f, breaks = 200, qntl = 0, method = c("loess", "approx"), bw = 0.005, plot = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

       f: a matrix with M/Z values in the first column and intensities
          in the second column 

  breaks: number of breaks set to M/Z values for finding the local
          minima or points below a centain quantile of intensities;
          breaks -1 equally spaced intervals on the log M/Z scale. 

    qntl: if 0, find local minima; if >0 find intensities < qntl*100th
          quantile locally.

  method: "loess" or "approx" (linear interpolation).

      bw: the bandwidth to be passed to loess.

    plot: TRUE or FALSE, if true, it will plot the raw spectrum,
          theestimated baseline and the baseline substracted spectrum.

     ...: Further parameters that get passed on to plot.

_V_a_l_u_e:

     a matrix of two columns: the first column being the M/Z values
     same as  the input, and the second column being the baseline
     substracted spectra.

_A_u_t_h_o_r(_s):

     Xiaochun Li

_E_x_a_m_p_l_e_s:

     fdat <- system.file("Test", package = "PROcess")
     fs <- list.files(fdat, pattern="\.*csv\.*", full.names=TRUE)
     f1 <- read.files(fs[1])
     fcut <- f1[f1[,1]>0,]
     bseoff <-bslnoff(fcut,method="loess",plot=TRUE, bw=0.1)
     title(basename(fs[1]))

