[英]How to overload the functions “[<-.ffdf” and “[.ffdf” from package ff (in R)?
我遇到過來自ff包的寫入錯誤。 這個答案表明解決方案可能是重載函數“[< - 。ffdf”和“[.ffdf”。 有人可以詳細說明這一點,或至少建議我需要弄清楚什么是必要的,以實現這一目標。 請記住,這個問題來自新手。
只需重寫“[< - 。ffdf”和“[.ffdf”函數。
require(ff)
## For the assignment
get("[<-.ffdf")
args(get("[<-.ffdf"))
"[<-.ffdf" <- function (x, i, j, value){
## put your code in here and make sure it does not open too many ff files which are in x
}
## For the getter
args(get("[.ffdf"))
"[.ffdf" <- function (x, i, j, drop = ncols == 1){
## put your code in here and make sure it does not open too many ff files which are in x
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.