I just recently discovered your channel and I have to say, I love the content. I've learned a lot because you explain everything in detail and go through examples. You have my subscription lol I hope to continue learning more from you!!
Hi Juan! Thanks for the amazing comment, great to hear that our channel is that helpful for you! We try our best to keep it up that way;) If you have any questions/suggestions, please let us know!
Hello! Thanks for the video. I have a dataset with just 4 rows which I want to average, but across thousands of columns. Is there a way to simultaneously average all rows under each column, so that I have just one row of means under my thousands of columns?
Thank you for your videos they are so helpful and you teach so well however in my data frame, my rows have 5 treatments and in each treatment, I have 3 results - how can I calculate the mean per treatment without having to separate each treatment - thank you and best regards
thanks for your tutorials. I watched several of them but am still unsure how to calculate the mean for specific levels of different factors. for example, I want the mean of reaction_time for task A (in the factor task which is a column in data just the participants who did A ), and for correct trials(there is another factor called to answer and I want only the correct one to be calculated not wrongs). I would appreciate you introducing a function.
Hello Saba, You can use the group_by() function to implement statistical operations by the factor levels. See our tutorial: statisticsglobe.com/mean-by-group-in-r Regards, Cansu
I would have a question. What if i want to calculate several means within one column. For example i have following dataset: Colour Number Black 2 Black 4 Brown 6 Brown 3 Black 6 Brown 3 And i want to calculate the mean for Black and for Brown. Thx in advance!
Thank you very much! However, what if I need to calculate the mean of two collumns like this: (Same task, two teachers) Teacher 1 Teacher 2 MEAN 5 6 5.5 6 7 6.5 7 8 7.5
Why dont you show how to exclude few columns and take the means of the rest seperately? And other thing is getting the mean of only numerics. And the laat thing is combinjng the two?
Hey Alesta, I have plenty of other tutorials that can be combined with this one. For instance: statisticsglobe.com/extract-certain-columns-of-data-frame-in-r statisticsglobe.com/select-only-numeric-columns-from-data-frame-in-r Regards, Joachim
@cansustatisticsglobe Yes ✔️,Exactly for few Columns only,then will Square those values for Entire column to do away with Negative Sign if any,Kindly Help How its Done ❓️
I invested too many hours watching R videos with 'hundred-thousands views' and alas, your video solved my puzzle. Thank you
Thank you, glad it helped! :)
I just recently discovered your channel and I have to say, I love the content. I've learned a lot because you explain everything in detail and go through examples. You have my subscription lol I hope to continue learning more from you!!
Hi Juan! Thanks for the amazing comment, great to hear that our channel is that helpful for you! We try our best to keep it up that way;) If you have any questions/suggestions, please let us know!
Thanks a million sir,
For the effort,time invested and the VALUE you are ADDING to us!
You are very welcome, Seyison! Thanks for the motivating words and your support!
Thanks a lot for your content !!!! You are helping a lot of data professionals and data students.
Glad you think so mate! Thanks a lot for the kind words :)
If I go to heaven, I will take you with me!
:D That would be great!!
Hello! Thanks for the video. I have a dataset with just 4 rows which I want to average, but across thousands of columns. Is there a way to simultaneously average all rows under each column, so that I have just one row of means under my thousands of columns?
Hello,
I think you can use the following code to implement it.
data
Thank you for your videos they are so helpful and you teach so well however in my data frame, my rows have 5 treatments and in each treatment, I have 3 results - how can I calculate the mean per treatment without having to separate each treatment - thank you and best regards
Thank you so much for the wonderful feedback Dominique! You can calculate the mean by group as shown here: statisticsglobe.com/mean-by-group-in-r
thanks for your tutorials. I watched several of them but am still unsure how to calculate the mean for specific levels of different factors. for example, I want the mean of reaction_time for task A (in the factor task which is a column in data just the participants who did A ), and for correct trials(there is another factor called to answer and I want only the correct one to be calculated not wrongs). I would appreciate you introducing a function.
Hello Saba,
You can use the group_by() function to implement statistical operations by the factor levels. See our tutorial: statisticsglobe.com/mean-by-group-in-r
Regards,
Cansu
This is pretty good even for revision of learned concepts...
Thanks a lot Shivham, glad it helped! :)
I would have a question. What if i want to calculate several means within one column.
For example i have following dataset:
Colour Number
Black 2
Black 4
Brown 6
Brown 3
Black 6
Brown 3
And i want to calculate the mean for Black and for Brown.
Thx in advance!
Hey Lorenz, please have a look at this tutorial: statisticsglobe.com/mean-by-group-in-r Regards, Joachim
@@StatisticsGlobe You are amazing Joachim! Thx a lot
You are very welcome Lorenz, glad it helped! :)
Thank you very much! However, what if I need to calculate the mean of two collumns like this:
(Same task, two teachers)
Teacher 1 Teacher 2 MEAN
5 6 5.5
6 7 6.5
7 8 7.5
Would it work: data$mean
Hey Larissa, exactly, this is how it should work.
@@StatisticsGlobe thank you!!
You are very welcome! :)
what if I want to calculate mean of particular item from the column "word" in 2 different conditions, for example
cond word rt
A 8 10
B 8 19
Hey Zak, I'm not sure if I understand your question correctly. Could you illustrate the desired result of your example data?
Thanks for the video
Thanks Andrei, glad you liked it!
Tank you ..
You are very welcome Michael! :)
Why dont you show how to exclude few columns and take the means of the rest seperately? And other thing is getting the mean of only numerics. And the laat thing is combinjng the two?
Hey Alesta, I have plenty of other tutorials that can be combined with this one. For instance:
statisticsglobe.com/extract-certain-columns-of-data-frame-in-r
statisticsglobe.com/select-only-numeric-columns-from-data-frame-in-r
Regards, Joachim
How to calculate the mean of selected column ?
I have 5 columns but I want the mean of last 3 columns
Hey Arthy, please try this: colMeans(data[ , (ncol(data) - 2):ncol(data)])
@@StatisticsGlobe thankyou very much sir
You are very welcome Arthy!
Wanna Create Only Deviations from Mean for Entire Column❓️
Hello Hassan,
Do you want to calculate the differences from the mean for each entry in a column?
Best,
Cansu
@cansustatisticsglobe Yes ✔️,Exactly for few Columns only,then will Square those values for Entire column to do away with Negative Sign if any,Kindly Help How its Done ❓️
Hello @@Hassan_MM.,
I think you can simply implement this:
# Example data frame
df
@@cansustatisticsglobe That's Works Magic 💯♥️ Thanks✔️
Perfect! Welcome @@Hassan_MM..