search for: dataindex

Displaying 2 results from an estimated 2 matches for "dataindex".

2005 Aug 16
2
quirky behavior from rbinom (PR#8071)
...sion from: (NULL) (129.98.60.134) This seems strange. I have a small block of code that repeatedly calls rbinom. I put a break in there in case it returns NaN, as I've been having problems with this. Here is a transcript from the debug session: Browse[1]> theP [1] 1 Browse[1]> yleft[dataIndex] [1] 3 Browse[1]> rbinom(1,3,1) [1] 3 Browse[1]> rbinom(1,yleft[dataIndex], theP) [1] NaN Strange, huh?
2009 Apr 16
0
manipulating data via the factors of a term in a lm()
...A B C Y1 Y2 1 1 1 1 22 6 2 2 1 1 22 2 3 3 1 1 16 11 4 4 1 1 2 13 5 1 2 1 0 19 6 2 2 1 -2 -7 7 3 2 1 5 8 8 4 2 1 37 -9 9 1 1 2 10 5 10 2 1 2 5 14 11 3 1 2 16 4 12 4 1 2 18 8 13 1 2 2 17 8 14 2 2 2 18 16 15 3 2 2 10 21 16 4 2 2 -16 5 I need a similar function dataIndex(mod, term): dataIndex(mod,"A") --> same as > test$A [1] 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 dataIndex(mod,"A:B") should deliver [1] 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 # find sequential indices for observations in a data frame # corresponding to the unique combinations of t...