Questions tagged [gmisc]

An R package of miscellaneous functions for graphics, table creating, plotting and more.

Gmisc is an package containing functions for descriptive statistics, transition plot, and other miscellanea including: tools for making the descriptive "Table 1" used in medical articles, a transition plot for showing changes between categories, a method for variable selection based on the , lines with arrows complementing the ones in the package.

Repositories

Vignettes

Other resources

Related tags

16 questions
9
votes
1 answer

Is there a way to make nice "flow maps" or "line area" graphs in R?

I'm trying to find a way to recreate graphs like these directly in R (as opposed to manually drawing them with Inkscape after I've done the analysis in R): and The first one seems like it should be straight forward, but I'm not able to find…
CJH
  • 1,295
  • 1
  • 11
  • 15
5
votes
2 answers

Can I control word wrap or column width in htmlTable?

I am falling in love with the htmlTable() function in the Gmisc package. My tables are so much prettier than they were before. In my table I have one column with quite large entries and I'm having a hard time keeping it wide enough that the numbers…
Tom
  • 4,860
  • 7
  • 43
  • 55
5
votes
1 answer

Format html-output from R table like excel pivot w/ option "Do not repeat item labels"

I have casted (reshape2) a dataframe table with the following structure: Region | school |Region | school | Year1 | Year2 | ----------------------------------- |R1 | S1 | Value1| Value2 | |R1 | S2 | Value3| Value4 | |R1 | S3 …
Andreas
  • 6,612
  • 14
  • 59
  • 69
3
votes
1 answer

horizontal connectGrobs don't always connect to the edge of the boxGrob

I was running the example here, and noticed that the horizontal arrow connecting the Total to the Ineligible boxGrobs doesn't always touch the left-edge of the the Ineligible boxGrob. It seems to depend on the width of the viewing window in RStudio.…
morgan121
  • 2,213
  • 1
  • 15
  • 33
3
votes
2 answers

How to save a flowchart made with grid and Gmisc

What I want to do is to create a basic flowchart with R, add it to my R Markdown file and make it referencable (if possible like I did with my ggplot2 figures -> fig.cap = " " in the code chunk header). The…
Hurlikus
  • 399
  • 3
  • 13
3
votes
2 answers

Transition State Diagram R

My data looks something like this: Output of dput(sequence_data); structure(list(Obs = 1:13, Seq.1 = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L), .Label = c("a", "b", "c" ), class = "factor"), Seq.2 = structure(c(1L, 1L,…
user3252148
  • 153
  • 1
  • 3
  • 11
2
votes
1 answer

Render multiple transition plots on one page (Gmisc)

I wonder if there is a way to arrange multiple of the nice transition plots of the Gmisc package on one page (e.g. two next to each other or two-by-two)? I tried various common approaches (e.g. par(mfrow = c(2,2)) and grid.arrange()) but was not…
uyanik
  • 63
  • 7
2
votes
1 answer

Is it possible to label as TransitionPlot from Gmisc with counts?

I have the following table: A B C A 0 6 50 B 63 0 52 C 34 9 0 Where the row=A, column=B shows the count of the transitions from A to B. I can easily plot this using the Gmisc package via: transitionPlot(temp) which gives me a nice plot…
pomegranate
  • 755
  • 5
  • 19
1
vote
0 answers

Choose font for transition diagram in GMisc

How can one change the text font in a transition diagram created with the GMisc package in R? I can get 2% of the way there as follows: library(grid) library(Gmisc) grid.newpage() txt <- "Just a plain box" windowsFonts( A=windowsFont("TT…
David Kaufman
  • 989
  • 1
  • 7
  • 20
0
votes
1 answer

`Gmisc` package: how to add italic to only part of text using the `glue` package?

Using the Gmisc package, how can I add italic to only part of text using the glue package? See the reprex below for details: library(Gmisc, quietly = TRUE) library(grid) grid.newpage() txt <- "Just a plain box" boxGrob(txt) grid.newpage() txt <-…
rempsyc
  • 785
  • 5
  • 24
0
votes
1 answer

R: Gmisc / Grid and alignment of boxes

I would like to create a dynamic flow-chart using "Gmisc", "grid", and lists in R. Basically the code looks as follows: ############################## library(Gmisc) library(grid) # list of names a.names <- list("i1", "i2", "i3") # list of…
0
votes
0 answers

How to change box color in transition plot (Gmisc package)

I want to make transition plot with three columns. I use Gmisc package but not the transitionPlot function since it does not enable me include third column. Therefore, I used the code below. My problem is that my result transition table is dark…
ecenur
  • 1
  • 2
0
votes
0 answers

Convert Frequencies to Percentages in gmisc transition diagrams

I am using the gmisc package to make plots like the following one.Transition Diagrams The gmisc package provides the function getTransitions transitions$getTransitionSet(1) that returns a table with the transitions. For example 7 87 94 130 185…
Alex P
  • 137
  • 1
  • 13
0
votes
1 answer

adjust text boxGrob

library(grid) library(Gmisc) grid.newpage() gp <- gpar(fill = "lightgrey") (total <- boxGrob("some text doesnt fit", x=0.55, y=.6, box_gp = gp,just = "center",width = 0.1,height = 0.1)) using the above code I want to reduce…
e.matt
  • 836
  • 1
  • 5
  • 12
0
votes
1 answer

remove empty state in multiple columns of transition plot in R

I'm trying to use package Gmisc and make a three column transition plot in R, the data is like this head(dat,10): ?.no X1 X2 X3 1 2 S 2 6 E E E 3 11 E 4 12 E 5 14 N 6 16 N …
Jamie.C
  • 1
  • 3
1
2