Displaying 2 results from an estimated 2 matches for "tfilt".
Did you mean:
tfile
2010 Nov 23
1
using the "apply" method for functions with multiple inputs
...ch used within the function).
a <- c(1:10,999,999,999)
b <- c(11:20,999,999,999)
tfun <- function(x,y){
if( (x = 1 & y !=999) || (x > 1 & x < 999 & y == 999) )
x1 <- 1
else
x1 <-0
}
#this doesn't work - gives an error " 'y' is missing
tfilt <- sapply(data.frame(a,b), tfun)
thanks,
joe
--
View this message in context: http://r.789695.n4.nabble.com/using-the-apply-method-for-functions-with-multiple-inputs-tp3054719p3054719.html
Sent from the R help mailing list archive at Nabble.com.
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...ch used within the function).
a <- c(1:10,999,999,999)
b <- c(11:20,999,999,999)
tfun <- function(x,y){
if( (x = 1 & y !=999) || (x > 1 & x < 999 & y == 999) )
x1 <- 1
else
x1 <-0
}
#this doesn't work - gives an error " 'y' is missing
tfilt <- sapply(data.frame(a,b), tfun)
thanks,
joe
--
View this message in context:
http://r.789695.n4.nabble.com/using-the-apply-method-for-functions-with-mult
iple-inputs-tp3054719p3054719.html
Sent from the R help mailing list archive at Nabble.com.
------------------------------
Message: 13...