On Fri, 4 Nov 2022 12:19:09 +0000
PIKAL Petr <petr.pi...@precheza.cz> wrote:

> > str(sapply(mylist2, "[", "b"))  
> 
> List of 3
> 
> $ : NULL
> 
> $ :'data.frame':       5 obs. of  1 variable:
> 
>   ..$ b: num [1:5] 0.01733 0.46055 0.19421 0.11609 0.00789
> 
> $ :'data.frame':       5 obs. of  1 variable:
> 
>   ..$ b: num [1:5] 0.593 0.478 0.299 0.185 0.847

Is sapply(mylist2, `[[`, 'b') closer to what you'd like to see, i.e. a
list of vectors or NULLs?

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to