ファイル接続を作成してpath <- file("C:/test.txt")
おり、接続に関連付けられたオブジェクトを印刷すると、接続の「属性」が表示されます。
> path
description class mode text opened
"C:/test.txt" "file" "r" "text" "closed"
can read can write
"yes" "yes"
ただし、さまざまな属性値に実際にアクセスする方法がわかりません
これが私がこれまでに試したことです:
> attributes(path)
$class
[1] "file" "connection"
$conn_id
<pointer: 0x0000004b>
> path$description
Error in path$description : $ operator is invalid for atomic vectors
> path["description"]
[1] NA
> file.info(path)
Error in file.info(path) : invalid filename argument
何か案は?