Closed subodh-kumar11 closed 4 years ago
Hi Team,
My stata program, "sample.do", is able to generate output as per requirement, but at last because of "cutpoints" containing NA, is throwing warning error. Thats why my shiny dashboard get disconnected from the localhost server.
Please help me on it.
Thanks, Subodh Kumar
can you post the variable stataLog
just before evaluating
stataLog <- stataLog[seq.int(cutpoints[1] + 1, cutpoints[2] - 1)]
R version: 3.5.0 - (64 bit) RStudio version: 1.1.463 - (64 bit) Rstata package version: 1.1.1 Stata version: 15.1 OS: Windows 10
I have tried debug steps mentioned at below url: https://github.com/lbraglia/RStata/issues/6
In above url, @lbraglia mentioned, problem is with below line: cutpoints <- grep(cut_me_here, stataLog)
When I checked output of "cutpoints" in debug mode, it is 29.
Even I agree with it, since very next line in stata is: stataLog <- stataLog[seq.int(cutpoints[1] + 1, cutpoints[2] - 1)]
Since, cutpoints[1] contains value 29, but cutpoints[2] is equal to NA, in that way above method is like: seq.int(29+1,NA-1) = seq.int(30,NA) Thats why error is throwing as: Warning: Error in seq.int: 'to' must be a finite number
Below screenshot is supporting debugging steps and outcomes:
I hope will get quick help.
Thanks.