prisma-flowdiagram / PRISMA2020

Produce PRISMA-2020 compliant flow diagrams
https://estech.shinyapps.io/prisma_flowdiagram_latest/
Other
145 stars 71 forks source link

Issue with PRISMA_data() #29

Closed vladaron closed 2 years ago

vladaron commented 2 years ago

Hello,

I'm trying to build the flowdiagram from a csv file but the numbers do not match those of my csv file(flow_chart_data.csv):

flow

It seems that the problem occurs with the PRISMA_data() function as the list that it prints doesn't match my template. Also, when i upload my csv file in the Shiny.app, it works fine... I'm doing:

flow_data <- read.csv("flow_chart_data.csv") flow_data <- PRISMA_data(flow_data) PRISMA_flowdiagram(flow_data1, fontsize = 12, interactive = TRUE, previous = FALSE, other = TRUE)

Thank you for your work !

nealhaddaway commented 2 years ago

Hi there,

I don't have any problem when I run your code, but note that your plot code refers to 'flow_data1', not 'flow_data' - is that the issue? It's impossible for other data to be plotted so the only way you could be plotting numbers that aren't in your CSV is if you have underlying data already in your R environment. Can I suggest you clear your environment and try again?

Thanks, Neal


From: vladaron @.> Sent: 06 April 2022 17:40 To: nealhaddaway/PRISMA2020 @.> Cc: Subscribed @.***> Subject: [nealhaddaway/PRISMA2020] Issue with PRISMA_data() (Issue #29)

Hello,

I'm trying to build the flowdiagram from a csv file but the numbers do not match those of my csv file(flow_chart_data.csvhttps://github.com/nealhaddaway/PRISMA2020/files/8429136/flow_chart_data.csv):

[flow]https://user-images.githubusercontent.com/81113744/162034795-0823e9f8-b424-4d36-9fac-0a4bb52150e4.png

It seems that the problem occurs with the PRISMA_data() function as the list that it prints doesn't match my template. Also, when i upload my csv file in the Shiny.app, it works fine... I'm doing:

flow_data <- read.csv("flow_chart_data.csv") flow_data <- PRISMA_data(flow_data) PRISMA_flowdiagram(flow_data1, fontsize = 12, interactive = TRUE, previous = FALSE, other = TRUE)

— Reply to this email directly, view it on GitHubhttps://github.com/nealhaddaway/PRISMA2020/issues/29, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXDRN2YS2VBJAPIATNDVDXEADANCNFSM5SWY2J6Q. You are receiving this because you are subscribed to this thread.Message ID: @.***>

chriscpritchard commented 2 years ago

Closing this now until the author can confirm whether or not the steps suggested by @nealhaddaway have worked.

vladaron commented 2 years ago

Hi !

Sorry for the late answer.. I've tried to clean my R environment but the issue remained.

Thanks, Vlad

nealhaddaway commented 2 years ago

Thanks Vlad - can you check your code and let us know what happens when you fix the mistake I pointed out? Cheers

vladaron commented 2 years ago

Hi,

library(PRISMA2020) flow_data <- read.csv("flow_chart_data.csv") flow_data <- PRISMA_data(flow_data) flow <- PRISMA_flowdiagram(flow_data, fontsize = 12, interactive = TRUE, previous = FALSE, other = TRUE) PRISMA_save(flow,filename = "flow.png", filetype = "png",overwrite = TRUE)

This is the output: flow

This is what i get from the shiny app: prisma(2)

This is the .csv file flow_chart_data.csv

Thanks !

chriscpritchard commented 2 years ago

What version are you using - the one on CRAN, or the current main / master branch?

nealhaddaway commented 2 years ago

I've rerun your code now with your CSV file using both the CRAN version and the GitHub version and I can't replicate your error. It doesn't seem possible to me that the package could be generating new data - the number 7 doesn't occur anywhere in your data - for it to be appearing from the package or elsewhere in the template it would need to be pulled in from the trailing end of a cell with a string (like 'box7'), which seems programmatically impossible.

Can you show us a screen shot of your flow_data object?


From: Chris Pritchard @.> Sent: 19 April 2022 22:30 To: nealhaddaway/PRISMA2020 @.> Cc: nealhaddaway @.>; Mention @.> Subject: Re: [nealhaddaway/PRISMA2020] Issue with PRISMA_data() (Issue #29)

What version are you using - the one on CRAN, or the current main / master branch?

— Reply to this email directly, view it on GitHubhttps://github.com/nealhaddaway/PRISMA2020/issues/29#issuecomment-1103229097, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXAJBKPOJLOONYRCSSLVF4XXRANCNFSM5SWY2J6Q. You are receiving this because you were mentioned.Message ID: @.***>

vladaron commented 2 years ago

Like so ?

flow_data_shot1 flow_data_shot2

Thanks !

Cheers, Vlad

nealhaddaway commented 2 years ago

Thanks - yeah. That's SO bizarre. Do you have time to hop onto a Zoom call for a screenshare so I can try to get to the bottom of it? thanks so much


From: vladaron @.> Sent: 20 April 2022 07:00 To: nealhaddaway/PRISMA2020 @.> Cc: nealhaddaway @.>; Mention @.> Subject: Re: [nealhaddaway/PRISMA2020] Issue with PRISMA_data() (Issue #29)

Like so ?

[flow_data_shot1]https://user-images.githubusercontent.com/81113744/164169231-461c4b67-2148-4739-b520-c1e5b634dbf5.png

[flow_data_shot2]https://user-images.githubusercontent.com/81113744/164169242-fb8e6cf2-31ba-4dd2-9b8c-a8ae8ce1c3e9.png

Thanks !

Cheers, Vlad

— Reply to this email directly, view it on GitHubhttps://github.com/nealhaddaway/PRISMA2020/issues/29#issuecomment-1103538757, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXEZ4OKHCSYBWDGBETDVF6TPNANCNFSM5SWY2J6Q. You are receiving this because you were mentioned.Message ID: @.***>

vladaron commented 2 years ago

Yes

nealhaddaway commented 2 years ago

Ace, thanks. Do you have a private means of communication to set up a zoom link?


From: vladaron @.> Sent: 20 April 2022 08:18 To: nealhaddaway/PRISMA2020 @.> Cc: nealhaddaway @.>; Mention @.> Subject: Re: [nealhaddaway/PRISMA2020] Issue with PRISMA_data() (Issue #29)

Yes

— Reply to this email directly, view it on GitHubhttps://github.com/nealhaddaway/PRISMA2020/issues/29#issuecomment-1103605775, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXGJ53EXPUL4YWZPVY3VF64W7ANCNFSM5SWY2J6Q. You are receiving this because you were mentioned.Message ID: @.***>

vladaron commented 2 years ago

You can send me an email: gglsheetmail@gmail.com

Thanks !

chriscpritchard commented 2 years ago

Did this get resolved?

nealhaddaway commented 2 years ago

I don’t think so…

Sent from my iPhone

On 7 May 2022, at 06:32, Chris Pritchard @.***> wrote:



Did this get resolved?

— Reply to this email directly, view it on GitHubhttps://github.com/nealhaddaway/PRISMA2020/issues/29#issuecomment-1120138744, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXH4B7H7NAG4QLLQPATVIX57LANCNFSM5SWY2J6Q. You are receiving this because you were mentioned.Message ID: @.***>

vladaron commented 2 years ago

Hi,

Just to let you know,

I've tried to load two versions of the package: library(devtools) install_github("nealhaddaway/PRISMA2020") install.packages("PRISMA2020")

using the same code, the output remain the same: library(PRISMA2020) flow_data <- read.csv("flow_chart_data.csv") flow_data <- PRISMA_data(flow_data) flow <- PRISMA_flowdiagram(flow_data, fontsize = 12, interactive = TRUE, previous = FALSE, other = TRUE) PRISMA_save(flow,filename = "flow.png", filetype = "png",overwrite = TRUE)

flow

Cheers, V.

nealhaddaway commented 2 years ago

That works on my machine after reinstalling, and @chriscpritchard doesn't seem to be able to replicate it either - I'm afraid it sounds like you have a problem with your machine/installation of R. I don't know what to suggest I'm afraid, but I don't think there's a bug with the package. @chriscpritchard - any suggestions?

nealhaddaway commented 2 years ago

Can you import the CSV into R and show us a screenshot of the previewed data?

File > Import Dataset > From text (base)

Scroll right and show the data as it's being read in on your machine.

vladaron commented 2 years ago

Hi,

Here it is

Screenshot 2022-05-11 at 15 46 36
nealhaddaway commented 2 years ago

Can you jump on a call now? https://meet.google.com/zos-jiua-nfw

nealhaddaway commented 2 years ago

Dodgy internet actually. The only thing I can suggest is to take the function code for PRISMA_data() and run it line by line on your input to see where it's going wrong.

vladaron commented 2 years ago

Hi ! Ok I'll give it a try

vladaron commented 2 years ago

Hi !

I've updated both R and Rstudio and now it works fine.

Cheers, V.

nealhaddaway commented 2 years ago

Great! Thanks - glad it wasn’t a bug :)

Sent from my iPhone

On 17 May 2022, at 22:34, vladaron @.***> wrote:



Hi !

I've updated both R and Rstudio and now it works fine.

Cheers, V.

— Reply to this email directly, view it on GitHubhttps://github.com/nealhaddaway/PRISMA2020/issues/29#issuecomment-1129338494, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOBNXGPQNHCQXMVFBBMQNDVKQGH5ANCNFSM5SWY2J6Q. You are receiving this because you were mentioned.Message ID: @.***>