[R-SIG-Mac] Read csv
BATES Timothy
tim.bates at ed.ac.uk
Mon Nov 13 16:29:53 CET 2017
likely the separator character is not the default "," that csv expects.
look in the csv file and see what the separator character is: perhaps it is a ";"
try:
df <- read.csv("example.csv", header=TRUE, sep=";"); names(df)
> On 13 Nov 2017, at 1:07 pm, 王宙翔 <wzx0908 at icloud.com> wrote:
>
> Hi,Friends:
> When I want to read datas from csv , I have the following problem.
> For example:
> auto.csv :
> <PastedGraphic-1.png>
>
> E <- read.csv("auto.csv", header=T)
> But E$age is NULL
> (on windows, E$age is not NULL).
> Thank you ,everyone. I hope get this helps
> Wang
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-SIG-Mac
mailing list