Questions tagged [vtree]

9 questions
4
votes
1 answer

Change gradient with customise colors

I am struggling to figure how to customise colors. Here is an example : vtree(mtcars, "cyl am",rootfillcolor="yellow") How to customise colors of "cyl" and am. I want to cyl : 4="blue", 6="green",8="yellow" and to am 0="pink" and 1="brown"
Nic
  • 143
  • 5
3
votes
1 answer

How to add title to and save vtree object?

I am using the vtree package (which is an awesome tool), and I am struggling to figure out how to add titles to it. Here is a sample tree: I would like to add a title at the top, but since this isn't a gg object I'm a little lost (I think it's an…
887
  • 599
  • 3
  • 15
2
votes
1 answer

How to copy screenshot to png from a html_widget

Follow-up question to this R Shiny: Vtree plot not rendering with Shiny With this code I generate a vtree htmlwidget. I would like to take a screenshot and save it in png. For this I use shinyscreenshot. But I only get a screenshot of all the rest…
TarJae
  • 72,363
  • 6
  • 19
  • 66
2
votes
2 answers

vtree object is renderred in Rmarkdown but not in quarto

I use updated quarto and Rmarkdown and vtree ‘5.4.6’: In the same project and same session: Rmarkdown does what quarto does not: Rmarkdown renders vtree(iris, "Species") and quarto not (allthough quarto renders inline) What could be the problem for…
TarJae
  • 72,363
  • 6
  • 19
  • 66
1
vote
1 answer

How to control an argument of a function depending on a radiobutton choice in R shiny

This is a follow-up to this Dynamic change in vtree within shiny: How to deselect With this code below, I try to switch the arguments prunesmaller and prunebigger of the vtree package. I am quite sure to do this with an if else but I am not able to…
TarJae
  • 72,363
  • 6
  • 19
  • 66
1
vote
1 answer

Dynamic change in vtree within shiny: How to deselect

This is a follow-up question of this R Shiny: Vtree plot not rendering with Shiny With this code I can manage to get reactive behaviour for the levels (level1 - level4) and also for the input$values (4,6,8). But how can I get to disable for example…
TarJae
  • 72,363
  • 6
  • 19
  • 66
1
vote
1 answer

In vtree: How to sort each node in descending order vs. alphabetical

By now, if we do this: library(vtree) vtree(mtcars, "cyl am", sameline = TRUE, follow=list(cyl="4")) we get this: I would like to sort in descending order without manipulating the data. Is this possible? Desired output:
TarJae
  • 72,363
  • 6
  • 19
  • 66
1
vote
1 answer

Assign figure caption to html widget (vtree package) in R markdown output

I need to implement a figure caption in a plot that is generated by the vtree package in R markdown. I learned that this is a htmlwidget and figure captions should now be possible for htmlwidgets used in R markdown with install.packages('webshot')…
TarJae
  • 72,363
  • 6
  • 19
  • 66
1
vote
1 answer

R Shiny: Vtree plot not rendering with Shiny

How can I use vtree package in shiny? The desired plot is not appearing when trying to render it from serverside. My code: library(shiny) library(vtree) # Define UI ---- ui <- pageWithSidebar( # App title ---- headerPanel("Cyl vtree"), …
TarJae
  • 72,363
  • 6
  • 19
  • 66