Comparison and difference between View() and this script x <- read.csv("FileName")

What is the difference between View() and x <- read.csv("FileName")?

I can Open excel file with View(), not by x <- read.csv("FileName"). What problem could be?


View() is a command to view your dataframe in a separate window, similar to how you'd view a worksheet in excel.

If you're looking to import a .csv and assign it to an object in R, use the following code.

df <- read.csv("HDD:/Folder/File_name.csv")
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.