I am new to R and keep getting errors with the following message:
unable to find an inherited method for function ‘A’ for signature ‘"B"’
In most cases I've been able to solve my issues by finding alternate examples online, but I'd like to understand what the error message means so I can better understand how R works.
For example, this code:
library("RSQLite")
con = dbConnect(drv="SQLite", dbname="database.db")
Generates this warning:
unable to find an inherited method for function ‘dbConnect’ for signature ‘"character"’
And after fixing that error, this code:
dbClearResult(p1)
Produces this warning:
unable to find an inherited method for function ‘dbClearResult’ for signature ‘"data.frame"’
Can somebody please explain what this type of error message is trying to tell me?
Specifically, the terms "interhited", "method", "function", and "signature" all seem related to concepts I understand from other languages, but the sentence structure of this error implies they have slightly different meanings in R.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…