I've written an R program that reads multiple csv files. This code works if I give 'read.csv' command but it never works if I pass the name of the file as a parameter.
For example
dat <- function (x)
{
awr <- data.table(read.csv(x))
}
I passed
dat("hello.csv")
However, I'm not getting any error and the awr data set is not getting created.
For example:
awr <- data.table(read.csv("hello.csv")) ..it works...
Why is it not working when passed in the function?