Skip to content

Reprex #24

Description

@temospena

exemplo de como fazer um Reprex.

copiar o que se quer fazer, e depois correr apenas a linha do reprex::, e colar onde se quer colar

library(dplyr)
library(tidyr)
# OD matrix as long_format
df = data.frame("From" = c("A","A","A","C","C","C","B","B","B","D","D","D"),
                 "To" = c("C","B","D","B","D","A","D","A","C","A","C","B"),
                 "count" = c(7,35,7,5,9,7,3,15,3,11,5,2))
df

#colors
grid_col=c("#E31A1C","#33A02C","#FF7F00","#1F78B4") #colors paired

#plot
circlize::circos.clear()
circlize::circos.par(start.degree = start.degree, gap.after = gap.after)
circlize::chordDiagram(
  df, 
  grid.col = grid_col,
  directional = 1,
  direction.type = c("diffHeight", "arrows"),
  link.arr.type = "big.arrow",
  diffHeight = -0.03 
)

reprex::reprex(outfile = NA, si=T) #system info = true

ou então seleccionar, e no menu de Addins > Reprex > Reprex selection

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions