Hey there, as.numeric(gsub(pattern = "%","","12.6%"))
On Sat, Aug 18, 2018 at 4:20 PM, Jeff Reichman <reichm...@sbcglobal.net> wrote: > R-Help Forum > > > > How do I convert a chr variable that contains percentages to an integer > > > > Example 12.6% (chr) to 12.6 (int) > > > > Jeff > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.