Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reprex #24

Open
temospena opened this issue Oct 13, 2020 · 0 comments
Open

Reprex #24

temospena opened this issue Oct 13, 2020 · 0 comments

Comments

@temospena
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant