ProjectTemplate can automatically load a variety of text based file formats, including comma separated value (CSV) files, tab separated value (TSV) files and generic whitespace separated value (WSV) files. In addition, automatic data loading is supported for several binary file formats, including the RData, SPSS, Stata and SAS formats.
Beyond those file formats, several ad hoc file types support the loading of data sets that are accessible over HTTP or contained in SQL databases, such as MySQL and sqlite.
Please note that several of file formats have not been tested yet, including Stata files, Weka files, DBF files, EPIInfo files, MTP files, Octave files, Systat files and SAS files. Because ProjectTemplate is simply wrapping the 'foreign' package, these file formats are expected to work, but we have not confirmed that yet. Your mileage may vary.
.csv
: CSV files that use a comma separator..csv.bz2
: CSV files that use a comma separator and are compressed using bzip2..csv.zip
: CSV files that use a comma separator and are compressed using zip..csv.gz
: CSV files that use a comma separator and are compressed using gzip..tsv
: CSV files that use a tab separator..tsv.bz2
: CSV files that use a tab separator and are compressed using bzip2..tsv.zip
: CSV files that use a tab separator and are compressed using zip..tsv.gz
: CSV files that use a tab separator and are compressed using gzip..tab
: CSV files that use a tab separator..tab.bz2
: CSV files that use a tab separator and are compressed using bzip2..tab.zip
: CSV files that use a tab separator and are compressed using zip..tab.gz
: CSV files that use a tab separator and are compressed using gzip..wsv
: CSV files that use an arbitrary whitespace separator..wsv.bz2
: CSV files that use an arbitrary whitespace separator and are compressed using bzip2..wsv.zip
: CSV files that use an arbitrary whitespace separator and are compressed using zip..wsv.gz
: CSV files that use an arbitrary whitespace separator and are compressed using gzip..txt
: CSV files that use an arbitrary whitespace separator..txt.bz2
: CSV files that use an arbitrary whitespace separator and are compressed using bzip2..txt.zip
: CSV files that use an arbitrary whitespace separator and are compressed using zip..txt.gz
: CSV files that use an arbitrary whitespace separator and are compressed using gzip..RData
: .RData binary files produced by save()
..rda
: .RData binary files produced by save()
..R
: R source code files..r
: R source code files..url
: A DCF file that contains an HTTP URL and a type specification for a remote dataset..sql
: A DCF file that contains database connection information for a MySQL database..sav
: Binary file format generated by SPSS..dta
: Binary file format generated by Stata..xls
: XLS files..xlsx
: XLSX files..arff
: Weka's ARFF files..dbf
: DBF files..rec
: EPIInfo .rec files..mtp
: MTP files..m
: Octave files..sys
: Systat files..syd
: Systat files..xport
: SAS Xport files..sas
: SAS Xport files.You can access CSV files over HTTP using the .url
file extension. Inside
of the .url
file, you must place DCF that describes your data sources.
An example file is shown below:
url: http://www.johnmyleswhite.com/ProjectTemplate/sample_data.csv
You can access databases stored in a MySQL database using the .sql
file
extension. Inside of the .sql
file, you must place DCF that describes
the connection protocol for your database. An example file is shown below:
type: mysql
user: sample_user
password: sample_password
host: localhost
dbname: sample_database
table: sample_table
You can also access databases stored in a SQLite file using the .sql
file
extension. Inside of the .sql
file, you must place DCF that describes
the details about the SQLite file. Two example files are shown below:
type: sqlite
dbname: /path/to/sample_database
table: sample_table
type: sqlite
dbname: /path/to/sample_database
query: SELECT * FROM users WHERE user_active == 1
In the future, ProjectTemplate could potentially support the following formats:
If you'd like to help us implement support for these data sources or your favorite data source, please use the mailing list to get in touch with us.