S3 and S4 Object in R | Object Oriented Programming and Bioconductor

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 17

  • @xinking2644
    @xinking2644 Год назад +2

    A very nice introduction for the S3 and S4 Class, thank you.

  • @tuandoan7639
    @tuandoan7639 Год назад

    Thanks for great content!!! very informative.

  • @SYEDNURULHasan1789
    @SYEDNURULHasan1789 Год назад

    Thank you for nice introduction

  • @musicspinner
    @musicspinner 3 года назад +3

    So basically, S4 is more 'statically typed' than S3 (more 'dynamically typed')?
    Any speed/efficiency differences between executing S3 or S4 code?
    Why are they actually called "S3" and "S4"? Does it come from some kind of version history of the S programming language or something like that?
    Are there "S1" and "S2"?

    • @LiquidBrain
      @LiquidBrain  3 года назад +3

      You are right in most of these, there's no S1 and S2 on OOP side as this type only started in S3 ( S language version 3). Using S3 and S4 are both actually slower than a generic functions(adv-r.had.co.nz/Performance.html) , but since I only use them for the initial loading of datasets, speed isn't really something I am very familiar in.
      So far I got most of my information from this book (Advanced R by Hadley Wickham.)(adv-r.hadley.nz/), but I do see some discrepancies on the history and definition between the two class on other site.

    • @fgfanta
      @fgfanta 2 года назад

      S4 is dynamically typed.

  • @tonyrobinson9046
    @tonyrobinson9046 Год назад

    Thank you. Nice, but you seemed to rush things in the second half.

  • @Merryberry1750
    @Merryberry1750 11 месяцев назад

    How do i get my R script to look like yours? Mine are not as funny and are often filled with sadness

  • @liancheefoong4309
    @liancheefoong4309 3 года назад

    Great explanation!

  • @fabiuspocus1430
    @fabiuspocus1430 3 года назад

    Thank you so much!

  • @jeffreyyarus4970
    @jeffreyyarus4970 3 года назад

    Thanks so much! Do you have experience plotting images in s4 that are grouped or stacked? I'm using an s4 package that produces various plots, but I have not figured out how to stack them in rows or columns as single figure... similar to what we would do in s3 using ggarange or face-wrap? Thanks.

  • @chrislam1341
    @chrislam1341 2 года назад +1

    in 15:31 line 93, why is it `assays(se)$count` but not `se@assays$count`? Thank you.

    • @LiquidBrain
      @LiquidBrain  2 года назад +1

      It should generate the same results 😅😅

  • @fabiank1345
    @fabiank1345 Год назад

    Thank you, I learned a lot. However, I am confused, why it is `assays(se)$count`. I would have guessed `assays(se)$counts` instead.

  • @stretch8390
    @stretch8390 2 года назад

    Hey LiquidBrain. Any advice on accessing cells within attribute but by the string contained in the cell and not indexing? e.g. Instead of data@colData@listData$primary_diagnosis[1] I want the equivalent of data@colData@listData$primary_diagnosis["My_chosen_feature"] but it doesn't work :\

    • @LiquidBrain
      @LiquidBrain  2 года назад +1

      do you mean data@colData@listData$primary_diagnosis$My_chosen_feature ? or data@colData@listData$primary_diagnosis[data@colData@listData$primary_diagnosis == My_chosen_feature] ?

    • @stretch8390
      @stretch8390 2 года назад

      @@LiquidBrain Thanks! Kept running into trouble because of NAs. These containers are hard to get the hang of subsetting, filtering and cleaning if you feel like releasing more videos on those I'd be grateful.