| Line 23... |
Line 23... |
| 23 |
It stores each database (composed of tables, indices, etc.) in a single file. Since a
|
23 |
It stores each database (composed of tables, indices, etc.) in a single file. Since a
|
| 24 |
single SDF occupies a whole database, each SDF will be contained in a single file.
|
24 |
single SDF occupies a whole database, each SDF will be contained in a single file.
|
| 25 |
|
25 |
|
| 26 |
Each SDF file contains the following tables:
|
26 |
Each SDF file contains the following tables:
|
| 27 |
\itemize{
|
27 |
\itemize{
|
| 28 |
\item{sdf_attributes}{a key-value table that contains the SDF attributes. Currently,
|
28 |
\item{sdf\_attributes}{a key-value table that contains the SDF attributes. Currently,
|
| 29 |
only \emph{name} is used representing the SDF's internal name.}
|
29 |
only \emph{name} is used representing the SDF's internal name.}
|
| 30 |
\item{sdf_data}{contains the actual data. Factors and ordered variables are stored as
|
30 |
\item{sdf\_data}{contains the actual data. Factors and ordered variables are stored as
|
| 31 |
integers. Their levels are stored in other tables. Numeric (real) are stored as double,
|
31 |
integers. Their levels are stored in other tables. Numeric (real) are stored as double,
|
| 32 |
characters as text and integers as int's. Currently, complex numbers are not supported.
|
32 |
characters as text and integers as int's. Currently, complex numbers are not supported.
|
| 33 |
Column names correspond exactly to the variable names of the ordinary data frames. E.g.
|
33 |
Column names correspond exactly to the variable names of the ordinary data frames. E.g.
|
| 34 |
Petal.Length will have a column name Petal.Length in the table. This is possible
|
34 |
Petal.Length will have a column name Petal.Length in the table. This is possible
|
| 35 |
because SQLite allows almost any kind of column name as long as it is quoted by
|
35 |
because SQLite allows almost any kind of column name as long as it is quoted by
|
| Line 95... |
Line 95... |
| 95 |
iris.sdf$Petal.Length[1:10]
|
95 |
iris.sdf$Petal.Length[1:10]
|
| 96 |
iris.sdf[["Petal.Length"]][1:10]
|
96 |
iris.sdf[["Petal.Length"]][1:10]
|
| 97 |
iris.sdf[1,c(TRUE,FALSE)]
|
97 |
iris.sdf[1,c(TRUE,FALSE)]
|
| 98 |
#apply(iris.sdf[1:4], 2, mean)
|
98 |
#apply(iris.sdf[1:4], 2, mean)
|
| 99 |
}
|
99 |
}
|
| - |
|
100 |
\keyword{data}
|
| - |
|
101 |
\keyword{manip}
|
| - |
|
102 |
\keyword{classes}
|