You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#> 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
```
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.
The original issue was r-hyperspec/hyperSpec#80
Some aspects still are not solved.
Essence:
Created on 2022-07-14 by the reprex package (v2.0.1)
@cbeleites, do you know how to solve this?
The text was updated successfully, but these errors were encountered: