No data came through (I don't think "CSV" is one of the approved file types.)
You probably have some odd characters somewhere in the data. Try adding the argument stringsAsFactors=FALSE to the read.csv call before converting the troublesome column.. Converting factors to numeric converts the integer representation, not the character representation. Once you identify which rows are corrupt, you can look at them more closely. You may be able to formulate a regex pattern that removes the invalid characters with the sub function before conversion. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Bill <william...@gmail.com> wrote: >Hello. >trying to do one of the simplest actions -read in data into R. >I don't know why the FBfollowers column is being read as a factor and >also >if I use as.numeric on it, it looks really strange and actually >complety >alters the data. >I am attaching the data set here called ddd.csv >I used >data=read.csv("ddd.csv",header=TRUE) > >fb=data$FBfollowers >fb >fb=as.numeric(fb) >fb > >Thnxs in advance > > >------------------------------------------------------------------------ > >______________________________________________ >R-help@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.