test <- apply(df,2,function(x){all(x<0)})
By the way, test is a bad name for any variable or function.
SDB
************************************************************
From: Rod Tjoelker 865-3197 <rod.tjoelker@boeing.com>
Kim,
Try the "apply" functions: "apply","sapply","lapply","tapply"
test <- apply(df,1,function(x) any(x < 0))
Hope this helps,
Rod
************************************************************
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [S] ASA StatCompSect Student Paper Competition, Lionel Galway |
|---|---|
| Next by Date: | [no subject], Unknown |
| Previous by Thread: | [S] ASA StatCompSect Student Paper Competition, Lionel Galway |
| Next by Thread: | [no subject], Unknown |
| Indexes: | [Date] [Thread] [Top] [All Lists] |