The R Project SVN R

Rev

Rev 88529 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 88529 Rev 88657
Line 42... Line 42...
42
  which can either be supplied or default to the extremes of the
42
  which can either be supplied or default to the extremes of the
43
  data.
43
  data.
44
 
44
 
45
  A primary use is in modeling formula to directly specify a
45
  A primary use is in modeling formula to directly specify a
46
  natural spline term in a model: see the examples.
46
  natural spline term in a model: see the examples.
-
 
47
  Also, if the formula has a \code{subset = *} part, the \code{x} in
-
 
48
  \code{ns(x)} is evaluated before subsetting which may lead to unexpected
-
 
49
  results.  For more information see the \sQuote{Details} section of the
-
 
50
  \code{\link{model.frame}}.
47
}
51
}
48
 
-
 
49
\value{
52
\value{
50
  A matrix of dimension \code{length(x) * df} where either \code{df} was
53
  A matrix of dimension \code{length(x) * df} where either \code{df} was
51
  supplied or if \code{knots} were supplied,
54
  supplied or if \code{knots} were supplied,
52
  \code{df = length(knots) + 1 + intercept}.
55
  \code{df = length(knots) + 1 + intercept}.
53
  Attributes are returned that correspond to the arguments to \code{ns},
56
  Attributes are returned that correspond to the arguments to \code{ns},