Buenas tardes, me pueden indicar como puedo importar un archivo CVS desde un mac a RStudio en la nube, no me habilita el browser para buscar el archivo
I suggest sending a snippet of code that shows the error otherwise it is quite difficult to understand the problem you are facing. Here a snippet of code that shows in R how to import a CSV in Shiny for R.
library(shiny)
# Define UI for application that allows file upload
ui <- fluidPage(
titlePanel("Upload CSV File"),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose CSV File',
accept = c(
'text/csv',
'text/comma-separated-values,text/plain',
'.csv')
),
tags$hr(),
checkboxInput('header', 'Header', TRUE)
),
mainPanel(
tableOutput('contents')
)
)
)
# Define server logic to read and display the uploaded file
server <- function(input, output) {
output$contents <- renderTable({
# input$file1 will be NULL initially. After the user selects
# and uploads a file, it will be a data frame with 'name',
# 'size', 'type', and 'datapath' columns. The 'datapath'
# column will contain the local server path to the file
req(input$file1)
# Read the uploaded CSV file, assuming it's in the correct format
inFile <- input$file1
if (is.null(inFile))
return(NULL)
read.csv(inFile$datapath, header = input$header, sep = ",", dec = ".")
})
}
# Run the application
shinyApp(ui = ui, server = server)
Hola Miguel,
¿Podría incluir lo que en inglés se llaman "screenshots" de lo que describe? Sin ellos, es un poco difícil entender lo que quiere hacer.