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,690 points
430 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,590 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 5, 2018 in Data Analytics by zombie
• 3,790 points
430 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
• 33,050 points
10,737 views
0 votes
1 answer

why the predict() function does have different rows in R

Alter this sentence: model = lm(train$latitude train$crashes) to lm(crashes ...READ MORE

answered Jun 24 in Data Analytics by Sohail
• 2,960 points
77 views
0 votes
0 answers

why the predict() function does have different rows in R

I'm using linear regression to attempt and ...READ MORE

Jun 23 in Data Analytics by avinash
• 1,840 points
120 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 9, 2018 in Data Analytics by Abhi
• 3,720 points
605 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,840 points
221 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,590 points
270 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,590 points
237 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP