vivek
vivek

Reputation: 583

Does what='char' works for read.csv function?

The basic format for scan function in R to read a file with characters is represented like this a<- scan(file.choose(),what='char',sep=',').

I have a csv file with names as a separate column. Can i use what='char' in read.csv. If yes, how to use. If not how to read names column?

Upvotes: 0

Views: 84

Answers (1)

mnel
mnel

Reputation: 115485

There is an entire R manual on importing and exporting data

https://cran.r-project.org/doc/manuals/r-release/R-data.html

read.table (or more specifically read.csv, which is read.table with the default separator being a comma) are the functions you are looking for.

a <- read.csv(yourfile) 

Upvotes: 3

Related Questions