Displaying 1 result from an estimated 1 matches for "jutter".
Did you mean:
jitter
2011 Jan 29
1
environment question: changing variables from a formula through model.frame?
...:
foo1 <- function(formu)
{
print("Before changing the 'y' variable in the formula")
print(model.frame(formu))
temp_y <- model.frame(formu)[,1] +10
the_txt <- paste(names(model.frame(formu))[1], "temp_y", sep = "<-")
eval(parse(text = the_txt)) # jutter out y var so to be able to handle
identical values.
print("After changing the 'y' variable in the formula")
print(model.frame(formu))
# why isn't it printing the new y I just created for the enviornment of
this function?
}
# running the function shows the problem:
foo1(temp...