Questions tagged [ggpairs]

71 questions
0
votes
2 answers

Change default colors in ggpairs using variable assignments

I have code to create a scatterplot matrix with density curves that I want to be colored based on a categorical variable in the data set. I need it to match a specific color, but I can't seem to get the colors to update from the default. Below is an…
data_life
  • 387
  • 1
  • 11
0
votes
2 answers

Relabelling facets using ggpairs

I am using this code: printVar = function(x,y){ vals = cor.test(x,y, method="spearman")[c("estimate","p.value")] names(vals) = c("rho","p") paste(names(vals),signif(unlist(vals),2),collapse="\n") } ggpairs(baseline_sbp,…
jtjtjtjt
  • 105
  • 6
0
votes
0 answers

Extract the last entire column from ggpairs

I want to extract the last column (n 12) of the entire matrix of graphs made with ggpairs in R. The "column" function, optional in ggpairs, allows me to reduce the columns with which to create the graph matrix and not to cut the final graph…
Gaetano C.
  • 11
  • 5
0
votes
0 answers

Error in eval(mapping$x, data) in R: Error in stats::model.frame(formula = x, data = y) : object 'x' not found GGally::GGpairs function

I am trying to customize my ggpairs function and I for that I am using a data.frame that I have imported from keggle. Here is a minumum reproducible example: BMI = c(1,2,3,4,5,6,7,8) Glucose = c(0.4, 0.3, 0.6, 0.4, 0.7, 1, 0.9, 0.5) example_df =…
Pablo Rodriguez
  • 233
  • 1
  • 10
0
votes
2 answers

Subsetting plots in R with pairs function

I have a simple question however I can't find the answer. I have a dataset in R with 1000 rows and 5 columns as follows: data <- matrix(rnorm(1000 * 5, mean = 0, sd = 1), 1000, 5) colnames(data) <- c("A", "B", "C", "D", "E") I want to visually…
nickolakis
  • 621
  • 3
  • 7
0
votes
1 answer

Save ggpairs figures created by lapply into single pdf

I am trying to generate several figures using ggpairs and save them all in a single PDF. The code below is a simplified version of what I would like to accomplish. The error is included as well. I am able to generate the figures, but not able to…
Bennet K
  • 3
  • 2
0
votes
1 answer

ggpairs what is the name of the column with the facets?

I am trying to add text to a ggpairs plot. I have created my own data frame with columns for the x and y positions and the labels. However, I do not know what to name the column that contains the facet labels. In the context of the example below: I…
serwaah
  • 3
  • 3
0
votes
2 answers

Extract the last row of a pairs plot in R

I have created this pairs plot of a 10X10 data frame. I am interested in extracting only the last row, as it shows the covariates (on x axis) against the response parameter of interest (on y axis) for each covariate. I have used basic R pairs plot,…
0
votes
1 answer

Error in R: could not find function "ggpairs"

rom a tutorial I'm using, the exercise is to run this code below. library(datasets) data(iris) View(iris) library(GGally) ggpairs(iris, mapping=ggplot2::aes(colour = Species)) However, when I run it I get the following error: Error in…
Lisa Write
  • 13
  • 1
  • 5
0
votes
0 answers

R GGally Package ggpairs function correlation asterisks

I am using the ggpairs functionality and having the correlation info appear in the upper boxes. What I am unable to find anywhere is that some of the values displayed have three asterisks next to them while some do not Can someone school me as to…
dfaberjob
  • 41
  • 6
0
votes
1 answer

Change the Font Size of pairs_text in pairs plot (base R)

I am using pairs to plot mosaic plots of various variables in the SleepStudy dataset. SleepStudy_factors <- SleepStudy[sapply(SleepStudy, is.factor)] SleepStudy_factors <- table(SleepStudy_factors) pairs(SleepStudy_factors, diag_panel =…
Vijay Kalmath
  • 178
  • 11
0
votes
0 answers

How to create different ggpair scatterplot limits for the columns/rows?

In ggpairs, how can I create different scales in cells? I created the plots, but what the function I have now is using the same scales for the scatterplots. I need to compare multiple different ggpair plots to see how they end up evolving, but this…
0
votes
1 answer

How to enhance resolution of ggairs plot when ggsave not working

I'm trying to save a rather large ggpairs file. For some reason I can't get ggsave to work on my device (the file is created but it's blank no matter the plot, file type etc.) so I have been manually right clicking on save image as on the…
0
votes
1 answer

Is there a way that I can solve or stop this error problem in cardinality_threshold?

I have about 17 soil variables that I'd like to run correlations with elevations, temperature and rainfall against species richness and abundance. I have 39 plots (rows) and the columns contain, environmental variables such as elevation, abundance,…
0
votes
1 answer

How to get a scatter matrix consisting of just scatterplots with a 1:1 line, and good axis labels?

I want to have a matrix of just scatterplots in which a 1:1 line is present. The data has the following structure: bulk_SIC_25 <-…
Guuz
  • 3
  • 2