-
Notifications
You must be signed in to change notification settings - Fork 415
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
Error in tidyr package & issue with columns being added to Markdown output where used to put into rows (no change to code) #1546
Comments
Hi - can anyone help with this? |
Could you please turn this into a self-contained reprex (short for minimal reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff. If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page. You can install reprex by running (you may already have it, though, if you have the tidyverse package installed): install.packages("reprex") Thanks |
Hi, how does creating a reprex work when to recreate their is an app code that calls in a Markdown code? Would it help if I attached the app code and our test input CSV? |
Ideally you'd post the app code, with any necessary library calls at the top, and with the test data frame inlined into the code as well (or at least a small subset of the data frame that still reproduces the problem). Essentially I'd like to be able to run the code block that you post from top to bottom with 0 changes and have it reproduce the error on my machine as well. If you can't seem to get a minimal data frame, posting the app code and CSV is ok too as long as I just have to change the file path in the code to import from |
Okay thanks The app code contained within this document - pulls in the code as per the attached code.docx document above and applies it to a csv such as the one attached below But as per the outputs attached earlier, there seems to be an issue with the latest version of tidyr (as it suggested as much in the render console) putting our format into columns which we have not coded for (and which still appears to be fine when using earlier version of tidyr. Appreciate any help you can give |
I was expecting you to actually put that code here in a github comment, rather than attaching a word document with it, like this: library(shiny)
library(shinydashboard)
library(tidyverse)
library(lubridate)
library(here)
library(spsComps)
library(kableExtra)
body <- dashboardBody(
fluidRow(
box(title = "Clinicaltrials.gov", width = 4, solidHeader = TRUE,
fileInput(inputId = "inputfile", "", multiple = FALSE, accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")) %>%
bsPopover("click browse to upload .csv file", "then click download button"),
p(),
p(),
downloadButton("report"),
)
)
)
ui <- dashboardPage(
dashboardHeader(title = "Trial converter"),
dashboardSidebar(disable = TRUE),
body
)
server <- function(input, output) {
output$report <- downloadHandler(
filename = "report.doc",
content = function(file) {
tempReport <- file.path(tempdir(), "CTcode.Rmd")
file.copy("CTcode.Rmd", tempReport, overwrite = TRUE)
params <- list(report.data = input$inputfile$datapath)
rendered_report <- rmarkdown::render(
tempReport,
output_file = file,
params = params,
envir = new.env(parent = globalenv())
)
file.copy(rendered_report, file)
}
)
}
shinyApp(ui, server) Regardless, I don't see any usage of tidyr in this, so I don't see how this could be a tidyr issue |
Okay, although it did say Error in df_append(): ... %>% pull(text_row)
|
Where is your code that calls |
I'm a bit of a novice truth be told, I'm not sure what you mean? Is there something I need to add? A bit confused as like I say my colleague can make the code work as it is while some of us cannot. |
I'm convinced this is #1548 |
Have had this error message saying to log this here
Error in
df_append()
:!
after
must be a whole number, not an integerNA
.This is an internal error that was detected in the tidyr package.
Please report it at https://github.com/tidyverse/tidyr/issues with a reprex
(https://tidyverse.org/help/) and the full backtrace.
Backtrace:
Execution halted
I came across this error when I have been trying to sort out an issue affecting one of our codes where the output is putting some of the output into columns (as per report(1) document)
report (1).docx
We have not changed the code (attached below) from the time when it was putting the output into rows as we wanted
code.docx
We cant work out why this is happening as one of our colleagues is able to make it work in the usual way (one of his outputs from today is in report(51) document) - is there a problem with a package update?
report (51).doc.docx
The text was updated successfully, but these errors were encountered: