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, 王宙翔 <wzx0...@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@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. _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac