closeData closes
the external file when the user is finished writing to it.
writeNextDataRows(dh, data)
openData.
The function
closeData is used to close
the external file after writing all data.
When writing out character data, the values in a column are truncated to the maximum string length for that column that is written out in the first block.
# Open an external data file of type SAS
dh <- openData("randnorm.ssd01", type="SAS", openType="write")
# Write out blocks of random normals, 10 rows at a time
for(i in 1:10) {
x <- matrix(rnorm(50), ncol=5)
writeNextDataRows(dh, x)
}
closeData(dh)
# Now read the all 100 rows back in
z <- importData("randnorm.ssd01", colNames=paste("Z",1:5,sep=''))