Тёмный

Learn to plot Data Using R and GGplot2: Import, manipulate , graph and customize the plot, graph 

Rajendra Choure
Подписаться 8 тыс.
Просмотров 37 тыс.
50% 1

#ggplot2 #rprogramming #datavisulisation #tidyr #dplyr
In this video i explained the procedure to get publication ready plot.
Data import, data frame, how to understand the data in data frame, how to plot basic ggplot( scatter plot as example). how to add smooth line, adding labels - title, subtitle, caption, axis label, getting long table using pivot longer function, summarizing data using dplyr function summarize and gather, how to modify the code to get different plot types like boxplot, violin pot have been explained.
Facebook page:
/ rajendrachoureisc
Mail Id:
rajuchoure@gmail.com
youtube playlist:
• R programming tutorials
#Code used in this tutorial ( You can copy-paste from this downward.)
data file link : drive.google.com/file/d/1JPJu...
setwd("D:/Rworks/datatoplot") # Change working directory to directory where your data file is saved
getwd()
df = read.csv("polyphenolassay.csv")
df
summary(df)
str(df)
plot(df)
install.packages("ggplot2")
library(ggplot2)
ggplot(df, aes(conc,rep1))+
geom_point()+
geom_point(aes(y=rep2),color="red")+
geom_point(aes(y=rep3),color="green")+
geom_smooth(method="lm",formula=y~x-1,se=0)+
geom_smooth(aes(y=rep2),method="lm",formula=y~x-1,se=0,color="red")+
geom_smooth(aes(y=rep3),method="lm",formula=y~x-1,se=0,color="green")+
theme_classic()+
labs(title="Estimation of Polyphenol Content",subtitle="Folin Dennis Method",caption="Exepriment conducted as biochemistry lab",
x="Concentration of polyphenol in mcg/ml",y="OD795nm")
install.packages("tidyr")
library(tidyr)
df_long= pivot_longer(df,cols=2:4,names_to = "rep",values_to = "OD795")
df_long
str(df_long)
ggplot(df_long, aes(conc,OD795,color= rep))+
geom_point()+
geom_smooth(method="lm",formula=y~x-1,se=0)+
theme_classic()+
labs(title="Estimation of Polyphenol Content",subtitle="Folin Dennis Method",caption="Exepriment conducted as biochemistry lab",
x="Concentration of polyphenol in mcg/ml",y="OD795nm")
install.packages("dplyr")
library(dplyr)
I have removed the pipes as angled brackets are not allowed in description
df_summary= group_by(df, conc)
df_summary= summarise(df_summary, mean_OD795=mean(OD795))
ggplot(df_summary, aes(conc,mean_OD795))+
geom_point()+
geom_smooth(method="lm",formula=y~x-1,se=0)+
theme_classic()+
labs(title="Estimation of Polyphenol Content",subtitle="Folin Dennis Method",caption="Exepriment conducted as biochemistry lab",
x="Concentration of polyphenol in mcg/ml",y="OD795nm")
ggplot(df_long, aes(rep,OD795,color= rep))+
geom_boxplot()+
theme_classic()+
labs(title="Estimation of Polyphenol Content",subtitle="Folin Dennis Method",caption="Exepriment conducted as biochemistry lab",
x="Concentration of polyphenol in mcg/ml",y="OD795nm")
ggplot(df_long, aes(rep,OD795,color= rep))+
geom_violin()+
geom_jitter()+
theme_classic()+
labs(title="Estimation of Polyphenol Content",subtitle="Folin Dennis Method",caption="Exepriment conducted as biochemistry lab",
x="Concentration of polyphenol in mcg/ml",y="OD795nm")

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

 

