Professional Documents
Culture Documents
R-BLOGGERS
R news and tutorials contributed by hundreds of R bloggers
Search R-bloggers.. Go
Converting a String to a Variable
Name On-The-Fly and Vice-versa in Your e-mail here
R Subscribe
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Recently, I had a professor ask me how to take a string and convert it to an R variable Most viewed posts (weekly)
name on-the-"y. One possible way is:
PCA vs Autoencoders for Dimensionality
x <- 42 Reduction
eval(parse(text = "x")) How to write the !rst for loop in R
[1] 42
10 Must-Know Tidyverse Features!
5 Ways to Subset a Data Frame in R
ANOVA vs Multiple Comparisons
Now, suppose we want to go the other way. The trick is just as simple:
How to Remove Outliers in R
Tidy modelling book published
x <- 42
deparse(substitute(x))
[1] "x"
Sponsors
Related
To leave a comment for the author, please follow the link and comment on their blog:
johnramey » r.
R-bloggers.com o#ers daily e-mail updates about R news and tutorials about learning R and
many other topics. Click here if you're looking to post or !nd an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
chapman.edu
Recent Posts
python-bloggers.com
(python/data-science news)
Archives
Select Month
Other sites
SAS blogs
Jobs for R-users