Thank you so much, Pat!!!! As a beginner to R, this video was very easy to follow & helped me transform my data into a dist matrix. I am so appreciative!!
@420npc2 жыл бұрын
Thanks a bunch for this series. Your videos are really clear, and practical. I’ve recommended your videos to everyone on my team!
@Riffomonas2 жыл бұрын
Wonderful! Thanks for spreading the word 😊
@mikep88572 жыл бұрын
I love the trick of comparing two character strings using < or >. Very nice.
@Riffomonas2 жыл бұрын
You have to think a little about what’s going on but it’s pretty slick. Thanks for watching!
@sven9r2 жыл бұрын
Thank you for this video! And of course for advice and help earlier. The video was already shared with the other people in my department.
@Riffomonas2 жыл бұрын
Fantastic!
@siriyaksiriyak60672 жыл бұрын
good ideas for matrix diagonal extraction for PCA
@Riffomonas2 жыл бұрын
Thanks for watching!
@caty8632 жыл бұрын
I am confused as to which package *pivot_** functions belong to. I thought that should be *tidyr* but I realized the functions still work fine with only *dplyr* loaded.
@Riffomonas2 жыл бұрын
Hi Caty! It is tidyr but I’m sure dplyr uses tidyr as a dependency to work with tibbles
@caty8632 жыл бұрын
@@Riffomonas Yeah, that might be the case then. I strive not to load the the whole *tidyverse* thing; I like to keep my environment lean that way. So, I have to know where every function I call comes from.
@Riffomonas2 жыл бұрын
@@caty863 I think you could do tidyr::pivot_longer to load only that function without calling library(dplyr) or library(tidyr)
@hope2024-g Жыл бұрын
Thank you Sir for the nice tutorial. How can I convert pairwise distance matrix data (Bray-Curtis pairwise dissimilarity matrix) into continues variable Please ? I have collected plant species diversity and biomss from 25 sites. I want to assess relationship between Biomass and Beta diversity in r. As you know the biomass data from 25 sites is continues variable, while the Bray-Curtise pairwise distance data is a matrix. So how can I make linear regression using these Biomass as response variable and Bray-Curtis dissimilarity (beta diversity) as predictor Please ? Your help will be highly appreciated!
@cristianjaviermena6955 Жыл бұрын
The MANNNNNN
@dariushghasemi64762 жыл бұрын
Amazing video again! It took longer this time , didn't it? :)) Dear Pat! What happens if we want to repeat a multiple linear regression model like this lm(y ~ SNP[i] + biomarker[p]) for all the combinations of (i, p) -> (e.g if we have i=200 SNPs' dosage level and p=100 different quantitative traits like biochemical lab tests), so that we want to do sth like sensitivity analysis and take the Regression coefficients and their corresponding Pvalues in a neat and tidy dataframe for our publication. Map2_df does not work because it does not work like 2x for loop! Any idea will be appreciated, or even it's a great exercise for next videos to scale up more our advanced functioning and object oriented programming skills. Many thanks! Dariush
@sven9r2 жыл бұрын
Couldn't you use the broom package? You could run the 200 lms in a listed df and extract all the values you need. After that, you can use gtable:: to create a neat table
@Riffomonas2 жыл бұрын
I think Hadley or David Robinson have a video somewhere talking about this.
@dariushghasemi64762 жыл бұрын
@@sven9r Thank you so much for your suggestion. I've seen it in map functions manual in the help section, but I did not try it. I actually tried to run it by using subsequentially lapply and map, and then write another function to make the raw output in my desired format. I can later share my solution in my Github. Many thanks :)
@dariushghasemi64762 жыл бұрын
@@Riffomonas I'm seeking for it in David's channel but I don't think I can find it :( Thanks BTW
@dariushghasemi64762 жыл бұрын
@@Riffomonas I think you meant this talk by Hadley Wickham on "Managing many models with R". Sure, I'll have look again, maybe it's better to make up my mind again and apply their approach.