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]))

