brouwern / compbio2021

Assignments for Computational Biology Fall 2021 at the University of Pittsburgh
0 stars 3 forks source link

Workflow comment - question on shrooms_list[[1]] syntax #54

Open richa-d110 opened 3 years ago

richa-d110 commented 3 years ago

https://github.com/brouwern/compbio2021/blob/4fc22d26cd66119a177fd9572bd409ffa989216d/KEY-MSA-walkthrough-shroom.Rmd#L522

Why are there two brackets in the expression shrooms_list[[1]]? What does it do? How is this different from something like shrooms_list[1]?

brouwern commented 3 years ago

One bracket accesses the name of the list Elmement? The other the value of the element

On Mon, Oct 4, 2021 at 8:26 PM Richa Desai @.***> wrote:

https://github.com/brouwern/compbio2021/blob/4fc22d26cd66119a177fd9572bd409ffa989216d/KEY-MSA-walkthrough-shroom.Rmd#L522

Why are there two brackets in the expression shrooms_list[[1]]? What does it do? How is this different from something like shrooms_list[1]?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brouwern/compbio2021/issues/54, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB32NE7BT3TUZCANNRNF32LUFJAZVANCNFSM5FKRLUIA .

--

Nathan L. Brouwer, PhD

@.***

Lecturer

Department of Biological Sciences https://www.biology.pitt.edu/

University of Pittsburgh

Biostatistics course: brouwern.github.io/BIOSC_1120/index.html

Research Associate

National Aviary, Dept. of Conservation & Field Research https://www.aviary.org/conservation

R code: github.com/brouwern

R tweets: @lobrowR https://twitter.com/lobrowR