Re: [R] help with the plot overlay

2018-02-14 Thread Fix Ace via R-help
arpos$x[1],barpos$x[1],barpos$x[3],barpos$x[3]),c(4,66,66,65)) text(2,68,"**",cex=2) text(2.5,64.5,"**",cex=2) Jim On Mon, Feb 5, 2018 at 8:56 AM, Fix Ace via R-help wrote: > Dear R Community, > I recently read an article and found a plot as attached. It has scatterplo

[R] help with the plot overlay

2018-02-04 Thread Fix Ace via R-help
Dear R Community, I recently read an article and found a plot as attached. It has scatterplot, barplot, and error bar. Could anyone help me to figure out what package I can use in R to generate such plot? Thank you very much for any inputs! Kind regards, Ace __

Re: [R] error message for function: lmer (from lme4 package)

2017-11-16 Thread Fix Ace via R-help
  Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Nov 14, 2017 at 12:49 PM, Fix Ace via R-help wrote: Hi, David, Thank

Re: [R] error message for function: lmer (from lme4 package)

2017-11-14 Thread Fix Ace via R-help
m effects (=18) for term > (conditions | replicate); the random-effects parameters and the residual > variance (or scale parameter) are probably unidentifiable>  Please let me know if it is readable this time.  Again, many thanks for your time and please help me fix the issue. Kind rega

[R] error message for function: lmer (from lme4 package)

2017-11-14 Thread Fix Ace via R-help
Dear R Community, My data have 3 conditions and each condition has 6 replicates. I am trying to fit my data for a linear mixed model using the lmer function from lme4 package to find the random effects of the replicates; however, I got the error message. Here are the example codes: >example.3=da

[R] dendrogram adjustment in heatmap.2

2017-11-08 Thread Fix Ace via R-help
Dear R Community, Is there a way to adjust the line width of the dendrogram in heat map.2 function? I tried "lwd", but it didn't work... Also, is there a way to adjust the general height/width/position of the dendrogram using heatmap.2 function? I feel the portion of the dendrogram is huge compa

Re: [R] pheatmap: incomplete figure

2017-09-20 Thread Fix Ace via R-help
Thank you so much for the reply! I thought the file would automatically adjust accordingly. But I just checked and found pheatmap does has width as parameter! Ace On Monday, September 18, 2017 3:00 PM, David Winsemius wrote: > On Sep 18, 2017, at 9:26 AM, Fix Ace via R-help wr

[R] error with subtree()

2017-09-09 Thread Fix Ace via R-help
Dear R community, I would like to plot a partial hclust output, so I am looking for a subtree function that would return an tree structure I can plot. I ran the test code of subtree following the instruction on  http://finzi.psych.upenn.edu/library/extracat/html/subtree.html However, an error mess

Re: [R] help with read.csv() for files with different number of columns

2017-08-29 Thread Fix Ace via R-help
seems to have spaces as separators, > > testdf<-read.table("test.txt",header=FALSE,fill=TRUE, > col.names=paste("V",1:14,sep=""),stringsAsFactors=FALSE) > > By specifying the number of columns with "col.names" and using > "fill=

Re: [R] help with read.csv() for files with different number of columns

2017-08-27 Thread Fix Ace via R-help
ing "fill=TRUE" you can get a data frame with zero length strings where values are missing in the input file. Jim On Mon, Aug 28, 2017 at 6:25 AM, Fix Ace via R-help wrote: > Dear R community, > I have a text file (test.txt) with different number of columns: > 0610007

[R] help with read.csv() for files with different number of columns

2017-08-27 Thread Fix Ace via R-help
Dear R community, I have a text file (test.txt) with different number of columns: 0610007P14Rik%%% Tcf19 Gtf2i 0610010O12Rik%%% Ivns1abp Etv6 111G20Rik%%% Nmi 1500015O10Rik%%% Foxi1 Ascl3 Sirt3 173E16Rik%%% Ascl2 Ifnar2 1700028J19Rik%%% Musk Nfe2l3 1810011O10Rik%%% Ppp1r13b Bpnt1 Cdkn2c F

[R] prcomp: Error in La.svd(x, nu, nv): error code 1 from Lapack routine "dgesdd"

2017-05-23 Thread Fix Ace via R-help
On Thursday, December 29, 2016 11:44 AM, Ista Zahn wrote: Use coord_fixed() --Ista On Thu, Dec 29, 2016 at 9:59 AM, Fix Ace via R-help wrote: > > > >  Hello, there, > What exactly does "expand" do for this function? > I followed the examples from the manual to

Re: [R] [FORGED] Re: get() return nothing

