Re: [R] Special characters in cell names

2021-06-23 Thread Mahmood Naderan
and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Wed, Jun 23, 2021 at 2:39 PM Mahmood Naderan > wrote: > >> Hi Bert, >> I don't know what does "check.names" do here, but my co

Re: [R] Special characters in cell names

2021-06-23 Thread Mahmood Naderan
e 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 Wed, Jun 23, 2021 at 1:37 PM Mahmood Naderan > wrote: > >> Unfortunately, using

Re: [R] Special characters in cell names

2021-06-23 Thread Mahmood Naderan
t; a. Change the column name to "Y" so that you get the plot you want > b. Use axis labels and legend text to show the text that you want. (The > user never has to know that you changed the column name 😃) > > HTH, > Eric > > On Wed, Jun 23, 2021 at 9:58 PM Mahmoo

[R] Special characters in cell names

2021-06-23 Thread Mahmood Naderan
Hi I have a column in my data file which is "X/Y". With '/' I want to emphasize that values are the ratio of X over Y. Problem is that in the following command for a violin plot, I am not able to specify that '/' even with double quotes. p <- ggplot(mydata, aes(x=W, y="X/Y")) + geom_violin(trim=FA

Re: [R] About Pearson correlation functions

2021-05-30 Thread Mahmood Naderan-Tahan
Thanks. It seems that the differences I saw in some of my data points were related to the number of digits and rounding. Regards, Mahmood From: Bill Dunlap Sent: Sunday, May 30, 2021 7:00:52 PM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R

[R] About Pearson correlation functions

2021-05-30 Thread Mahmood Naderan-Tahan
Hi Maybe this is not directly related to R, but I appreciate you can help me with an idea. I use the following ggscatter function to plot a Pearson correlation Coefficient and it works fine. In the chart I see both R-value and P-value. ggscatter(mydata, x = "V1", y = "V2", add = "reg.line"

Re: [R] Incomplete violin chart representation

2021-05-20 Thread Mahmood Naderan-Tahan
Yes it seems that it need more than 2 points to create the shape. Thanks Regards, Mahmood From: Kevin Thorpe Sent: Thursday, May 20, 2021 1:38:32 PM To: Mahmood Naderan-Tahan Cc: R Help Mailing List Subject: Re: [R] Incomplete violin chart representation My

[R] Incomplete violin chart representation

2021-05-20 Thread Mahmood Naderan-Tahan
Hi I use the following command to create a violin chart p <- ggplot(mydata, aes(x=BENCH, y=V)) + geom_violin(trim=FALSE) + geom_dotplot(binaxis='y', stackdir='center', dotsize=0.6) + scale_y_continuous(trans = scales::pseudo_log_trans(base = exp(1))) However, in the output one of them are

Re: [R] Weighted violin chart

2021-04-15 Thread Mahmood Naderan-Tahan
Correct. This one p <- ggplot(mydata, aes(x=V3, y=V1, weight=V2)) + geom_violin(trim=FALSE) works fine. Thank you very much. Regards, Mahmood From: Duncan Murdoch Sent: Thursday, April 15, 2021 5:24:04 PM To: Mahmood Naderan-Tahan; r-help@r-project.

Re: [R] Weighted violin chart

2021-04-15 Thread Mahmood Naderan-Tahan
___ >>From: Jeff Newmiller >>Sent: Thursday, April 15, 2021 4:13:10 PM >>To: r-help@r-project.org; Mahmood Naderan-Tahan; r-help@r-project.org >>Subject: Re: [R] Weighted violin chart >> >>Not strictly on topic on this list (ggplot2 is a contributed pa

Re: [R] Weighted violin chart

2021-04-15 Thread Mahmood Naderan-Tahan
with `binwidth`. Error: Aesthetics must be either length 1 or the same as the data (1024): weight Run `rlang::last_error()` to see where the error occurred. Regards, Mahmood From: Mahmood Naderan-Tahan Sent: Monday, April 12, 2021 10:01 PM To: r-help@r-project.o

[R] Weighted violin chart

2021-04-12 Thread Mahmood Naderan-Tahan
Hi, I would like to know if it is possible to plot a weighted violin chart with R. Currently, I have > library(ggplot2) > mydata <- read.csv('test.csv', header=T,row.names=1) > mydata V1 V2 V3 P1 73.6 50 R P2 75.2 20 R P3 6.5 5 R P4 41.4 10 C P5 5.4 10 C P6 18.8 5 C > p <- ggplot

[R] Violin plot with mean_sdl

2021-03-31 Thread Mahmood Naderan-Tahan
Hi, I followed the example described at [1] but I don't know why I get the following warning > library(ggplot2) > library(Hmisc) > mydata <- read.csv('test.csv', header=T,row.names=1) > mydata V1 V2 V3 V4 P1 73.6 0.7 74.6 R P2 75.2 0.7 75.8 R P3 6.5 0.0 7.3 R P4 41.4 0.3 39.2 C P5

Re: [R] Controling the presentation of violin plot

2021-03-31 Thread Mahmood Naderan-Tahan
= exp(1)) > ) Yes that is a good hint. Thanks. Regards, Mahmood From: Rui Barradas Sent: Thursday, April 1, 2021 5:09:20 AM To: Mahmood Naderan-Tahan; r-help@r-project.org Subject: Re: [R] Controling the presentation of violin plot Hello, If the problem is

[R] Controling the presentation of violin plot

2021-03-31 Thread Mahmood Naderan-Tahan
Hi, With the following command, I get a messy violin plot which can be seen at https://pasteboard.co/JVdZKNz.jpg p <- ggplot(mydata, aes(x=BE, y=INT)) + geom_violin(trim=FALSE) p + geom_dotplot(binaxis='y', stackdir='center', dotsize=1) It seems that the y-axis has a large scale and that caus

Re: [R] Working with violin plot

2021-03-31 Thread Mahmood Naderan-Tahan
Yes thank you very much. Regards, Mahmood From: Eric Berger Sent: Wednesday, March 31, 2021 11:30:48 AM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R] Working with violin plot Try replacing ggplot(ToothGrowth, ... ) with ggplot(mydata

Re: [R] Working with violin plot

2021-03-31 Thread Mahmood Naderan-Tahan
Please ignore the previous email... Regards, Mahmood From: R-help on behalf of Mahmood Naderan-Tahan Sent: Wednesday, March 31, 2021 11:19:59 AM To: r-help@r-project.org Subject: [R] Working with violin plot Hi I would like to use the violin plot as

[R] Working with violin plot

2021-03-31 Thread Mahmood Naderan-Tahan
Hi I would like to use the violin plot as described in the manual [1]. In the example, I see ToothGrowth$dose <- as.factor(ToothGrowth$dose) head(ToothGrowth) On the other hand, my data is a csv file containing some rows and numbers. Problem is that the following code doesn't work > mydata <

Re: [R] Colorizing different individuals with fviz

2021-03-30 Thread Mahmood Naderan-Tahan
Thanks Jim, It is now working. Regards, Mahmood From: Jim Lemon Sent: Tuesday, March 30, 2021 4:28:50 AM To: Mahmood Naderan-Tahan Subject: Re: [R] Colorizing different individuals with fviz Hi Mahmood, After scanning the replies and finding the "facto

Re: [R] Colorizing different individuals with fviz

2021-03-29 Thread Mahmood Naderan-Tahan
out that? Regards, Mahmood ____ From: Bill Dunlap Sent: Monday, March 29, 2021 11:25:30 PM To: Mahmood Naderan-Tahan Cc: Jim Lemon; r-help@r-project.org Subject: Re: [R] Colorizing different individuals with fviz That error means that fviz_famd_ind has more than

Re: [R] Colorizing different individuals with fviz

2021-03-29 Thread Mahmood Naderan-Tahan
, "red", "black"), : argument 2 matches multiple formal arguments Any idea to fix that? Regards, Mahmood From: Jim Lemon Sent: Saturday, March 27, 2021 9:19:23 PM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R] Colori

