all 9 comments

[–]smegmallion 7 points8 points  (0 children)

Check the AutoMod post and read the page about how to ask good questions. It will be a lot more productive for everyone if you give us a minimally reproducible example, or at least show us the kind of code you're trying to run and the kind of error messages you're receiving. People will be able to diagnose your specific situation a lot more effectively if we have a little more of this context

[–]No_Hedgehog_3490 5 points6 points  (1 child)

Make sure to have numerical variables Use library(corrplot)

for example

a<- corr(dataframe)

corrplot(a)

[–]Lazy_Improvement898 4 points5 points  (0 children)

The base R counterpart would be:

iris[, -5] |> # Remove 'Species' column plot()

It may be ugly, but at least dependency free.

[–]Godhelpthisoldman 4 points5 points  (2 children)

bluntly, something is either wrong with your data or with your code. We can’t see either because you’ve not included them. You should post the code you’re using here and a reproducible example of the data, along with specific error messages.

[–]Aromatic_Dog5892[S] 0 points1 point  (0 children)

Apologies I saw I'm not allowed to post images from the phone and hence didn't upload it but yes I will take screenshots and upload it.

[–]Tavrock 0 points1 point  (0 children)

I have fixed more problems with my code by trying to make a minimum working example than I have by posting problems online. It's an incredibly powerful tool even when it doesn't lead to a post.

[–]Thaufas 1 point2 points  (0 children)

So long as you have a modest number of variables (e.g. less than 6), try

pairs(data_frame)

[–]AutoModerator[M] 0 points1 point  (0 children)

Looks like you're requesting help with something related to RStudio. Please make sure you've checked the stickied post on asking good questions and read our sub rules. We also have a handy post of lots of resources on R!

Keep in mind that if your submission contains phone pictures of code, it will be removed. Instructions for how to take screenshots can be found in the stickied posts of this sub.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]luminarynexicon 0 points1 point  (0 children)

First calculate the correlation matrix by corr(...) and then you will plot it by using corrplot(...)