data_dbf
See also:
data_csv,
data_database,
data_excel
The .dbf file extension represents the dBase database file. The file type was introduced in 1983 with the introduction of dBASE II. The file structure has evolved over the years to include many more features and capabilities and has introduced various other files to help support data storage and manipulation. The DBF format is supported by a number of database products.
DBF files are frequently used as data storage format in many programs. An example may be shapefiles in AcrGIS. The program saves information from the attribute tables in this file. Support for data import from DBF files is integrated in the Stagraph visual interface. The following video tutorial shows the data import from dbf files in practice.
To import data from DBF files, the R function read.dbf from the foreign package is used.,
Function Properties
file, file name |
name of input file |
character to factor, as.is |
should character vectors not be converted to factors? |
Description
If you want to import DBF files into the program, click the File - DBF File in the ribbon toolbar.
A help dialog is displayed, where you can set three parameters.
First define the File Name parameter - the path to the DBF file on the computer disk. This path can be defined manually or using the Open button that displays the Open File Dialog. If you use the button Open, program automatically sets correct path to the file (correct format of slash mark).
The R Environment specifics is that the slash mark (“/") is used as the directories separator, instead of the backslash (“\"). If you paste the file name manually, you must also manually change these separators. If you define it using the Open button, separators are set automatically in the correct form.
After defining the File Name parameter, program automatically fills the Dataset Name property - the name of the dataset to be used in the Stagraph environment. This value is automatically created from the file name (without the .dbf extension). Automatically created name you can change according to your needs.
Lastly, the Character to Factor property remains. Using this parameter, you can set whether the text variables will be converted to factor.
If you have all the variables defined, just click the Apply button and the defined file is imported into the program. An example of an imported file is shown in the following figure.
After import, you can continue to work with the dataset in program. If you double-click the dataset in Project Panel, its definition appears in the Properties Panel. If you click on the import function (data_dbf), you can edit two parameters - file and as.is. The file parameter is identical to the File Name in the import dialog. The as.is property is the equivalent of the Character to Factor check-box.
With as.is check-box, you can define a true or false value. For the file property there are more options. If you right-click on the text-box, in the context menu you find three help items.
Using the first item - Open, you can select the file on computer disk. Using the second and third items, you can paste function examples of DBF file import over the URL or FTP protocol. After the “sample" inserting, you only modify the path to the file.
Overall, importing DBF files is very fast and simple. Along with Data Wrangling functions, the program offers a number of features for efficient work with the described files.