Easiest? Use sub() to replace the periods after the fact.

You can also use the check.names or the col.names arguments to
read.table() to customize your import.

Sarah

On Mon, Jun 8, 2015 at 10:15 AM, John Sorkin
<jsor...@grecc.umaryland.edu> wrote:
> I am reading a csv file. The column headers have spaces in them. The spaces 
> are replaced by a period. I want to replace the space by another character 
> (e.g. the underline) rather than the period. Can someone tell me how to 
> accomplish this?Thank you,
> John
>
> John David Sorkin M.D., Ph.D.
> Professor of Medicine
> Chief, Biostatistics and Informatics
> University of Maryland School of Medicine Division of Gerontology and 
> Geriatric Medicine
> Baltimore VA Medical Center
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
> (Phone) 410-605-7119
> (Fax) 410-605-7913 (Please call phone number above prior to faxing)
>
>
-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
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.

Reply via email to