[R] Suppressing script commands in R console when executing long program

Philipp Pagel p.pagel at wzw.tum.de
Fri Sep 18 13:16:51 CEST 2009


On Fri, Sep 18, 2009 at 12:59:16PM +0200, Philipp Pagel wrote:

> > foo$B <- as.numeric(sub(',', '', as.character(foo$B)))

Thinking about it some more, you should use gsub instead of sub here.
Otherwise only the first occurrence of the thousands separator will be
removed.

cu
	Philipp


-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/




More information about the R-help mailing list