Skip to content

Extracting a particular column from list

5 messages · Faheem Jan, Eric Berger, Rui Barradas +2 more

#
Hi. How to extract a column from the list.. I will be thanks full..?

Sent from Yahoo Mail on Android
#
# $a
# [1] 1 2 3 4 5
#
# $b
# [1] "a" "b" "c"
[1] 1 2 3 4 5





On Thu, Jan 16, 2020 at 1:04 PM Faheem Jan via R-help <r-help at r-project.org>
wrote:

  
  
#
Hello,

What column and what list?
Please post a reproducible example, see the link at the bottom of this 
mail and  [1], [2], [3].

[1] https://cran.r-project.org/web/packages/reprex/index.html
[2] 
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
[3] https://stackoverflow.com/help/mcve

Hope this helps,

Rui Barradas


?s 11:02 de 16/01/20, Faheem Jan via R-help escreveu:
#
On 17/01/20 1:55 am, Rui Barradas wrote:

            
The OP should note that lists in general *do not have* columns.  Data 
frames (which are a special case of lists) do have columns.

Lists have "*entries*" or "components".  It is important to get your 
terminology right and to understand the concepts that you are dealing 
with.  Slap-dash hammer and hope is a recipe for disaster, especially
in R.

cheers,

Rolf Turner
#
I nominate the last sentence of Rolf's comment as a fortune.
On Thu, Jan 16, 2020 at 3:48 PM Rolf Turner <r.turner at auckland.ac.nz> wrote: