Displaying 1 result from an estimated 1 matches for "tp2316516p2316528".
2010 Aug 06
2
How to read a file inside a function?
Hi
I wish to read a file from my local directory from inside a function. I am
passing the filename as the argument but this does not work.
Say for example
function(dat)
{
dat1=read.csv("D:\\dat.csv",header=TRUE)
}
If I call funtion(dat) I get the following error. 'Intuitively' i understand
this is a mistake but how do I overcome this and how can I read a file name
passed as an