UFO ET IT

0이 아닌 상태 코드로 R 종료

ufoet 2020. 12. 31. 22:42
반응형

0이 아닌 상태 코드로 R 종료


linux / POSIX exit (n)에 해당하는 R을 찾고 있는데, 종료 코드 n으로 프로세스를 중지하고 오류가 발생했음을 부모 프로세스에 알립니다. R에 그런 시설이 있습니까?


에 대한 논쟁 quit()입니다. 을 참조하십시오 ?quit.

인수 :

status: the (numerical) error status to be returned to the operating
        system, where relevant.  Conventionally ‘0’ indicates
        successful completion.

세부 사항 :

 Some error statuses are used by R itself.  The default error
 handler for non-interactive use effectively calls ‘q("no", 1,
 FALSE)’ and returns error code 1.  Error status 2 is used for R
 ‘suicide’, that is a catastrophic failure, and other small numbers
 are used by specific ports for initialization failures.  It is
 recommended that users choose statuses of 10 or more.

quit(status=1)

1필요한 종료 코드로 교체하십시오 .

참조 URL : https://stackoverflow.com/questions/7681199/make-r-exit-with-non-zero-status-code

반응형