Hello R-users,

I have been running a script which produces objects based on the
column names of a data.frame. The column names are of the form CB_1-1,
CB_1-2, etc. Now this calculation was rather long and memory
intensive, so I would rather not have to do it again after fixing the
column names using "make.names". As a consequence, I am left with a
bunch of R objects with `-` in the name.
Accessing them is proving challenging and any help would be appreciated.

Reproducible example:
`cb_1-2` <- "hello world"
t <- "cb_1-2"
t <- as.name(t)
t <- eval(parse(text = t))

Error in eval(parse(text = t)) : object 'cb_1' not found

Thanks.
huzefa

______________________________________________
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