search for: hholli

Displaying 20 results from an estimated 29 matches for "hholli".

Did you mean: hholly
2018 Feb 13
0
plotting the regression coefficients
Hi scale_colour_gradient(?red?, ?blue?) should do the trick. Actually I found it by Google ggplot colour http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/ http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots question. So you could find it too and probably far more quickly then myself as I have also other duties. Cheers
2018 Feb 12
2
plotting the regression coefficients
Hi Petr and Richard; Thanks for your responses and supports. I just faced a different problem. I have the following R codes and work well. p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta), colour=factor(sign(Beta)))) + theme(axis.text=element_text(size = 5)) p1<-p+geom_point() p2<-p1+theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
2018 Feb 12
3
plotting the regression coefficients
Hi After melt you can change levels of your factor variable. Again with the toy example. > levels(temp$variable) [1] "y1" "y2" "y3" "y4" > levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)] > levels(temp$variable) [1] "y2" "y4" "y1" "y3" > And you will get graphs with this new levels ordering.
2018 Feb 12
0
plotting the regression coefficients
Petr, there was a thinko in your response. tmp <- data.frame(m=factor(letters[1:4]), n=1:4) tmp tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right tmp[order(tmp$m),] tmp <- data.frame(m=factor(letters[1:4]), n=1:4) levels(tmp$m) <- c("c","b","a","d") ## wrong tmp[order(tmp$m),] changing levels
2018 Feb 12
0
plotting the regression coefficients
Hi Petr; Thanks so much. This is great! Although last Sunday, alternatively, I have solved the problem using the following statement at the very end of the program. * ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize = F, dpi=300).* This works very well too. Asa my categorical variables are in my Y axis, my R program reorders the names on Y-axis. However, I would
2018 Feb 12
2
plotting the regression coefficients
Hi Maybe there are other ways but I would split data to several chunks e.g. in list and use for cycle to fill multipage pdf. With the toy data something like library(reshape2) library(ggplot2) temp <- melt(temp) temp.s<-split(temp, cut(1:nrow(temp), 2)) pdf("temp.pdf") for (i in 1: length(temp.s)) { p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value),
2018 May 10
0
the first name of the first column
1. My name is Bert, not Brent; 2. I am not your private consultant -- always cc the list unless you have good reason not to. I have done that here. It looks like this is what you want; if so, you really need to go through an R tutorial or two to learn the basics: d <- structure(list(region = structure(c(1L, 1L, 1L, 1L), .Label = "zilan", class = "factor"), Fe_ppmtp =
2018 May 10
4
the first name of the first column
Dear all; I need to run heatmap. Because my first column in my data is alphanumeric, I can not run as.matrix(scale(my_data)). So I need to make my data readable as in data(mtcars). In *mtcars *data the first column is alphanumeric and has no name. Thanks, Greg [[alternative HTML version deleted]]
2017 Jun 16
0
point size
You could add size = log10_P to the aes() inside geom_point(). Untested code below. See also http://ggplot2.tidyverse.org/reference/geom_point.html ggplot(mydata, aes(x = X, y = log10_P)) + theme_bw() + theme(panel.border=element_blank(), legend.position="top", axis.text=element_text(size = 8)) + geom_point(aes(color = Traits, size = log10_P)) Jean On Fri, Jun 16, 2017 at
2018 Feb 08
0
plotting the regression coefficients
Fwiw, encoding magnitude in color is generally a bad idea. Using area(*not* radius) is also not great, but maybe it will work for you. See here for some explanation: https://www.amazon.com/Visual-Display-Quantitative-Information/dp/0961392142/ref=sr_1_1?s=books&ie=UTF8&qid=1518092778&sr=1-1&keywords=Tufte Bert On Feb 7, 2018 11:13 PM, "greg holly" <mak.hholly at
2017 Jun 16
2
point size
Hi all; I am running the following ggplot codes. Runs well. However, I need to reflect the numeric values of the log10_P to the point size in the graph. Your help highly appreciated, Regards, Greg p <- ggplot(mydata, aes(x = X, y = log10_P)) + theme_bw() +theme(panel.border=element_blank()) + theme(legend.position="top", axis.text=element_text(size = 8)) (p1 <- p +
2018 May 30
0
par(mfrow=c(3,4)) problem
Hi, You're mixing base plot and ggplot2 grid graphics, which as you've discovered doesn't work. Here's av strategy that does: https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html This vignette has a good overview, well as info specific to that package. Sarah On Wed, May 30, 2018 at 4:43 AM greg holly <mak.hholly at gmail.com> wrote: > Hi all; >
2018 Feb 10
0
plotting the regression coefficients
Hi Peter; The R code you provided works very well. Once again thanks so much for this. The number of variables in my data set that should appear on the y-axis is 733 and they are not numerical (for example the name of one variable is *palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**. So, the plot looks very messy in one page. How can I make the plot to print out on multiple pages? Regards,
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks so much. Exactly this is what I need. I will play to change color and so on but this backbound is perfect to me. I do appreciate your help and support. Regards, Greg On Thu, Feb 8, 2018 at 1:29 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > I copied your values to R, here it is > > > > > dput(temp) > > > > temp <-
2018 May 30
4
par(mfrow=c(3,4)) problem
Hi all; I need to put 12 different plot2 into the same matrix. So my array for the matrix will be par(mfrow=c(3,4)). I am running ggplot2 to produce my 12 plots. For some reason, par(mfrow=c(3,4)) did not turn out 3*4 matrix. my basic R codes for each plot is par(mfrow=c(3,4)) library(ggplot2) p <- ggplot(a, aes(x=Genotypes, y=Plant_hight, size=Plant_hight, color=Showing_rate)) + . . Best
2018 Feb 19
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi When you load external file to R, character variables are converted to factors by default and alphabetically sorted. I have limited connection to internet, so I cannot find the answer, you could try it yourself. Maybe you could try not to convert vector with names to factor, which, for plotting issue is not different from factor coding. See ?read.table for details However I am not sure if it
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; I would like to get a plot with names as they are in the original file. They are chemical names and I have 733 in the my file. For example, let me give to chemical names "*2-hydroxybutyrate/2-hydroxyisobutyrate*" and "*palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**" .So, what should I put [c(2,3,1)] part in the command: iris$MySpecies<-factor(iris$Species,
2017 Sep 19
2
remove quotes from matrix
Hi Duncan and Bert; I do appreciate for your replies. I just figured out that after x1= noquotes(x) commend my 733*22 matrix returns into n*1 vector. Is there way to keep this as matrix with the dimension of 733*22? Regards, Greg On Tue, Sep 19, 2017 at 10:04 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 19/09/2017 9:47 AM, greg holly wrote: > >> Hi all;
2017 Sep 19
0
remove quotes from matrix
Works fine for me. What do you object to in the following? Calling the above df "d", > dm <- as.matrix(d) > dm Sub_Pathways BMI_beta SAT_beta VAT_beta 1 "Alanine_and_Aspartate" " 0.23820" "-0.02409" " 0.94180" 2 "Alanine_and_Aspartate" "-0.31300" "-1.97510" "-2.22040" 3
2017 Aug 04
1
legend and values do not match in ggplot
I have following codes for ggplots. The legends are given in the plot do not match with the values specified in the codes given below. Your helps highly appreciated. Greg library(ggplot2) p <- ggplot(a,aes(x=NO_BMI_FI_beta ,y=FI_beta ,color= Super.Pathway))+ theme_bw() +theme(panel.border=element_blank()) + geom_point(size=3) p2<-p+scale_color_manual(name="Super.Pathway",