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

2017-02-02 Thread Fix Ace via R-help
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 <r-help@r-project.org> wrote: > > Hello, there, > I did a test run for this p

[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:      

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

2017-02-18 Thread Fix Ace via R-help
.nz> wrote: > > > On 14/02/17 05:50, Fix Ace via R-help wrote: > >> 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? >> Tha

Re: [R] get() return nothing

2017-02-13 Thread Fix Ace via R-help
11/02/2017 1:33 PM, Fix Ace via R-help wrote: > 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" 

[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"

[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

[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

[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

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-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()

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

[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 +

[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 <istaz...@gmail.com> wrote: Use coord_fixed() --Ista On Thu, Dec 29, 2016 at 9:59 AM, Fix Ace via R-help <r-help@r-project.org> wrote: > > > >  Hello, there, > What exactly does "expand" do for this fun

Re: [R] pheatmap: incomplete figure

2017-09-20 Thread Fix Ace via R-help
6 AM, Fix Ace via R-help <r-help@r-project.org> wrote: > > Dear R Community, > I tried to generate heatmap for a matrix of 1500 columns by 106 rows using > the following R script: >> pheatmap(tf.vs.DE.1.removeAllZeroCol, fontsize=3,border_color=NA) > and got the

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

2017-08-29 Thread Fix Ace via R-help
on <drjimle...@gmail.com> wrote: > > > Hi Ace, > As your example 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 sp

[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

[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

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

2017-08-28 Thread Fix Ace via R-help
umns with "col.names" and using "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 <r-help@r-project.org> wrote: > Dear R community, > I have a text file (test.txt

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

2017-11-14 Thread Fix Ace via R-help
ce On Tuesday, November 14, 2017 12:19 PM, David Winsemius <dwinsem...@comcast.net> wrote: > On Nov 14, 2017, at 5:13 AM, Fix Ace via R-help <r-help@r-project.org> wrote: > > Dear R Community, > My data have 3 conditions and each condition has 6 replic

[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:

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

2017-11-16 Thread Fix Ace via R-help
our email software. Please seek local help if you cannot figure out how to do this. -- Bert  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 ) O

[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

[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] help with the plot overlay

2018-02-14 Thread Fix Ace via R-help
]),c(18,63,63,62)) lines(c(barpos$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 <r-help@r-project.org> wrote: > Dear R Community, > I recently read a