I have a condition when running code some times get the error Error: no function to return from, jumping to top level
how can fit it?
if (Sys.time() %within% ## get time in day
interval(Sys.Date() + hours(9),
## create an interval time
Sys.Date() + hours(12) + minutes(31),
tzone = "Iran")) {
# saving the dataset ----
write_csv(
realtime_result,
paste(
"/media/fibunacci/New/bourse_bot1/log/full",date(),").csv",
sep = ""
)
)
} else {
return(NULL)
}