The only people who should use the assign function are those who fully understand why you should never use the assign function.
If you tell us where the string is coming from and what you are trying to accomplish, then maybe we can help you accomplish it in a better way. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [email protected] 801.408.8111 > -----Original Message----- > From: [email protected] [mailto:r-help-boun...@r- > project.org] On Behalf Of Kurt Smith > Sent: Friday, July 03, 2009 4:57 AM > To: [email protected] > Subject: [R] Remove all spaces from a string so it can be used by > assign() > > > Hi > > I have a string "56 Fe [1]" that I would like to use as a variable name > by using "assign" however I think the spaces and brackets might be > causing R some trouble. > > How can I change the string so that it just becomes 56Fe1 and can be > used as a variable name. > > > Thank You > > Kurt > > _________________________________________________________________ > > [[elided Hotmail spam]] > > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] 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. ______________________________________________ [email protected] 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.

