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,700 points
939 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,620 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
983 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,030 points
15,182 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, 2022 in Data Analytics by Sohail
• 3,040 points
846 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, 2022 in Data Analytics by Sohail
• 3,040 points
884 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
1,670 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
767 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,620 points
756 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
• 10,620 points
725 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