2017-02-18 Thread Fix Ace via R-help
ad of the for loop, but even better is to store each of your objects in a list as you create them rather than letting them get loose in the global environment.  That way you don't have to do this get-by-name rodeo to get info on them. Cheers, Ben > On Feb 14, 2017, at 2:57 AM, Rolf T

Re: [R] get() return nothing

2017-02-13 Thread Fix Ace via R-help
Well, I am not trying to print anything. I just would like to get the dimension information for all the dataframes I created. Could you please help me to develop the script? Thanks. Ace On Saturday, February 11, 2017 7:53 PM, Duncan Murdoch wrote: On 11/02/2017 1:33 PM, Fix Ace via R

[R] get() return nothing

2017-02-11 Thread Fix Ace via R-help
Hello, there, I wrote a loop to check the dimension of all the .txt dataframes:> ls()  [1] "actualpca.table" "b4galnt2"    "b4galnt2.txt"    "data"  [5] "galnt4"  "galnt4.txt"  "galnt5"  "galnt5.txt"  [9] "galnt6"  "galnt6.txt"  "glyco"   "glyco.txt" [13]

Re: [R] princomp() output loadings component missing

2017-02-02 Thread Fix Ace via R-help
              Comp.1 Comp.2 Comp.3 Comp.4 SS loadings      1.00  1.00  1.00  1.00 Proportion Var  0.25  0.25  0.25  0.25 Cumulative Var  0.25  0.50  0.75  1.00 Cheers, Ben > On Jan 29, 2017, at 4:31 AM, Fix Ace via R-help wrote: > > Hello, there, > I did a test run for this princom

[R] princomp() output loadings component missing

2017-01-29 Thread Fix Ace via R-help
Hello, there, I did a test run for this princomp() function using USArrests data. The R document says that the output loadings contain the eigenvector matrix. When I looked at this matrix, I found that a missing item for Comp.4 > p3=princomp(USArrests, cor=TRUE )> p3$loadings Loadings:      

[R] ggplot2 package: argument of expand with scale_x_discrete()

2016-12-29 Thread Fix Ace via R-help
Hello, there, What exactly does "expand" do for this function? I followed the examples from the manual to get a plot: d <- ggplot(subset(diamonds, carat > 1), aes(cut, clarity)) +geom_jitter() I would like to have all the dots in a square instead of rectangular range. When I applied d + sca

Re: [R] [FORGED] help with gradient boxplot

2016-12-12 Thread Fix Ace via R-help
Hi, Paul, Thank you so much for this further clarification! Ace On Sunday, December 11, 2016 2:09 PM, Paul Murrell wrote: Hi Great to hear you have it working. Figuring out the names of grobs takes two things: 1. someone has to name the grobs 2. grid.ls() The reason why I did my exa

Re: [R] [FORGED] help with gradient boxplot

2016-12-09 Thread Fix Ace via R-help
Hi, Paul, Thank you very much! It works this time with "strict=FALSE" option. Another relevant question: how did you figure out  that boxes in boxplot are called "bwplot.box.polygon". If I am trying to make a gradient filling for barplot of other plots, how would I define grobs? Thanks!! Ace

Re: [R] [FORGED] help with gradient boxplot

2016-12-08 Thread Fix Ace via R-help
Hi, Paul, Thank you very much for your reply. I tried your sample code, but did not get gradient filling (still empty box). And many warnings:1: In checkAttrs(attrs, eltName) :   Removing non-SVG attribute name(s): fill, fill-opacity 2: In checkAttrs(attrs, eltName) :   Removing non-SVG attribute

[R] how to use vector of values to change row order of a heatmap

2016-11-21 Thread Fix Ace via R-help
Hello, there, R document for heatmap says that Rowv could be a vector of values to specify the row order. However, I couldn't figure out how to apply it. A simple example here:> b=as.data.frame(matrix(c(3,4,5,8,9,10,13,14,15,27,19,20),3,4)) > b   V1 V2 V3 V4 1  3  8 13 27 2  4  9 14 19 3  5 10 15

[R] how to use vector of values to change row order of a heatmap

2016-11-21 Thread Fix Ace via R-help
Hello, there, R document for heatmap says that Rowv could be a vector of values to specify the row order. However, I couldn't figure out how to apply it. A simple example here:> b=as.data.frame(matrix(c(3,4,5,8,9,10,13,14,15,27,19,20),3,4)) > b   V1 V2 V3 V4 1  3  8 13 27 2  4  9 14 19 3  5 10 15

[R] how to pass multiple pattern varibles to grep()

2016-09-23 Thread Fix Ace via R-help
Hello, there, My patterns are defined by variables, for example:z="h"v="x" I have a vector: a=c("th","mx","t") I would like to find elements in vector a that contain either "h", or "x" grep("h|x", a) apparently works. However, when I tried: grep(z|v,a), it did not work. Can anyone help how to han