applyFnToMarkers | R Documentation |
A matrix of the genotypes for all the specified markers is generated. Then, the call back function, op
,
is called with the markers, NULL (for the range), and the 'environment'.
applyFnToMarkers(op = function (markers, range, envir) {},
markers_arg,
envir = ENV)
op |
Is a function of three arguments. It will be called once by
|
markers_arg |
a data frame with the following 5 observations:
|
envir |
an 'environment' that contains all the data frames created from the SQLite database. |
None
db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = read.Mega2DB(db)
show = function(m, r, e) {
print(r)
print(m)
print(head(getgenotypes(m, envir = e)))
}
# apply function "show" to all genotypes > 5,000,000 bp
applyFnToMarkers(show, ENV$markers[ENV$markers$position > 5000000,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.