//function to enter .csv data
> data_entry <- function(NAME="filename.csv"){
+ dat <- read.csv(NAME)
+ }
> data_entry("data.csv")
> dat
When I enter this code, I get the following error: "object 'dat' not found" Where did I go wrong? P.S : I have placed "data.csv" in the required directory.