Description Usage Arguments Details Value Note Author(s) See Also Examples
This function checks to see if a given file name exists. If so, the function returns a connection to the file. Otherwise, it returns "fileName doest exist".
1 | safeFileOpen(fileName)
|
fileName |
|
When this function is used, users have to make sure to check to see if the returnd object inherits object "connection". Otherwise, the file doest not exist or a connection has not be made.
The function returns a connection object that inherits class "connection" if the file exists and is opend. Otherwise, the string "fileName doest not exist"
This function is no placed here to be used by various widgets. May be mored to a more suitable place later
Jianhua Zhang
1 2 3 4 5 6 | write("A test file", "testFile4safeFileOpen")
tt <- safeFileOpen("testFile4safeFileOpen")
inherits(tt, "connection")
unlink("testFile4safeFileOpen")
tt <- safeFileOpen("testFile4safeFileOpen")
inherits(tt, "connection")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.