Is there a way to terminate an R program without causing an error

0 votes

I have a program with many functions and function calls. So, I edit a function, and want the function definitions to be updated in R environment, but they are not actually called.

I defined a variable Update and when it is TRUE, I want to stop the program just after function definitions.

ReadInput <- function(...) ...
Analyze <- function(...) ...
WriteOutput <- function(...) ...

if (Update)
    stop()
# main body
x <- ReadInput()
y <- Analyze(x)
WriteOutput(y)

I ran the stop() function, but it always returns an error message.

Is there any other way to stop this?

Jan 10, 2019 in Data Analytics by Tyrion anex
• 8,700 points
712 views

1 answer to this question.

0 votes

You can make use of the 'browser' function to this easily

answered Jan 10, 2019 by Sophie may
• 10,610 points

Related Questions In Data Analytics

0 votes
1 answer

Is there a way to make R beep/play a sound?

Yes there are few ways to do ...READ MORE

answered May 25, 2018 in Data Analytics by zombie
• 3,790 points
476 views
0 votes
1 answer

Is there a way to display correlation in graphical manner in R?

Ans There are multiple ways of getting this. ...READ MORE

answered Nov 26, 2018 in Data Analytics by Maverick
• 10,840 points
377 views
0 votes
1 answer

Is there any way to check for missing packages and install them in R?

There are 2 options: Either you can use ...READ MORE

answered Apr 17, 2018 in Data Analytics by nirvana
• 3,130 points
697 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,174 views
+1 vote
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
4,412 views
+1 vote
2 answers
0 votes
1 answer

Trying to find frequent itemsets of a data set using arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", "milk", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
576 views
0 votes
2 answers

How to create a table in R without external file?

Tibble also creates a table-like structure. Use below ...READ MORE

answered Sep 3, 2019 in Data Analytics by anonymous
• 33,030 points
2,678 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