Hello,
Or in one go with *apply, function '[[':
sapply(result, '[[', 'p.value')
# EPAP
#2.564503e-04 4.173480e-06
Hope this helps,
Rui Barradas
Às 23:20 de 12/06/20, Sarah Goslee escreveu:
Where you have
result[1]$p.value
result[2]$p.value
You need
result[[1]]$p.value
Where you have
result[1]$p.value
result[2]$p.value
You need
result[[1]]$p.value
result[[2]]$p.value
to get the first component of the list.
Sarah
On Fri, Jun 12, 2020 at 5:35 PM Sorkin, John wrote:
>
> Colleagues,
> I am trying to retrieve the p values produced by a Student's t-test run usin
: 12 June 2020 22:34
To: r-help@r-project.org (r-help@r-project.org)
Subject: [R] Obtaining p values from t-test run with a by function
===
EXTERNAL EMAIL
===
Colleagues,
I am trying to retrieve the p values produced by a Student's t-test run using a
by function, bu
Colleagues,
I am trying to retrieve the p values produced by a Student's t-test run using a
by function, but can not do so. I can easily get the p value when I run s
Student's t-test without a by function. What is the secret to obtaining results
returned from a function run within a by function.
4 matches
Mail list logo