c(..., recursive = FALSE) ## S3 method for class 'Date': c(..., recursive = FALSE) ## S3 method for class 'POSIXct': c(..., recursive = FALSE) ## S3 method for class 'POSIXlt': c(..., recursive = FALSE)
... | any objects. Missing values (NAs) are allowed. The names of arguments become part of the names of the resulting vector. |
recursive | a logical value. If TRUE, indicates that the combining should be done recursively. The default is FALSE. |
c(1:10, 1:5, 1:10) c(2, 3, 5, 7, 11, 13) c(a=1, b=2) # vector with names "a" and "b" c(Sdatasets::state.name, "Washington DC") # a list of 4 numeric vectors c(list(1:3, a=3:6), list(8:23, c(3, 8, 39))) # a numeric vector of length 26 c(list(1:3, a=3:6), list(8:23, c(3, 8, 39)), recursive=TRUE) # build x, element by element # useful if final length not known in advance ## Not run: x <- numeric(0) for(i in possibles) if(test(i)) x <- c(x, fun(i)) ## End(Not run)## combine date-time objects c(Sys.Date() + 365, Sys.Date() + 2, as.Date("2009-12-12")) c(Sys.time() + 365, Sys.time() + 2, as.POSIXct("2009-12-12 01:02:03")) c(as.POSIXlt(Sys.time() + 365), as.POSIXlt(Sys.time() + 2), as.POSIXlt("2009-12-12 01:02:03"))