Mercurial > repos > prog > lcmsmatching
comparison MsDbOutputDataFrameStream.R @ 1:253d531a0193 draft
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit 36c9d8099c20a1ae848f1337c16564335dd8fb2b
author | prog |
---|---|
date | Sat, 03 Sep 2016 17:02:01 -0400 |
parents | e66bb061af06 |
children | 20d69a062da3 |
comparison
equal
deleted
inserted
replaced
0:e66bb061af06 | 1:253d531a0193 |
---|---|
1 if ( ! exists('MsDbOutputDataFrameStream')) { # Do not load again if already loaded | 1 if ( ! exists('MsDbOutputDataFrameStream')) { # Do not load again if already loaded |
2 | 2 |
3 library(methods) | 3 library(methods) |
4 library(plyr) | |
5 source('MsDbOutputStream.R') | 4 source('MsDbOutputStream.R') |
6 source('dfhlp.R', chdir = TRUE) | 5 source('dfhlp.R', chdir = TRUE) |
7 | 6 |
8 ##################### | 7 ##################### |
9 # CLASS DECLARATION # | 8 # CLASS DECLARATION # |
38 ################# | 37 ################# |
39 # MATCHED PEAKS # | 38 # MATCHED PEAKS # |
40 ################# | 39 ################# |
41 | 40 |
42 MsDbOutputDataFrameStream$methods( matchedPeaks = function(mz, rt = NULL, unused = NULL, peaks = NULL) { | 41 MsDbOutputDataFrameStream$methods( matchedPeaks = function(mz, rt = NULL, unused = NULL, peaks = NULL) { |
42 | |
43 library(plyr) | |
43 | 44 |
44 # Set input values | 45 # Set input values |
45 x <- data.frame(mz = mz) | 46 x <- data.frame(mz = mz) |
46 if ( ! is.null(rt)) | 47 if ( ! is.null(rt)) |
47 x <- cbind(x, data.frame(rt = rt)) | 48 x <- cbind(x, data.frame(rt = rt)) |