[R] Change the oder of stacked bar

2020-06-05 Thread Aimin Yan
I want to use the code below this message to make stacked bar plot, my question is : I want the stacked bar and its legend following the order as tr from left to right like the following: "100.0.250ng_CellLine_0" "75.25.250ng_CellLine_0" "50.50.250ng_CellLine_0" "10.90.250ng_CellLine_0"

[R] (no subject)

2020-06-05 Thread Aimin Yan
I want the stacked bar and its legend following the order as tr from left to right like the following: "100.0.250ng_CellLine_0" "75.25.250ng_CellLine_0" "50.50.250ng_CellLine_0" "10.90.250ng_CellLine_0" "1.99.250ng_CellLine_0" "0.100.250ng_CellLine_0" "100.0.500ng_CellLine_0"

Re: [R] ask help for ggplot

2020-06-05 Thread Aimin Yan
gle = 45, hjust = 1,size = 4)) > > > But this places "Others" at the top of each bar. > To move it to the bottom, instead of the code that creates 'g' run > > g <- unique(as.character(df$gene)) > i <- which(g == "Others") > g <- c(g[-i], g[

Re: [R] ask help for ggplot

2020-06-04 Thread Aimin Yan
Is there possible to generate a barplot in the following link using ggplot? https://photos.app.goo.gl/E3MC461dKaTZfHza9 here is what I did library(ggplot2) df <- read.csv(text= "trt,gene,freq,cols M6,ALDH16A1,100.000,red M6,Others,0.000,lightgrey M12,ALDH16A1,64.6638015,red

[R] ask help for ggplot

2020-06-04 Thread Aimin Yan
I have a question about using ggplot. Is there possible to generate a barplot like the attached file using ggplot? Thank you, Aimin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] color question

2019-02-27 Thread Aimin Yan
The attached is the heatmap. Thank you, Aimin On Wed, Feb 27, 2019 at 10:51 PM Aimin Yan wrote: > I have a question about assigning color based on the value of a matrix > > The following is my matrix. > > d > lateRT earlyRT NAD ciLAD >

[R] color question

2019-02-27 Thread Aimin Yan
I have a question about assigning color based on the value of a matrix The following is my matrix. d lateRT earlyRT NAD ciLAD lateRT 1.0 0.00 0.006224017 0.001260241 earlyRT 0.0 1.00 0.001425649 0.007418436 NAD 0.006224017

Re: [R] [FORGED] Re: Change the position of label when using R package eulerr

2018-09-17 Thread Aimin Yan
nd to the right 1mm in each > direction ... > > > x <- t$x > y <- t$y > > x[4] <- t$x[4] + unit(1, "mm") > y[4] <- t$y[4] + unit(1, "mm") > > grid.edit("quantities.grob", x=x, y=y) > > > ... is that the sort of thing

Re: [R] Change the position of label when using R package eulerr

2018-09-15 Thread Aimin Yan
y value of the 4th label "2" grid.edit("quantities.grob",x[[4]]=unit(-11.8262244206465, "native")) grid.edit("quantities.grob",y[[4]]=unit(-5.19720701058398, "native")) Error: unexpected '=' in "grid.edit("quantities.grob",x[

Re: [R] Change the position of label when using R package eulerr

2018-09-14 Thread Aimin Yan
unit(25.7349463488991, "native"), unit(-22.7610031110325, "native"), unit(14.5001560838519, "native"))) However, here I just want to change the x and y valu

[R] Change the position of label when using R package eulerr

2018-09-13 Thread Aimin Yan
I am using eulerr to get venn. My code is like: fit1 <- euler(c("ciLAD" = 785, "LAD" = 565, "nonXL_MEF" = 167, "ciLAD" = 3, "ciLAD_MEF" = 101, "LAD_MEF" = 541, "ciLAD_MEF" = 2),shape = "ellipse") plot(fit1,quantities = TRUE,fill = rainbow(7),lty =

[R] Change the position of label when using R package eulerr

2018-09-13 Thread Aimin Yan
I am using eulerr to get venn. My code is like: fit1 <- euler(c("ciLAD" = 785, "LAD" = 565, "nonXL_MEF" = 167, "ciLAD" = 3, "ciLAD_MEF" = 101, "LAD_MEF" = 541, "ciLAD_MEF" = 2),shape = "ellipse") plot(fit1,quantities = TRUE,fill = rainbow(7),lty =

[R] Format about Date and time

2009-03-14 Thread Aimin Yan
I have a data set like this: head(FormatedData) ID Target Actual Date Time 1 2030 0 -57.0 12/20/08 17:03:00 2 2030 90 90.0 12/20/08 18:41:00 3 2030 45 43.8 12/21/08 14:36:00 4 2030 0 -23.8 12/21/08 19:30:00 5 2030 90 90.2 12/21/08 21:48:00 6 2030 45

[R] (no subject)

2008-11-05 Thread Aimin Yan
In linux, when I start R, I get some message like this: Error:unexpected '/' in '/ Does anyone know why? AMY Thanks, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] maximum dimension of SVM in e1701

2008-10-27 Thread Aimin Yan
Does anyone know the maximum dimension that svm can deal with in R? I am working on support vector regression. My data set is 1721*41030 1721 samples 41030 predictors Some information about my machine: cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family :

Re: [R] SVD for a 500, 000* 500, 000 matrix (singular value decomposition)

2008-05-08 Thread Aimin Yan
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Aimin Yan Baker Center for Bioinformatics and Biological Statistics 109 Office Lab Bldg Iowa State

[R] error from building a package

2008-04-11 Thread Aimin Yan
I am trying someone's example to build a R package, but I get some errors, Can someone help me to figure it out? thanks, * using log directory '/home/aiminy/myrpackages/roots.Rcheck' * using R version 2.6.1 (2007-11-26) * checking for file 'roots/DESCRIPTION' ... OK * this is package 'roots'

[R] label each bar by value

2008-03-13 Thread Aimin Yan
I want to label each bar on the top of bars when using barplot. anyone know how to do this? thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] scatterplot in CAR

2008-02-11 Thread Aimin Yan
I am trying to use scatterplot function in CAR like the following: scatterplot(X~Y) I want to label X points and Y ponits using the different color. Any idea for this? Aimin __ R-help@r-project.org mailing list

[R] question in xyplot of lattice

2007-12-07 Thread Aimin Yan
I try to make a xyplot like the following: xyplot(y1+y2~id|groups, ...) I also want to calculate cor(y1,y2) in each group, print it on each panel. Does anyone know how to write panel function for this? Thanks, Aimin __ R-help@r-project.org mailing

[R] about regression tree label

2007-10-10 Thread Aimin Yan
Hello, I have a question about splitting label in regression tree. for example, by using the following command plot(m.regression.tree.pr,uniform=T,margin=0.05,branch=0.7,compress=F) text(m.regression.tree.pr,pretty=0) I get a tree with one label in some splitting node like this bcu0.004969 Now