There may be an easier way but you can extract the
desired values from the list values in t
str(t) to see the elements in t.
test <- matrix(c(1, 1,2,2), 2,2)
tt <- apply(test, 1, t.test)
ttable <- function(tlist) {
tframe <- data.frame(NULL)
for(i in 1:length(tlist)){
t.value <- tlist[[i]]
Uwe Ligges wrote:
> Ng Stanley wrote:
>
>> Hi,
>>
>> Given
>>
>> test <- matrix(c(1, 1,2,2), 2,2)
>> t <- apply(test, 1, t.test)
>>
> >
>
>> How can I obtain a table of p-values, confidence interval etc, instead of
>>
>
> A quick hack would be:
>
> m <- t(sapply(t, function(x) c(x
Ng Stanley wrote:
> Hi,
>
> Given
>
> test <- matrix(c(1, 1,2,2), 2,2)
> t <- apply(test, 1, t.test)
>
> How can I obtain a table of p-values, confidence interval etc, instead of
A quick hack would be:
m <- t(sapply(t, function(x) c(x[["p.value"]], x[["conf.int"]])))
colnames(m) <- c("p", "
Hi,
Given
test <- matrix(c(1, 1,2,2), 2,2)
t <- apply(test, 1, t.test)
How can I obtain a table of p-values, confidence interval etc, instead of
[[1]]
One Sample t-test
data: newX[, i]
t = 3, df = 1, p-value = 0.2048
alternative hypothesis: true mean is not equal to 0
95 percent con
4 matches
Mail list logo