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 in Data Analytics by Tyrion anex
• 8,310 points
49 views

1 answer to this question.

0 votes

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

answered Jan 10 by Sophie may
• 9,870 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,710 points
39 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,040 points
50 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,060 points
57 views
+3 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 8, 2018 in Data Analytics by Anmol
• 3,620 points
78 views
0 votes
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,040 points
592 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,040 points
46 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 in Data Analytics by anonymous
• 32,280 points
77 views