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

Allow passing a vector of paths in where #55

Open
Bisaloo opened this issue Jun 9, 2023 · 0 comments
Open

Allow passing a vector of paths in where #55

Bisaloo opened this issue Jun 9, 2023 · 0 comments

Comments

@Bisaloo
Copy link
Member

Bisaloo commented Jun 9, 2023

library(lightr)

spec <- lr_get_spec(
  c(
    system.file("testdata", package = "lightr"), 
    system.file("testdata", "non_english", package = "lightr")
  ),
  ext = c(
    "TRM", "ttt", "jdx", "jaz", "JazIrrad", "csv", "txt",
    "Transmission", "spc"
  ),
  sep = ","
)
#> 20 files found; importing spectra:
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/FMNH6834.00000001.Master.Transmission':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/OO_comma.txt':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/OOusb4000.txt':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/OceanView.txt':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/OceanView_nonEN.txt':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/UK5.txt':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(con, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/avantes_export.ttt':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(filename, "rb"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/avantes_trans.TRM':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(con, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/irrad.JazIrrad':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning in file(file, "r"): cannot open file
#> '/home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/spec.csv':
#> No such file or directory
#> Warning in value[[3L]](cond): cannot open the connection
#> Warning: Could not import one or more files:
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/FMNH6834.00000001.Master.Transmission
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/OO_comma.txt
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/OOusb4000.txt
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/OceanView.txt
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/OceanView_nonEN.txt
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/UK5.txt
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/avantes_export.ttt
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/avantes_trans.TRM
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/irrad.JazIrrad
#> /home/hugo/.local/share/R/x86_64-pc-linux-gnu-library/4.3/lightr/testdata/non_english/spec.csv

head(spec)
#>    wl CRAIC_export FMNH6834.00000002.Master J_MUR_MARS_17_0001 OceanOptics
#> 1 300     5.710900                 3.178905           2.328048    125.9485
#> 2 301     5.794053                 2.940429           2.238900    125.0620
#> 3 302     4.326612                 2.697714           2.313921    127.3013
#> 4 303     4.178850                 2.544286           2.565386    127.9036
#> 5 304     3.671765                 2.756619           2.720976    127.9396
#> 6 305     2.784688                 2.816048           2.583169    128.0920
#>   OceanOptics_comma OceanOptics_period  avantes2 avantes_export_long  avasoft8
#> 1          126.3405           154.3030 12.964709           13.624678 252.16336
#> 2          127.2560           129.2981  8.262921            5.276307   0.00000
#> 3          126.8862           115.9120 11.605302           11.023560  74.36793
#> 4          126.2224           122.5818 13.189732           10.307208  34.58589
#> 5          127.8413           125.9307 15.073677            8.980705 101.20355
#> 6          127.9555           152.3136 14.371996            8.278200   0.00000
#>    jazspec
#> 1 13.78756
#> 2 13.10873
#> 3 12.70862
#> 4 12.93509
#> 5 13.02466
#> 6 13.64287

warnings()

Created on 2023-06-09 with reprex v2.0.2

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

No branches or pull requests

1 participant