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,280 points
61 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,430 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
16 views
0 votes
1 answer

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

A variable name in R programming language ...READ MORE

answered Sep 7, 2018 in Data Analytics by zombie
• 3,690 points
70 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
74 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
21 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,430 points
31 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,430 points
39 views