일부 R 소스 코드에서 "list (...)"를 봤습니다. 하지만 R cosonle에서는 실행할 수 없습니다. R에서 그것이 의미하는 바를 아는 사람이 있습니까?
> list(...)
Error: '...' used in an incorrect context
다음은 줄임표를 사용하여 인수를 전달하는 방법의 예입니다.
my_list_func <- function(...) {
list(...) # All arguments passed to function are given to 'list'
}
# Call function with various parameters. Returns a list using these params.
my_list_func(a=3, b = list(val = 1:3))
## $a
## [1] 3
##
## $b
## $b$val
## [1] 1 2 3
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다