attachSdf {SQLiteDF} | R Documentation |
Attaches a SDF to the workspace by adding to the SDF list in workspace.db
and then attaching the SDF file in the SQLite engine.
attachSdf(sdf_filename, sdf_iname = NULL)
sdf_filename |
A string containing a path (recommended is relative path) to the SDF database file. |
sdf_iname |
A string containing an internal name with which the SDF to be attached will be renamed. By default, the internal name stored in the SDF's attribute table will be used as the internal name. Duplicates will be resolved by appending numbers. |
Attaching a SDF into the SQLiteDF workspace involves adding an entry in workspace.db
and then attaching to the SQLite engine. Checks are made to avoid attaching the same file twice.
This is done by storing the full path name of the SDF file in workspace.db
. When loading
SQLiteDF, the relative path is used to locate the SDF files and then the full path are recalculated.
When a SDF file is to be attached with attachSdf
, its full path is calculated and then
it is compared with those in the workspace. These restrictions are to avoid possibly subtle problems.
(In retrospect, I can't imagine any serious problem yet but since it's there already... To think
that I cringed for a week on this problem, I am an idiot.)
Returns an sqlite.data.frame object of the attached SDF if successful. NULL
with an error message displayed otherwise.
Miguel A. R. Manese
sqlite.data.frame
attachSdf
lsSdf