[R] Colorizing different individuals with fviz

2021-03-27 Thread Mahmood Naderan-Tahan
Hi I use this command to generate a graph of individuals ind <- get_famd_ind(res.famd) fviz_famd_ind(res.famd, repel = TRUE) I would like to know how can I specify different colors for different individuals? The colorization is not very complex. Basically, I want to specify rows[1:10] to be

[R] Ellipses in factor analysis

2021-03-22 Thread Mahmood Naderan-Tahan
Hi In the example shown in [1], there is command that adds ellipses in the individual map. fviz_mfa_ind(res.famd, habillage = "Label", # color by groups palette = c("#00AFBB", "#E7B800", "#FC4E07"), addEllipses = TRUE, ellipse.type = "confidence",

Re: [R] Colorizing contribution of variables

2021-03-21 Thread Mahmood Naderan-Tahan
Regards, Mahmood From: Sarah Goslee Sent: Sunday, March 21, 2021 8:26:55 PM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R] Colorizing contribution of variables Hi, I am going to assume that you are using factoextra, and are working the exampl

[R] Colorizing contribution of variables

2021-03-21 Thread Mahmood Naderan-Tahan
Hi I use the following function to plot the variables with their contributions. fviz_famd_var(res.famd, "quanti.var", col.var = "contrib", gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"), repel = TRUE) The result can be seen at https://i.stack.imgur.com/Kbq1j.png

[R] About fviz_famd_ind()

2021-03-21 Thread Mahmood Naderan-Tahan
Hi I use fviz_famd_ind() from factoextra and I would like to know 1) How can I decrease the font size? 2) How to increase max.overlaps? ind <- get_famd_ind(res.famd) fviz_famd_ind(res.famd, col.ind = "cos2", gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"), repel

Re: [R] Changing chart border's color

2021-03-09 Thread Mahmood Naderan-Tahan
Error in box(col = "black") : plot.new has not been called yet Regards, Mahmood ____ From: Rasmus Liland Sent: Tuesday, March 9, 2021 8:16:24 PM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R] Changing chart border's color Hi, it wo

