Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

394
Views
En R y usando Plotly, ¿cómo puedo extraer el marco de datos relacionado con la herramienta de acercamiento?

Este es mi código:

 library(gapminder) ggplotly(ggplot(gapminder %>% filter(country == "Chile")) + aes(x = year, y = pop) + geom_line())

Luego uso la herramienta de acercamiento:

ingrese la descripción de la imagen aquí

Entonces tengo esta salida:

ingrese la descripción de la imagen aquí

Mi pregunta es : ¿Cómo puedo acceder/extraer el marco de datos relacionado con esta salida?

Alguna ayuda ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Supongo que necesitas esto: Podemos hacerlo con crosstalk :

ingrese la descripción de la imagen aquí

 library(DT) library(plotly) library(crosstalk) library(gapminder) options(persistent = FALSE) my_data <- SharedData$new(gapminder %>% filter(country == "Chile")) my_plot <- plot_ly(my_data, x = ~ year, y = ~ pop, type = 'scatter', mode = 'lines') %>% add_markers(alpha = 0.5) %>% highlight(on = "plotly_selected", off = "plotly_deselect", dynamic = TRUE) my_table <- datatable(my_data) bscols(widths = c(6, 4), my_plot, my_table)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!