import csv via readr RStudio


i m trying to import my csv file into R..i chose readr...
i am wondering what i should input then RStudio asked me the comma seperated list of factors?

if i got 20 different names of factors, i got to input 20 names into the box??

hope someone can take me through here...



Hi Kamkwong

I think it's easier to type in the R code to import a csv file. You can see in the bottom right of the screen shot the code you need to use. So...

library(readr) # load the package (toolbox) you want to use

Rtestcsv <- read_csv("Rtestcsv.csv") # Import the csv file

# or you could use this one...


Your_dataset <- fread("Your data.csv")

Also take a look at this link for reading in data. This is what I used when I first started using R and it's very good. You can further refine how you import the csv file but it's worth reading the article and trying out the suggestions.

Many thanks Elle, i will try it later ><

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.