Posts by gleidsonmr • 339 points
15 posts
-
1
votes2
answers826
viewsA: How to define the number of clusters in the Kmeans algorithm in R?
In addition to the packages mentioned by the always helpful @Marcusnunes, there is also the ClusterR which can be used to estimate the number of data clusters using the AIC (Akaike information) or…
-
2
votes1
answer405
viewsQ: How to rename caption and caption values in fviz_cluster()
I am working with k-Means and therefore need to generate intuitive graphics. However, the graph generated by the function fviz_cluster() is not responding to usual functions in ggplot objects. In an…
-
2
votes1
answer101
viewsQ: How to save a rpart.Plot chart?
I am working with Décision Tree and at the end I have the chart that represents it. However, as it is a different object from other types of the ggplot or ggpubr family, I am not able to save by the…
-
1
votes0
answers59
viewsQ: ERROR: The "x" line break is not justifying left
I made a line break in the title of the "x" axis using the " n" and the break did not respect the horizontal justification on the left. Follow the data: > dput(PCLstack) structure(list(Grupo =…
-
1
votes1
answer259
viewsQ: How to import a file . xls in R keeping accented names in categorical variables?
I imported a file into . xls that contains columns with drug names and their class. Some names have accents like "Antipsychotic", "Benzodiazepine" and "Tricyclic Antidepressant". I used read.xlsx as…
-
2
votes1
answer495
viewsQ: How to adjust the size of an already embedded geom_plot to another ggplot2 chart?
In this situation below, how can I adjust the size of the geom_plot() added to geom_jitter() once the function tibble(x = 12, y = 4.5, plot = list(dens_iris)) only allowed to identify the…
-
0
votes1
answer892
viewsQ: How to save a ggplot chart without losing quality to Word and Power Point?
I’m having trouble saving the graphics in a way that: they either lose quality or change their dimensions in relation to the background of the sheet that receives it. Attempt.1 <- A figure with…
-
1
votes2
answers96
viewsA: How to determine a covariable in the ANOVA model (r)
Well, really without some information as already mentioned, it gets a little obscure. Next time try making one dput() so that we can help better. If you don’t want to display the original data,…
-
1
votes2
answers190
viewsA: How to insert lines in the graphs to denote post-hoc differences between compared groups?
His reply @Rui Barradas, allowed me to think of a way that would change in "x" the positioning. Anyway I send the picture so you can observe what happens with the "***" and the "ns" and not exactly…
-
2
votes2
answers190
viewsQ: How to insert lines in the graphs to denote post-hoc differences between compared groups?
I need to graphically identify post-hoc differences between mean comparisons. As the figure below: Send a dput with simple data to facilitate graph generation (not the figure), as well as the chart…
-
1
votes1
answer612
viewsQ: How to break a line in the title of the graph into 2 lines using ggplot?
I need to break the title line of the chart so that it stays at the width of the chart itself. The reason is that the chart will be used in a grid.arrange() and in this way it will become narrow and…
-
2
votes2
answers200
viewsQ: How to modify only the line of the legend that identifies the group?
How can I change only the thickness of the color lines in the caption that identify the groups? I do not send the dput() graph pq are more than 40 thousand lines. I send a cutout of the figure to…
-
2
votes1
answer121
viewsQ: How to plot two geom_line (one from each group) into a single Plot in ggplot2
I have 2 dfs (one from each group) that correspond to 76 channels of signal acquisition in 20sec. of analysis. To decrease the work of repeating several times (76x) the geom_line function I stacked…
-
1
votes1
answer75
viewsQ: How to plot only a part of a Posixct variable?
I have a df with two variables. The first is a time counter that reaches 9min at a 1000Hz acquisition rate (so it’s huge 540 thousand lines). The second variable is an electrophysiological…
-
2
votes1
answer98
viewsQ: Column of unwanted numbers in write.xlsx
I am saving a data frame in excel spreadsheet with the following command: library(xlsx) write.xlsx(df, "buildingTEPT.xlsx", sheetName = "TEPT", showNA = F, col.names = T) It turns out that the…