Skip to content
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 PRISMA_flowdiagram() if reason for exclusion is 1 #52

Closed
MiiroEm opened this issue Jul 21, 2023 · 3 comments · Fixed by #67
Closed

Error in PRISMA_flowdiagram() if reason for exclusion is 1 #52

MiiroEm opened this issue Jul 21, 2023 · 3 comments · Fixed by #67

Comments

@MiiroEm
Copy link

MiiroEm commented Jul 21, 2023

An error comes when the a single reason of exclusion is supplied
I'm trying to create a PRISMA flow diagram. The code works fine when the reasons for excluding a study is more than one but fails when I give a single reason. I first experienced it while using the R package but it also happens with the shinyapp.

To Reproduce
Steps to reproduce the behavior (using the example in the PRISMA2020 package documentation):
library(PRISMA2020)
csvFile <- system.file("extdata", "PRISMA.csv", package = "PRISMA2020")
data <- read.csv(csvFile)
data[23, "n"] #three reasons are supplied in the template
data[23, "n"] <- "Reason1, xxx" #Replace with a single reason
data <- PRISMA_data(data)
PRISMA_flowdiagram(data, fontsize = 12, interactive = TRUE, previous = FALSE, other = TRUE)

Expected behavior
A PRISMA flow diagram

Screenshots
error: Error in if (lines > min) { : the condition has length > 1
image

session info
image
I'm using PRISMA2020 version 1.1.1 date 2023-02-09 CRAN (R 4.3.1)

I tried using the shinyapp
Here's how to reproduce the error on the shinyapp

  1. Go to the create flow diagram and click on reports excluded
    image
  2. Delete the 2 last reasons and leave only one
    image
  3. An error comes: An error has occurred. Check your logs or contact the app author for clarification.
    image

More context
Maintaining the ";" at the end of the reason supplied doesn't solve the issue.

Help will be appreciated. Thanks.

@LandauerTUM
Copy link

I have the same problem. Unfortunately, there is still no solution.

@chriscpritchard
Copy link
Collaborator

Hi,

It's on my list to try to resolve unfortunately I've been really busy with teaching this year so haven't had a chance to review. I'll try to get to it at some point soon as it's high on my priority list!

@chriscpritchard
Copy link
Collaborator

chriscpritchard commented May 5, 2024

@MiiroEm @LandauerTUM Sorry how long this has taken to fix! Hopefully this should now be working on the test site and soon (once the workflow has completed) on the main site

I'll look to publish a new release to the release site once I've sorted some other outstanding issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants