-2

I see a chuck of code like this. It is for generating the output. What is list(...) for? Is it like the function of placeholder %s? THX

c(list(data = data, output = list(height = height)), list(...))

  • I also see **...** in user-written functions, like ```iteratecounts = function(variables, outcomes, output, ... , Nmax = 100, digits = 3)```. So it is also like a placeholder for arguments? – felix fisher Aug 13 '20 at 08:31
  • Please [edit] your question to add some explanation or code instead of using comments as you did. – help-info.de Aug 13 '20 at 08:33

1 Answers1

0

It's very easy to test this out yourself by writing a simple function:

f <- function(...) return(list(...))

f("hello", a = 1, b = 2:6)
#> [[1]]
#> [1] "hello"
#> 
#> $a
#> [1] 1
#> 
#> $b
#> [1] 2 3 4 5 6

Created on 2020-08-13 by the reprex package (v0.3.0)

Allan Cameron
  • 147,086
  • 7
  • 49
  • 87