Тёмный

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

LiquidBrain Bioinformatics
Подписаться 20 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@xinking2644
@xinking2644 Год назад
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
@tonyrobinson9046
@tonyrobinson9046 Год назад
Thank you. Nice, but you seemed to rush things in the second half.
@musicspinner
@musicspinner 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 года назад
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.
@Merryberry1750
@Merryberry1750 Год назад
How do i get my R script to look like yours? Mine are not as funny and are often filled with sadness
@chrislam1341
@chrislam1341 3 года назад
in 15:31 line 93, why is it `assays(se)$count` but not `se@assays$count`? Thank you.
@LiquidBrain
@LiquidBrain 2 года назад
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.
@liancheefoong4309
@liancheefoong4309 3 года назад
Great explanation!
@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.
@fabiuspocus1430
@fabiuspocus1430 3 года назад
Thank you so much!
@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 года назад
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.
Далее
S3 Objects and Functions in R
16:28
Просмотров 3,7 тыс.
Gene Set Enrichment Analysis| GSEA algorithm
18:09
Просмотров 15 тыс.
A guide to our alphabet
20:08
Просмотров 186 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 811 тыс.
S3 and S4 Classes in R
25:48
Просмотров 1,2 тыс.
(Simplified) Linear Mixed Model in R with lme()
26:17
Object-Oriented Programming is Bad
44:35
Просмотров 2,3 млн