28 янв 2022

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@mdmahabubarefinchowdhury7944
Thank you very much for sharing.
@Sakkeo98
@Sakkeo98 2 года назад
Ty Nice vídeo greetings from Ecuador South America 😀😀
@shamseltaher7197
@shamseltaher7197 2 года назад
Great job
@mebratuify
@mebratuify Год назад
Great. Thank you very much @Rajendra!
@DevResearch
@DevResearch Год назад
Most welcome! so nice of you.
@afonsoosorio2099
@afonsoosorio2099 Год назад
Awesome 👌, well structured, delivered and very informative 👏 👏
@DevResearch
@DevResearch Год назад
Thanks a lot for these good words.
@TWA356
@TWA356 7 месяцев назад
Classic!!!
@happylearning-gp
@happylearning-gp Год назад
Excellent tutorial on ggplot2. thank you very much
@DevResearch
@DevResearch Год назад
Thank you very much. This appreciation will motivate me.
@aelhamamy
@aelhamamy Год назад
One of the best introductory ggplot2 videos out there! Thank you, sir.
@DevResearch
@DevResearch Год назад
Thanks for the appreciation
@saidmirajuddin7912
@saidmirajuddin7912 9 месяцев назад
Great sir. Waiting for many more videos like this.
@DevResearch
@DevResearch 9 месяцев назад
Glad you liked it.
@abdulqadirmalic1233
@abdulqadirmalic1233 7 месяцев назад
you have explained it very well :) please keep posting such stuff
@DevResearch
@DevResearch 7 месяцев назад
Thanks you liked it. Please like and share my other videos also. It helps my channel to grow.
@farahkafauit8996
@farahkafauit8996 11 месяцев назад
best lecture.Thankyou
@DevResearch
@DevResearch 11 месяцев назад
So nice of you
@BrokenSofa
@BrokenSofa Месяц назад
Thank you man, you've saved my master thesis
@DevResearch
@DevResearch Месяц назад
Do watch my other videos also. Those are also useful.
@judethaddeausadjei8989
@judethaddeausadjei8989 9 месяцев назад
Wow....thank you so much
@DevResearch
@DevResearch 9 месяцев назад
You are so welcome! Please share word about my channel.
@karmatempa133
@karmatempa133 2 года назад
Wonderful, thank you.
@DevResearch
@DevResearch 2 года назад
Glad you liked it. Please share with your friends do watch my otHer videos also.
@karmatempa133
@karmatempa133 2 года назад
@@DevResearch Sure sir.
@DB-kv3wu
@DB-kv3wu 3 месяца назад
Best, thanks!❤❤❤❤❤
@DevResearch
@DevResearch 3 месяца назад
Thanks for appreciation.
@besttiktokcompilation3013
@besttiktokcompilation3013 2 года назад
Thank you very much
@DevResearch
@DevResearch 2 года назад
Glad you like it. Please subscribe , of yiu have not and share it with friends. Also watch my other videos also.
@Khalid-tg1kf
@Khalid-tg1kf 2 года назад
Thank you so much dear
@DevResearch
@DevResearch 2 года назад
Glad you liked it. Please watch my other videos also and share with your friends.
@beatricebortoli3264
@beatricebortoli3264 3 месяца назад
❤‍🔥
@kunalmadhav09
@kunalmadhav09 2 месяца назад
Ecellent video on R
@DevResearch
@DevResearch 2 месяца назад
Thanks for the appreciation. Please do share with your contacts.
@shanyamrana9675
@shanyamrana9675 4 месяца назад
Thankyou
@DevResearch
@DevResearch 4 месяца назад
Glad that it helped. Please share with your friends.
@v.c.jayaramaiah4815
@v.c.jayaramaiah4815 Год назад
gge bi plot analysis is very interesting giving commands are of unknown lessons where to learn writing commands to R studio are there tutorials to standardize R pacakage thank you sir
@yahayaibrahim6790
@yahayaibrahim6790 2 года назад
Sir, is very nice presentation. Can u please show us how to prepare it with netcdf files. Thank you
@DevResearch
@DevResearch 2 года назад
I will. Very soon.
@sukumartaria3582
@sukumartaria3582 2 года назад
Dear sir pls make vedios on GBbiplot and PCA analysis.....again requesting for data analysis for alpha-lattice design
@DevResearch
@DevResearch 2 года назад
I will ,very soon
@johnhenry5223
@johnhenry5223 2 года назад
sir,..i want to see you plotting a bar graph that have x=conc and y axis to represent atleast two replicate,.
@DevResearch
@DevResearch 2 года назад
sorry for replying late. I didn't understand it at first glance. But when i started planning , it struck: x axis is concentration(numeric) and for bar axis Y needs to be numeric to be height. If replicates are required in Y, then the height must be summary of replicates, if continuous normally distributed reading we can use mean as height else median or mode. This can be done if you want to treat the x axis as a categorical to visualize pattern in Y. This can be done well using line plot, treating x as continuous axis. may be bit verbose, but hopefully , I am clear enough.
@shreyadubey1777
@shreyadubey1777 2 года назад
how to plot correlogram with only significant values represented in stars(*)?
@DevResearch
@DevResearch 2 года назад
Try This library(corrplot) #change the corrplot function trace(corrplot, edit=TRUE) M
@aliaqdas9995
@aliaqdas9995 10 месяцев назад
Sir whenever I type df = read.csv("filename.csv"). it says there is no such file in directory. what should I do now?
@DevResearch
@DevResearch 10 месяцев назад
Set your working directory. setwd("\path of file") To see in which directory you are working getwd()
@syedzada9332
@syedzada9332 Год назад
I want to plot result of mankendell test..
@DevResearch
@DevResearch Год назад
MannKendall() test from Kendall package will provide you kendalls tau and p value. You can visualise the trend by adding smooth line by loess to the timeseries plot. Using following code plot(ts) lines(lowess(time(ts),ts), col='blue')
@fariyaakter6144
@fariyaakter6144 11 месяцев назад
Can I do the same thing using SPSS?
@DevResearch
@DevResearch 10 месяцев назад
Yes, with a little steep learning curve if you are familiar with R. If not SPSS will help you to do it with little compromise on you expecations as it offers click based interface. R certainly provide more customisation opprtunity.
@fariyaakter6144
@fariyaakter6144 10 месяцев назад
Thank you so much sir
@tomaszuspienski4833
@tomaszuspienski4833 10 месяцев назад
This plots can't be published. I don't know any respected journal that would publish plots of replicates. You need to plot means, calculate an error metric like SD, and add it to the plot. Then it would be ready. Also who plots 3 regression lines, one for each replicate? You need only one regression line for their means. 3 lines obscure the plot and doesn't make it publication ready.
@DevResearch
@DevResearch 9 месяцев назад
These are exploratory plots. One cant learn publication ready plots without practicing a lot. These exploratory plots train to get publication ready plots.
Далее
Statistical modelling of data using R One Day Workshop
2:52:27
Scatter plot and Line plot in R (using ggplot2)
22:28
Multi-Panel Plots in R (using ggplot2)
12:18
Просмотров 37 тыс.
Barplot and column plot using R (ggplot)
13:03
Просмотров 26 тыс.
ggplot2 explained in 5 minutes!
5:37
Просмотров 33 тыс.