<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Buenas,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Una duda de Shiny. Quiero meter la columna de un data.frame que cargo con un load dentro de un checkbox. Para ello creo lo siguiente:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>library(shiny)<br>
</span>
<div><br>
</div>
<div>ui <- fluidPage(<br>
</div>
<div><br>
</div>
<div> <br>
</div>
<div>        checkboxGroupInput("n_breaks", label = "Selecciona las variables:",<br>
</div>
<div>                           choices =  textOutput("importancia"),inline=TRUE)<br>
</div>
<div>        <br>
</div>
<div>    <br>
</div>
<div>)<br>
</div>
<div><br>
</div>
<div>server <- function(input, output) {<br>
</div>
<div>   <br>
</div>
<div>   output$importancia <- renderText({<br>
</div>
<div>    load("C:/datos/archivo.RData") <br>
</div>
<div>    variables <- df$variable<br>
</div>
<div>    variables<br>
</div>
<div>    })<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>shinyApp(ui = ui, server = server)</div>
<div><br>
</div>
<div>El data.frame que esta dentro del archivo.RData (el cual adjunto) es: <br>
</div>
<div>df <- data.frame(variables = c("uno","dos")</div>
<div><br>
</div>
<div>El checkbox en vez de mostrar uno y dos como opciones, muestra names, attrib y children.....</div>
<div><br>
</div>
<div>żAlguna idea?</div>
<div><br>
</div>
<div>Gracias. <br>
</div>
<div><br>
</div>
<div><br>
</div>
<span></span></div>
</body>
</html>