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 read.spc() with R 4.2.0 #18

Open
GegznaV opened this issue Jul 14, 2022 · 1 comment · May be fixed by #23
Open

Error in read.spc() with R 4.2.0 #18

GegznaV opened this issue Jul 14, 2022 · 1 comment · May be fixed by #23

Comments

@GegznaV
Copy link
Member

GegznaV commented Jul 14, 2022

The original issue was r-hyperspec/hyperSpec#80
Some aspects still are not solved.

Essence:

#> Warning in file(con, "rb"): file("") only supports open = "w+" and open = "w+b":
#> using the former
#> Error in readBin(filename, "raw", file.info(filename)$size, 1): can only read from a binary connection
``` r library(hySpc.read.spc) #> Loading required package: hyperSpec #> Loading required package: lattice #> Loading required package: grid #> Loading required package: ggplot2 #> #> #> Package hyperSpec (version 0.200.0.9000) #> #> To get started, try: #> vignette("hyperSpec", package = "hyperSpec") #> package?hyperSpec #> browseVignettes(package = "hyperSpec") #> vignette(package = "hyperSpec") #> #> If you use this package, please cite it appropriately. #> The correct reference is given by: #> citation("hyperSpec") #> #> The project's website: #> https://r-hyperspec.github.io/hyperSpec #> #> IMPORTANT! #> Existing users of 'hyperSpec' will find that many functions either have been renamed in favor of more consistent names or moved to other packages. To help you update your workflows, the list of the renamed and moved functions resides in the NEWS file of hyperSpec's documentation: #> #> help(package = "hyperSpec") #> #> Attaching package: 'hySpc.read.spc' #> The following objects are masked from 'package:hyperSpec': #> #> read.spc, read.spc.Kaiser, read.spc.KaiserLowHigh, #> read.spc.KaiserMap x <- hySpc.read.spc::read.spc( filename = system.file("extdata/1.spc", package = "ir"), log.txt = TRUE, log.bin = TRUE, log.disk = TRUE, keys.hdr2data = TRUE, keys.log2data = TRUE, no.object = FALSE ) #> Warning in file(con, "rb"): file("") only supports open = "w+" and open = "w+b": #> using the former #> Error in readBin(filename, "raw", file.info(filename)$size, 1): can only read from a binary connection ```

Created on 2022-07-14 by the reprex package (v2.0.1)

@cbeleites, do you know how to solve this?

@GegznaV
Copy link
Member Author

GegznaV commented Jul 15, 2022

The error is due to empty input as ir package was not installed on my PC. The filename must not be empty and give a meaningful error message in case of wrong input.

@GegznaV GegznaV linked a pull request Jul 15, 2022 that will close this issue
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.

1 participant