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

read_nodelist #172

Closed
cpuga4 opened this issue Dec 7, 2021 · 6 comments · Fixed by #176
Closed

read_nodelist #172

cpuga4 opened this issue Dec 7, 2021 · 6 comments · Fixed by #176
Assignees
Labels
bug Something isn't working

Comments

@cpuga4
Copy link

cpuga4 commented Dec 7, 2021

Describe the bug
A clear and concise description of what the bug is.

Provide system information

  • OS: [e.g. MacOS BigSur 11.2.2]
  • R version: [Build 351]
  • migraph version: [e.g. 0.8.9]

To Reproduce

  1. Installed Java from java.com
  2. remotes::install_github("snlab-ch/migraph")
  3. library(migraph)
  4. testattribute <- read_nodelist("/Users/catherinepuga/Desktop/rnode.xlsx") #I am sure this is the correct path file
  5. Error in xlsx::read.xlsx(file, header = TRUE, ...) :
    Please provide a sheet name OR a sheet index.

Expected behavior
I expected my excel node list to import into R Studio

Additional context
Add any other context about the problem here.

@cpuga4 cpuga4 added the bug Something isn't working label Dec 7, 2021
@BBieri
Copy link
Collaborator

BBieri commented Dec 8, 2021

Hi!

Thanks a lot for using our package and reporting the issue.

First off, from the error message you're getting, it seems that you have an excel file with multiple sheets inside. The error message you're getting there is telling you to specify a range of these sheets you would like to import into R.

Practically what you can do to solve the issue is to redownload the latest development version of migraph by running the following command:

remotes::install_github("snlab-ch/migraph",  ref = "develop")

Please let us know if this solved the issue for you.

@jhollway
Copy link
Collaborator

jhollway commented Dec 8, 2021

Yes, @cpuga4 this should be fixed already in version 0.8.10 (no need to get this off develop) but let me know if there's still an issue.

@BBieri
Copy link
Collaborator

BBieri commented Dec 8, 2021

@jhollway I just pushed a fix since the function in version 0.8.10 had a bug due to the presence of an unnecessary header argument in the {readxl} call of both read_nodelist() and read_edgelist().

@BBieri
Copy link
Collaborator

BBieri commented Dec 8, 2021

@cpuga4 Instead of using the {migraph} functions, you can also simply use the readxl::read_excel(file, ...) functions from {readxl} in the meantime to import your dataset in R.

@cpuga4
Copy link
Author

cpuga4 commented Dec 9, 2021

Hi,

I downloaded version 0.8.10 via tgz and am receiving an error for both read_nodelist() and read_edgelist()

I am absolutely sure the Excel sheet has only one sheet.

edges <- read_edgelist("/Users/catherinepuga/Desktop/reportedges.xlsx")
Error in readxl::read_excel(file, header = TRUE, ...) :
unused argument (header = TRUE)
edges <- read_edgelist("/Users/catherinepuga/Desktop/reportedges.xlsx", header=TRUE)
Error in readxl::read_excel(file, header = TRUE, ...) :
unused arguments (header = TRUE, header = TRUE)

@BBieri
Copy link
Collaborator

BBieri commented Dec 9, 2021

Hi, thanks for reaching out again. The issue here is the one I pointed out two comments above. Your two options are 1) to wait until the next patch or 2) to import your data using a simple readxl::read_excel() call as explained above. Read the package documentation of readxl to learn how to import excel files into R. Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants