I'm struggling with an R tutorial for the package MiRLAB although I'm not sure whether the problem is related to the package's function.
I want to use the function Pearson()
, which only accepts .csv files. I've loaded a file perfectly but when I've tried the function Pearson()
(the same happens with MI, IDA and Lasso), this error message appeared:
Error in read.table(file = file, header = header, sep = sep, quote = quote, : 'file' must be a character string or connection
dataset=read.csv("ArabPrueba1.csv", sep = ";")
cause= 3:23
effect= 24:44
pearson=Pearson(dataset,cause,effect)
Any idea on how can I change the file or the command line so it will be recognized by the function? Might it be a problem with the csv file or something else? In the example of the tutorial the file is directly taken from the package so this approach is not covered.
Thank you in advance
pearson = Pearson(read.csv("ArabPrueba1.csv", sep = ";"), cause, effect)
but then, the error I get isError in read.table(file = file, header = header, sep = sep, quote = quote, : 'file' must be a character string or connection
. – N.Ugartondo