Displaying 1 result from an estimated 1 matches for "bt_m".
2010 Jun 17
3
how to use sapply code
...d try to use sapply code. But I got error message that I don't really understand to correct.
bt <- c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2)
alp <- c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2)
bt_alp <- data.frame(bt,alp)
sapply(bt_alp, function(bt,alp) ((bt_m/bt)^alp), bt_m = min(bt))
> sapply(bt_alp, function(bt,alp) ((bt_m/bt)^alp), bt_m = min(bt))
Error in FUN(X[[1L]], ...) : unused argument(s) (bt_m = 19.67861)
Thank you for any help given.
[[alternative HTML version deleted]]