addNewFeatures {ChemmineR} | R Documentation

## Add New Features

### 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

    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

       #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")

[Package ChemmineR version 3.40.0 Index]