R programming: Does the R language have reflection?

0 votes

I want to do the following:

currentRun = "run123"
dataFrame$currentRun= someVar; 

such that dataFrame$currentRun is equal to dataFrame$run123.
I want to know if R supports reflective programming. And if it does, how does it work?

Jan 8, 2019 in Data Analytics by Tyrion anex
• 8,560 points
179 views

1 answer to this question.

0 votes

The answer to your question is yes. R provides support for reflective programming.

Refer the below example:

foo <- function()1

# without reflection
foo()

# with reflection
get("foo")()

answered Jan 8, 2019 by Sophie may
• 10,100 points

Related Questions In Data Analytics

0 votes
1 answer

How many data structures does R language have?

R language has Homogeneous and Heterogeneous data ...READ MORE

answered Jun 4, 2018 in Data Analytics by zombie
• 3,750 points
86 views
0 votes
2 answers

What are the rules to define a variable name in R programming language?

The same rules almost follow for all ...READ MORE

answered Aug 26, 2019 in Data Analytics by anonymous
• 32,490 points
2,004 views
0 votes
1 answer

R language has several packages for solving a problem. How do you make a decision on which one is the best to use?

CRAN package ecosystem has more than 6000 ...READ MORE

answered Jun 4, 2018 in Data Analytics by zombie
• 3,750 points
168 views
+1 vote
1 answer

Does R programming support Firebird database?

Yes ofcourse you can.  This page will show ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,820 points
400 views
+10 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 8, 2018 in Data Analytics by Abhi
• 3,680 points
210 views
+1 vote
2 answers
0 votes
1 answer

R programming logic

Use gsub to match the substring that we want ...READ MORE

answered Nov 16, 2018 in Data Analytics by Maverick
• 10,820 points
73 views
0 votes
1 answer
+1 vote
1 answer

Does Geshi support the R programming language?

rplus was not included in the official ...READ MORE

answered Dec 21, 2018 in Data Analytics by Sophie may
• 10,100 points
80 views
+1 vote
1 answer

Can we have an if loop inside a for loop in R programming?

You're If loop doesn't have any condition ...READ MORE

answered Dec 21, 2018 in Data Analytics by Sophie may
• 10,100 points
78 views