Possible? Yes (as others have shown), advisable? No, see fortune(106), fortune(236), and possibly fortune(181).
What is your ultimate goal? Maybe we can help you find a better way. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Ralf B > Sent: Wednesday, October 06, 2010 10:32 AM > To: r-help Mailing List > Subject: [R] Create variable by name > > Can one create a variable through a function by name > > createVariable <- function(name) { > outputVariable = name > name <- NULL > } > > after calling > > createVariable("myVar") > > I would like to have a variable myVar initialized with NULL in my > environment. Is this possible? > > Ralf > > ______________________________________________ > 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.