R/sety.R

Defines functions sety

Documented in sety

# this function is internal, not meant for the user

# R code to process user input, then call
# the corresponding function of the C++ object


.sety <- function( z, rWy )  {
  if( NCOL(rWy) > 1 | !is.numeric(rWy) )  
    stop( "'rWy' must be a numeric vector" )
  rWy <- drop(rWy)
  if( !is.null(z$offset) )  rWy <- rWy - z$offset
  rWysorted <- rWy[ order(z$x1) ]
  if( is.vector(z$weights) )  if( any(z$weights==0) )  {
    wsorted <- z$weights[ order(z$x1) ]
    rWysorted <- rWysorted[ wsorted!=0 ]
  }
  (z$CppObj)$sety( rWysorted )
}

Try the lm.br package in your browser

Any scripts or data that you put into this service are public.

lm.br documentation built on May 30, 2017, 1:22 a.m.