Sorry, try this instead. It creates a data frame of 3 columns in which
each column equals RQ[,1] except it has NAs where the columns of RQ[-1]
has NAs. Perform the quantile operation on that.
sapply(sign(RQ[-1]) * RQ[,1], quantile, probs = c(0, .05, .95, 1), na.rm = TRUE)
On 9/14/07, Gabor Gro
I think this does what you want:
> RQ
A B1 B2 B3
11 NA 112 12
22 NA 123 123
33 NA 324 13
44 3 21 535
55 4 12 33
66 7 1 335
77 4 NA 3535
88 4 NA NA
99 NA NA NA
10 10 5 NA NA
11 12 4 NA NA
12 15 2 NA NA
13 17 3 NA
Try this:
sapply(RQ[-1], quantile, probs = c(0, .05, .95, 1), na.rm = TRUE)
On 9/14/07, Anders Bjørgesæter <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a dataframe, RQ, like this:
>
> AB1B2B3
> 1NA11212
> 2NA123 123
> 3NA32413
> 43 21535
>
Hi
I have a dataframe, RQ, like this:
AB1B2B3
1NA11212
2NA123 123
3NA32413
43 21535
54 1233
67 1 335
74 NA3535
84 NANA
9NANANA
105NANA
124NANA
152N
4 matches
Mail list logo