Closes the file associated with a specified data handle
or all open files with data handles.
USAGE:
closeData(dh, all=F)
OPTIONAL ARGUMENTS:
dh
a data handle object.
This is created with
openData.
all
a logical value, if
TRUE, all open data handles are closed.
VALUE:
TRUE if the file associated with
dh was successfully closed,
otherwise
FALSE.
SIDE EFFECTS:
The file associated with the specified data handle is closed
or all open files are closed if
all=T.
SEE ALSO:
,
.
EXAMPLES:
# First create an external data set:
exportData(Quinidine, "Quinidine.ssd01") # a SAS data set
# Open the external data set for subsequent reads:
dh <- openData("Quinidine.ssd01", rowsToRead=100, drop="Subject")
# Read the first 100 observations:
df100 <- readNextDataRows(dh)
# Close the external data file:
closeData(dh)