R Programming for beginners | Correlation Matrix in R using Cor package
HTML-код
- Опубликовано: 6 сен 2024
- How to use Cor function in R Studio.
How to draw correlation matrix using Pearson, Kendell and Spearman methods.
How to draw different shapes of correlation matrix.
Thanks for the video Sir. I have to use a colorRampPalette to see colors on the plot.
corrplot (Time, method = "color", col = colorRampPalette(c("blue", "white", "red"))(200),
type = "upper", order = "hclust", addCoef.col = "black",
tl.col = "black", tl.srt = 45, diag = FALSE)
excellent work I tried your code and it works, eager for more videos from your side....
it was really a great help thank you so much for giving very simple and precise details.
I don’t work with my data?
Great help sir !
Thank you very much, I am a big fan of R and wanted to use it for quite long. Your this video made things very easy. However, it would be so nice of you, if you let me know how to highlight significant values in correlation and the confidence level (eg 99.99% or 95%). Secondly, do you have any video on PCA/FA and Cluster Analysis in R using water quality data?
Thank you, Just update the values portion, please send me the your code, and query, i will update them for you.
@@softwaresforcivilengineeri7947
I am using the code you developed, however, I just want to add the significant values or star on in final diagram. The code is given below.
> corrplot(m, method=“color”, col = col(200), type = “upper”, order= “hclust”, addCoef.col = “black”, tl.col = “black”, tl.srt = 45, diag = FALSE)
@@softwaresforcivilengineeri7947 similarly, used your code for box wicker plots and it worked well. However, can you help to show the box plots using logarithmic y axis. Because in my case some of values are too small and some other too large and box plots with small cant be seen properly. The log scale can solve this issue
Thank you Sir for your nice tutorial. How can I put asterisk (***) in the method argument instead of number please?
how can we combine summary of statistics and correlation plot in one diagram. thanx
Nice one thanks
thank you
nice video very useful but i got this following error how to solve corrplot(m,method = "color",col(200),type = "upper", order = "hclust", addCoef.col = "black", tl.col = "black", tl.srt = 45, diag = FALSE)
Error in col(200) : a matrix-like object is required as argument to 'col'
Thanks!
Aselamua'leyikum werahmetulah, I ahve sort of data would you help me by analysing the correlation between variables by using R software
W salam, please share your data. ,m.irfanswat@gmail.com
I am facing attach error. When I type attach(correlation_matrix), correlation_matrix is not listed in drop down list. Kindly help.
correlation_matrix is basically my data name. if you have the data in excel format. just upload it to R in the same manner. and you can give it the name correlation matrix.
I found this error , can you help ? "Error in corrplot::corrplot(HVI_Indicators_2021, method = "number") :
The matrix is not in [-1, 1]!"
Send me your code and data. I will correct it.
Good
Sir,
Kindly help me solve following issue:
Error in attach(correlation_matrix) :
object 'correlation_matrix' not found
Thanks in advance!!
correlation_matrix is basically my data name. if you have the data in excel format. just upload it to R in the same manner. and you can give it the name correlation matrix.
@@softwaresforcivilengineeri7947 Thank You.
Thank you for the question and answer ❣️
Can u please make a videos on Gene expression Analysis using R packages from base to advance ??
I will make such type of video in couple of days. thank you
Nice. I successfully create the circle, number, and pie. But, the last one the upper triangle; it did not work by showing : Error in col(200) : a matrix-like object is required as argument to 'col'. Kindly help
Can you send or copy here the comment/script for the upper triangle one please
@@daveandrew Thank you for your comments, first please save the col(200) type with a unique variable e.g "colour=col(200) and then run the above code. Also install the concerned packages used for colors.
@@softwaresforcivilengineeri7947 thank you. Do you have a video to create circular plot in R?
Sir
Please tell me in which condition we use Pearson, spearman,and Kendall correlation?
when you do not mention the type of correlation to R. it will take Pearson correlation by default. But if you want to draw another type of correlation, then you need to mention that type. the only difference is in the formula. if you want the detail I will share them with you.
When should you use Pearson, Spearman or other?
@@softwaresforcivilengineeri7947 Hi!! I want to draw Spearman correlation, how do i do this mention in R?
@@cintiacristinadacostafreir7694 just type spearman instead of Pearson.
Sir, first of all I'd like to thank you for this correlation matrix video. It has been really usefull.
Please help me with the following error:
> cor(dados, method = "spearman") #"dados" is my data name
Error in cor(dados, method = "spearman") : 'x' must be numeric
Please arrange your data. i think your data have some non numeric values. All the rows and columns of the data must be numeric. if then you face the problem please share your data.
Hello. Thanks for your great video. When I tried the code for upper matrix type, I got this error: Error in col(200) : a matrix-like object is required as argument to 'col'
Would you please help me figure out the reason?
col(200) needed another package to install. just remove this col(200). or install package for colors in R.
Kindly tell how to install package for colors in R
Even after deleting Col(200) some error is showing kindly help to get through it
Could not find function corrplot?
First (install.packages"corrplot")
Then library "corrplot"
Please share video on lag1 auto-corellation
Yes.. I will share one video.
Please share the R code... such demo are of no use if you really teach
Dear if you see the video, the R code is there.. But if you want the same code.. From now i will share the code also
@@softwaresforcivilengineeri7947 we are seeing your video and keeping seeing
Sir, I have Error in col = col(200), please help me?
I know this causes some time an error..just erase this one..col=col(200) .and run the remaining code
If not run then tell me..I will correct it
@@softwaresforcivilengineeri7947 erase is Ok, bro. But the chart is not good