This is R, not S-Plus.
In the first two lines you have
expr <- as.expression(substitute(fun))
nvals <- length(eval(expr, envir = as.list(meanval)))
Simplified example:
y <- 0
fn1 <- function(){
y <- 1
fn1sub <- function() print(y)
fn1sub()
}
fn2sub <- function() print(y)
fn2 <- fun
adad gmx.at> writes:
> Working example:
> --
> library("emdbook")
>
> fn <- function()
> {
> browser()
> y <- 2
> print(deltavar(y*b2, meanval=c(b2=3), Sigma=1) )
> }
>
> x <- 2
> print(deltavar(x*b1, meanval=c(b1=3), Sigma=1) )
> y<-3
>
> fn()
>
>
Dear all,
I want to use the deltavar() function from emdbook. I can use it
directly from the command terminal but within a function it behaves weird.
Working example:
--
library("emdbook")
fn <- function()
{
browser()
y <- 2
print(deltavar(y*b2, meanval=c(b2=3), Sigma=1) )
3 matches
Mail list logo