addNewFeatures: Add New Features

Description Usage Arguments Value Author(s) See Also Examples

Description

Adds new features to a database without adding any data. Note that if you are loading new data anyway, it is much more efficient to use the loadSdf function and include the new features then. This function will have to read all compounds out of the database first.

Usage

1
addNewFeatures(conn, featureGenerator)

Arguments

conn

A database connection object, such as is returned by initDb.

featureGenerator

A function which returns a data frame containing the new features. It may also contain features which are already in the database, these will simply be ignored. See the description of fct in loadSdf for details.

Value

No value is returned.

Author(s)

Kevin Horan

See Also

loadSdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
   #create and initialize a new SQLite database
   conn = initDb("test.db")

	data(sdfsample)

	#just load the data with no features or descriptors
	ids=loadSdf(conn,sdfsample)
   addNewFeatures(conn, function(sdfset) 
					data.frame(MW = MW(sdfset),  
               rings(sdfset,type="count",upper=6, arom=TRUE))
			 )

	unlink("test.db")

girke-lab/ChemmineR-git-svn-bridge documentation built on May 17, 2019, 5:25 a.m.