Index: delete.response.Rd =================================================================== --- delete.response.Rd (revision 76312) +++ delete.response.Rd (working copy) @@ -37,7 +37,11 @@ model. There is also a \code{"[.terms"} method to perform the same function (with \code{keep.response = TRUE}). - \code{reformulate} creates a formula from a character vector. + \code{reformulate} creates a formula from a character vector. If + \code{length(termlabels)}>1, its elements are concatenated with \code{+}. + Non-syntactic names (e.g. containing spaces or special characters; see + \code{\link{make.names}}) must be protected with backticks (see examples). + } \value{ \code{delete.response} and \code{drop.terms} return a \code{terms} @@ -65,6 +69,9 @@ ## using non-syntactic names: reformulate(c("`P/E`", "`\% Growth`"), response = as.name("+-")) +x <- c("a name","another name") +reformulate(sprintf("`%s`",x)) + stopifnot(identical( ~ var, reformulate("var")), identical(~ a + b + c, reformulate(letters[1:3])), identical( y ~ a + b, reformulate(letters[1:2], "y"))