Re: [R] Specifying plot file name in the rscript

2021-03-09 Thread Mahmood Naderan-Tahan
Right. Thank you very much. Regards, Mahmood From: Ben Tupper Sent: Tuesday, March 9, 2021 2:58:17 PM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R] Specifying plot file name in the rscript Hi, When you call plot() it will draw to the

[R] Changing chart border's color

2021-03-09 Thread Mahmood Naderan-Tahan
Hi I would like to make the color of the chart border to black. However, the following command doesn't work plot(res.pca, choix="ind", border="black") Any way to fix that? Regards, Mahmood [[alternative HTML version deleted]] __ R-help@r-

[R] Specifying plot file name in the rscript

2021-03-09 Thread Mahmood Naderan-Tahan
Hi I use the following R script to plot two graphs. library(FactoMineR) mydata <- read.csv('test.csv', header=T,row.names=1) res.pca = PCA(mydata, quali.sup=5, graph=F) plot(res.pca, choix="var", axes=c(1,2)) dev.new() plot(res.pca, choix="ind", axes=c(1,2)) After running "Rscript my.r", I see

Re: [R] Command history

2021-02-28 Thread Mahmood Naderan-Tahan
] Command history On the Mac it is ~/.Rhistory el On 2021-02-28 15:39 , Mahmood Naderan-Tahan wrote: > Hi > > May I know where is the location of commands we used in R in the history? > > > Regards, > Mahmood-- Dr. Eberhard W. Lisse \ / Obstetrician & Gy

[R] Command history

2021-02-28 Thread Mahmood Naderan-Tahan
Hi May I know where is the location of commands we used in R in the history? Regards, Mahmood [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-he

[R] Customizing plot

2021-02-05 Thread Mahmood Naderan-Tahan
Hi, 1- How can I assign different colors to different observations in the PCA chart? Assume, I have 10 observations and I want to use black color for the first 5 and read for the next 5 observations. Currently, I use  res.pca = PCA(mydata[,1:37], scale.unit=TRUE, graph=T)  plot(res.pca,ax

[R] Customizing plot

2021-02-05 Thread Mahmood Naderan-Tahan
Hi, 1- How can I assign different colors to different observations in the PCA chart? Assume, I have 10 observations and I want to use black color for the first 5 and read for the next 5 observations. Currently, I use res.pca = PCA(mydata[,1:37], scale.unit=TRUE, graph=T) plot(res.pca,axes=

Re: [R] Working with FactoMineR

2021-02-04 Thread Mahmood Naderan-Tahan
OK . Thanks for that. Regards, Mahmood From: Bill Dunlap Sent: Thursday, February 4, 2021 7:06:21 PM To: Mahmood Naderan-Tahan Cc: r-help@r-project.org Subject: Re: [R] Working with FactoMineR This will happen if you select no points when it asks you to '

[R] Working with FactoMineR

2021-02-04 Thread Mahmood Naderan-Tahan
Hi, I tried to run the HCPC example [1] in the online R [2], but got an error: library(FactoMineR) data(tea) res.mca = MCA(tea, ncp=20, quanti.sup=19, quali.sup=c(20:36), graph=FALSE) res.hcpc = HCPC(res.mca) Result: [1] "Click on the graph to cut the tree" Error in while (coupe$y < min(t$t