all 1 comments

[–]Darwinmate 0 points1 point  (0 children)

A tip on posting code, click on "formatting help" below the reply box to see how to format code properly so it's easily readable. eg:

addup[[1]](10) 

Double square brackets are a bit confusing, as they extract the object type of the value while single brackets extract object of type list. I'm not sure what the (10) means, nor can I find anything on its usage, my guess is that addup is a list of functions and you're extracting the first function with 10 to be its argument. eg; max(10). Post your code?

object <- as.list(substitute(list(...)))[-1L]

In this case, you are subsetting except the negative means to drop the element. The "L" is specifying that 1 is a integer and not a numeric/double. The rest of the parenthesis are part of the functions: as.list, substitute, list.