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 in Data Analytics by Tyrion anex
• 8,270 points
72 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 by Sophie may
• 9,530 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,690 points
25 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 in Data Analytics by anonymous
• 25,700 points
85 views
0 votes
1 answer
0 votes
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,040 points
110 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,040 points
28 views
0 votes
1 answer
+4 votes
2 answers
0 votes
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
• 9,530 points
37 views
0 votes
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
• 9,530 points
44 views