diff --git a/404.html b/404.html index efafa7c..4b308ce 100644 --- a/404.html +++ b/404.html @@ -7,15 +7,15 @@ Page not found (404) • Isoreader - - + + - - + +
+

Reading files

-

Reading continuous flow files is as simple as passing one or multiple file or folder paths to the iso_read_continuous_flow() function. If folders are provided, any files that have a recognized continuous flow file extensions within those folders will be processed (e.g. all .dxf, .cf and .iarc). Here we read several files that are bundled with the package as examples (and whose paths can be retrieved using the iso_get_reader_example() function). Note that some of the files (.cf, .dxf) are individual analysis files whereas others (.iarc) are collections of several files.

+

Reading continuous flow files is as simple as passing one or multiple +file or folder paths to the iso_read_continuous_flow() +function. If folders are provided, any files that have a recognized +continuous flow file extensions within those folders will be processed +(e.g. all .dxf, .cf and .iarc). +Here we read several files that are bundled with the package as examples +(and whose paths can be retrieved using the +iso_get_reader_example() function). Note that some of the +files (.cf, .dxf) are individual analysis files whereas others (.iarc) +are collections of several files.

-# all available examples
-iso_get_reader_examples() %>% knitr::kable()
+# all available examples +iso_get_reader_examples() %>% knitr::kable()
@@ -208,36 +222,39 @@

Reading files
-# read a few of the continuous flow examples
-cf_files <-
-  iso_read_continuous_flow(
-    iso_get_reader_example("continuous_flow_example.cf"),
-    iso_get_reader_example("continuous_flow_example.iarc"),
-    iso_get_reader_example("continuous_flow_example.dxf")
-  )
-#> Info: preparing to read 3 data files (all will be cached)...
-#> Info: reading file 'continuous_flow_example.cf' with '.cf' reader...
-#> Info: reading file 'continuous_flow_example.iarc' with '.iarc' reader...
-#>       unpacking isoprime archive file...
-#>       found 1 processing list(s) in .iarc: 'ProcessingList_1'
-#>       found 2 method(s) in .iarc: 'Method_320', 'Method_77'
-#>       found 4 sample(s) in .iarc
-#>       searching processing list 'ProcessingList_1' for gas configurations...
-#>       found configurations for 'CO', 'SO2', 'CO2', 'H2', 'N2'
-#>       processing sample '6632_WSL-2 wood' (IRMS data '133.hdf5', '135.hdf5')
-#>       processing sample '6605_USGS41' (IRMS data '40.hdf5', '43.hdf5')
-#>       processing sample '6617_IAEA600' (IRMS data '80.hdf5', '82.hdf5')
-#>       processing sample '6630_GlutamicAcid04' (IRMS data '124.hdf5', '126.h...
-#> Info: reading file 'continuous_flow_example.dxf' with '.dxf' reader...
-#> Info: finished reading 3 files in 11.32 secs
+# read a few of the continuous flow examples +cf_files <- + iso_read_continuous_flow( + iso_get_reader_example("continuous_flow_example.cf"), + iso_get_reader_example("continuous_flow_example.iarc"), + iso_get_reader_example("continuous_flow_example.dxf") + ) +#> Info: preparing to read 3 data files (all will be cached)... +#> Info: reading file 'continuous_flow_example.cf' with '.cf' reader... +#> Info: reading file 'continuous_flow_example.iarc' with '.iarc' reader... +#> unpacking isoprime archive file... +#> found 1 processing list(s) in .iarc: 'ProcessingList_1' +#> found 2 method(s) in .iarc: 'Method_320', 'Method_77' +#> found 4 sample(s) in .iarc +#> searching processing list 'ProcessingList_1' for gas configurations... +#> found configurations for 'CO', 'SO2', 'CO2', 'H2', 'N2' +#> processing sample '6632_WSL-2 wood' (IRMS data '133.hdf5', '135.hdf5') +#> processing sample '6605_USGS41' (IRMS data '40.hdf5', '43.hdf5') +#> processing sample '6617_IAEA600' (IRMS data '80.hdf5', '82.hdf5') +#> processing sample '6630_GlutamicAcid04' (IRMS data '124.hdf5', '126.h... +#> Info: reading file 'continuous_flow_example.dxf' with '.dxf' reader... +#> Info: finished reading 3 files in 13.96 secs

File summary

-

The cf_files variable now contains a set of isoreader objects, one for each file. Take a look at what information was retrieved from the files using the iso_get_data_summary() function.

+

The cf_files variable now contains a set of isoreader +objects, one for each file. Take a look at what information was +retrieved from the files using the iso_get_data_summary() +function.

-cf_files %>% iso_get_data_summary() %>% knitr::kable()
-#> Info: aggregating data summary from 6 data file(s)
+cf_files %>% iso_get_data_summary() %>% knitr::kable() +#> Info: aggregating data summary from 6 data file(s)

@@ -309,9 +326,14 @@

File summary

Problems

-

In case there was any trouble with reading any of the files, the following functions provide an overview summary as well as details of all errors and warnings, respectively. The examples here contain no errors but if you run into any unexpected file read problems, please file a bug report in the isoreader issue tracker.

+

In case there was any trouble with reading any of the files, the +following functions provide an overview summary as well as details of +all errors and warnings, respectively. The examples here contain no +errors but if you run into any unexpected file read problems, please +file a bug report in the isoreader issue +tracker.

-cf_files %>% iso_get_problems_summary() %>% knitr::kable()
+cf_files %>% iso_get_problems_summary() %>% knitr::kable()

@@ -321,7 +343,7 @@

Problems

file_id
+cf_files %>% iso_get_problems() %>% knitr::kable()
@@ -336,11 +358,19 @@

Problems

File Information

-

Detailed file information can be aggregated for all isofiles using the iso_get_file_info() function which supports the full select syntax of the dplyr package to specify which columns are of interest (by default, all file information is retrieved). Additionally, file information from different file formats can be renamed to the same column name for easy of downstream processing. The following provides a few examples for how this can be used (the names of the interesting info columns may vary between different file formats):

+

Detailed file information can be aggregated for all isofiles using +the iso_get_file_info() function which supports the full select +syntax of the dplyr +package to specify which columns are of interest (by default, all file +information is retrieved). Additionally, file information from different +file formats can be renamed to the same column name for easy of +downstream processing. The following provides a few examples for how +this can be used (the names of the interesting info columns may vary +between different file formats):

-# all file information
-cf_files %>% iso_get_file_info(select = c(-file_root)) %>% knitr::kable()
-#> Info: aggregating file info from 6 data file(s), selecting info columns 'c(-file_root)'
+# all file information +cf_files %>% iso_get_file_info(select = c(-file_root)) %>% knitr::kable() +#> Info: aggregating file info from 6 data file(s), selecting info columns 'c(-file_root)'

file_id
@@ -645,26 +675,31 @@

File Information0

- +
0 SampleSet Sample Dilution to 0 [%] , Sample dilution: 000 0 , Set Reference Dilution to 69 [%] , Peak Center found at [59732] , Sample Dilution found at 0 [] , Set Sample Dilution to 0 [%] , Sample dilution: 000 0 , Detector Signal added: Ret:145.171[sec] Ampl:2321 [mV] : 12:47:38 N2, Set Reference Dilution to 57 [%] , Set Sample Dilution to 89 [%] , Sample dilution: 001 1Set Sample Dilution to 0 [%] , Sample dilution: 000 0 , +Set Reference Dilution to 69 [%] , Peak Center found at [59732] , Sample +Dilution found at 0 [] , Set Sample Dilution to 0 [%] , Sample dilution: +000 0 , Detector Signal added: Ret:145.171[sec] Ampl:2321 [mV] : +12:47:38 N2, Set Reference Dilution to 57 [%] , Set Sample Dilution to +89 [%] , Sample dilution: 001 1
-# select file information
-cf_files %>%
-  iso_get_file_info(
-    select = c(
-       # rename sample id columns from the different file types to a new ID column
-      ID = `Identifier 1`, ID = `Name`,
-      # select columns without renaming
-      Analysis, `Peak Center`, `H3 Factor`,
-      # select the time stamp and rename it to `Date & Time`
-      `Date & Time` = file_datetime
-    ),
-    # explicitly allow for file specific rename (for the new ID column)
-    file_specific = TRUE
-  ) %>% knitr::kable()
-#> Info: aggregating file info from 6 data file(s), selecting info columns 'c(ID = `Identifier 1`, ID = Name, Analysis, `Peak Center`, `H3 Factor`, `Date & Time` = file_datetime)'
+# select file information +cf_files %>% + iso_get_file_info( + select = c( + # rename sample id columns from the different file types to a new ID column + ID = `Identifier 1`, ID = `Name`, + # select columns without renaming + Analysis, `Peak Center`, `H3 Factor`, + # select the time stamp and rename it to `Date & Time` + `Date & Time` = file_datetime + ), + # explicitly allow for file specific rename (for the new ID column) + file_specific = TRUE + ) %>% knitr::kable() +#> Info: aggregating file info from 6 data file(s), selecting info columns 'c(ID = `Identifier 1`, ID = Name, Analysis, `Peak Center`, `H3 Factor`, `Date & Time` = file_datetime)'
@@ -736,24 +771,30 @@

File Information

Select/Rename

-

Rather than retrieving specific file info columns using the above example of iso_get_file_info(select = ...), these information can also be modified across an entire collection of isofiles using the iso_select_file_info() and iso_rename_file_info() functions. For example, the above example could be similarly achieved with the following use of iso_select_file_info():

+

Rather than retrieving specific file info columns using the above +example of iso_get_file_info(select = ...), these +information can also be modified across an entire collection of isofiles +using the iso_select_file_info() and +iso_rename_file_info() functions. For example, the above +example could be similarly achieved with the following use of +iso_select_file_info():

-# select + rename specific file info columns
-cf_files2 <- cf_files %>%
-  iso_select_file_info(
-    ID = `Identifier 1`, ID = `Name`, Analysis, `Peak Center`, `H3 Factor`,
-    `Date & Time` = file_datetime,
-    # recode to the same name in different files
-    `Sample Weight` = `Identifier 2`, `Sample Weight` = `EA Sample Weight`,
-    file_specific = TRUE
-  )
-#> Info: selecting/renaming the following file info:
-#>  - for 4 file(s): 'file_id', 'Name'->'ID', 'file_datetime'->'Date & Time', 'EA Sample Weight'->'Sample Weight'
-#>  - for 2 file(s): 'file_id', 'Identifier 1'->'ID', 'Analysis', 'Peak Center', 'H3 Factor', 'file_datetime'->'Date & Time', 'Identifier 2'->'Sample Weight'
-
-# fetch all file info
-cf_files2 %>% iso_get_file_info() %>% knitr::kable()
-#> Info: aggregating file info from 6 data file(s)
+# select + rename specific file info columns +cf_files2 <- cf_files %>% + iso_select_file_info( + ID = `Identifier 1`, ID = `Name`, Analysis, `Peak Center`, `H3 Factor`, + `Date & Time` = file_datetime, + # recode to the same name in different files + `Sample Weight` = `Identifier 2`, `Sample Weight` = `EA Sample Weight`, + file_specific = TRUE + ) +#> Info: selecting/renaming the following file info: +#> - for 4 file(s): 'file_id', 'Name'->'ID', 'file_datetime'->'Date & Time', 'EA Sample Weight'->'Sample Weight' +#> - for 2 file(s): 'file_id', 'Identifier 1'->'ID', 'Analysis', 'Peak Center', 'H3 Factor', 'file_datetime'->'Date & Time', 'Identifier 2'->'Sample Weight' + +# fetch all file info +cf_files2 %>% iso_get_file_info() %>% knitr::kable() +#> Info: aggregating file info from 6 data file(s)

@@ -834,15 +875,28 @@

Select/Rename

Filter

-

Any collection of isofiles can also be filtered based on the available file information using the function iso_filter_files. This function can operate on any column available in the file information and supports full dplyr syntax.

+

Any collection of isofiles can also be filtered based on the +available file information using the function +iso_filter_files. This function can operate on any column +available in the file information and supports full dplyr +syntax.

-# find files that have 'acetanilide' in the new ID field
-cf_files2 %>% iso_filter_files(grepl("acetanilide", ID)) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 1 of 6 files
-#> Info: aggregating file info from 1 data file(s)
+# find files that have 'acetanilide' in the new ID field +cf_files2 %>% iso_filter_files(grepl("acetanilide", ID)) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 1 of 6 files +#> Info: aggregating file info from 1 data file(s)

+++++++++ @@ -863,15 +917,24 @@

Filter

file_id ID
-
-# find files that were run since 2015
-cf_files2 %>%
-  iso_filter_files(`Date & Time` > "2015-01-01") %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 1 of 6 files
-#> Info: aggregating file info from 1 data file(s)
+ +# find files that were run since 2015 +cf_files2 %>% + iso_filter_files(`Date & Time` > "2015-01-01") %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 1 of 6 files +#> Info: aggregating file info from 1 data file(s)
+++++++++ @@ -895,25 +958,31 @@

Filter

Mutate

-

The file information in any collection of isofiles can also be mutated using the function iso_mutate_file_info. This function can introduce new columns and operate on any existing columns available in the file information (even if it does not exist in all files) and supports full dplyr syntax. It can also be used in conjunction with iso_with_unit to generate values with implicit units.

+

The file information in any collection of isofiles can also be +mutated using the function iso_mutate_file_info. This +function can introduce new columns and operate on any existing columns +available in the file information (even if it does not exist in all +files) and supports full dplyr +syntax. It can also be used in conjunction with +iso_with_unit to generate values with implicit units.

-cf_files3 <-
-  cf_files2 %>%
-  iso_mutate_file_info(
-    # update existing column
-    ID = paste("ID:", ID),
-    # introduce new column
-    `Run since 2015?` = `Date & Time` > "2015-01-01",
-    # parse weight as a number and turn into a column with units
-    `Sample Weight` = `Sample Weight` %>% parse_number() %>% iso_with_units("mg")
-  )
-#> Info: mutating file info for 6 data file(s)
-
-cf_files3 %>%
-  iso_get_file_info() %>%
-  iso_make_units_explicit() %>%
-  knitr::kable()
-#> Info: aggregating file info from 6 data file(s)
+cf_files3 <- + cf_files2 %>% + iso_mutate_file_info( + # update existing column + ID = paste("ID:", ID), + # introduce new column + `Run since 2015?` = `Date & Time` > "2015-01-01", + # parse weight as a number and turn into a column with units + `Sample Weight` = `Sample Weight` %>% parse_number() %>% iso_with_units("mg") + ) +#> Info: mutating file info for 6 data file(s) + +cf_files3 %>% + iso_get_file_info() %>% + iso_make_units_explicit() %>% + knitr::kable() +#> Info: aggregating file info from 6 data file(s)

file_id ID
@@ -1002,25 +1071,39 @@

Mutate

Add

-

Additionally, a wide range of new file information can be added in the form of a data frame with any number of columns (usually read from a comma-separated-value/csv file or an Excel/xlsx file) using the function iso_add_file_info and specifying which existing file information should be used to merge in the new information. It is similar to dplyr’s left_join but with additional safety checks and the possibility to join the new information sequentially as illustrated below.

+

Additionally, a wide range of new file information can be added in +the form of a data frame with any number of columns (usually read from a +comma-separated-value/csv file or an Excel/xlsx file) using the function +iso_add_file_info and specifying which existing file +information should be used to merge in the new information. It is +similar to dplyr’s +left_join but with additional safety checks and the possibility to +join the new information sequentially as illustrated below.

-# this kind of information data frame is frequently read in from a csv or xlsx file
-new_info <-
-  dplyr::bind_rows(
-    # new information based on new vs. old samples
-    dplyr::tribble(
-      ~file_id, ~`Run since 2015?`,  ~process,  ~info,
-       NA,       TRUE,                "yes",     "new runs",
-       NA,       FALSE,               "yes",     "old runs"
-    ),
-    # new information for a single specific file
-    dplyr::tribble(
-      ~file_id,        ~process,  ~note,
-       "6617_IAEA600",  "no",      "did not inject properly"
-    )
-  )
-new_info %>% knitr::kable()
+# this kind of information data frame is frequently read in from a csv or xlsx file +new_info <- + dplyr::bind_rows( + # new information based on new vs. old samples + dplyr::tribble( + ~file_id, ~`Run since 2015?`, ~process, ~info, + NA, TRUE, "yes", "new runs", + NA, FALSE, "yes", "old runs" + ), + # new information for a single specific file + dplyr::tribble( + ~file_id, ~process, ~note, + "6617_IAEA600", "no", "did not inject properly" + ) + ) +new_info %>% knitr::kable()

+++++++ @@ -1053,17 +1136,24 @@

Add

file_id Run since 2015?
-
-# adding it to the isofiles
-cf_files3 %>%
-  iso_add_file_info(new_info, by1 = "Run since 2015?", by2 = "file_id") %>%
-  iso_get_file_info(select = !!names(new_info)) %>%
-  knitr::kable()
-#> Info: adding new file information ('process', 'info', 'note') to 6 data file(s), joining by 'Run since 2015?' then 'file_id'...
-#>  - 'Run since 2015?' join: 2/2 new info rows matched 6/6 data files - 1 of these was/were also matched by subsequent joins which took precedence
-#>  - 'file_id' join: 1/1 new info rows matched 1/6 data files
-#> Info: aggregating file info from 6 data file(s), selecting info columns 'file_id', 'Run since 2015?', 'process', 'info', 'note'
- + +# adding it to the isofiles +cf_files3 %>% + iso_add_file_info(new_info, by1 = "Run since 2015?", by2 = "file_id") %>% + iso_get_file_info(select = !!names(new_info)) %>% + knitr::kable() +#> Info: adding new file information ('process', 'info', 'note') to 6 data file(s), joining by 'Run since 2015?' then 'file_id'... +#> - 'Run since 2015?' join: 2/2 new info rows matched 6/6 data files - 1 of these was/were also matched by subsequent joins which took precedence +#> - 'file_id' join: 1/1 new info rows matched 1/6 data files +#> Info: aggregating file info from 6 data file(s), selecting info columns 'file_id', 'Run since 2015?', 'process', 'info', 'note' +
+++++++ @@ -1120,25 +1210,41 @@

Add

Parse

-

Most file information is initially read as text to avoid cumbersome specifications during the read process and compatibility issues between different IRMS file formats. However, many file info columns are not easily processed as text. The isoreader package therefore provides several parsing and data extraction functions to facilitate processing the text-based data (some via functionality implemented by the readr package). See code block below for examples. For a complete overview, see the ?extract_data and ?iso_parse_file_info documentation.

+

Most file information is initially read as text to avoid cumbersome +specifications during the read process and compatibility issues between +different IRMS file formats. However, many file info columns are not +easily processed as text. The isoreader package therefore provides +several parsing and data extraction functions to facilitate processing +the text-based data (some via functionality implemented by the readr package). See code block +below for examples. For a complete overview, see the +?extract_data and ?iso_parse_file_info +documentation.

-# use parsing and extraction in iso_mutate_file_info
-cf_files2 %>%
-  iso_mutate_file_info(
-    # change type of Peak Center to logical
-    `Peak Center` = parse_logical(`Peak Center`),
-    # retrieve first word of file_id
-    file_id_1st = extract_word(file_id),
-    # retrieve second word of ID column
-    file_id_2nd = extract_word(file_id, 2),
-    # retrieve file extension from the file_id using regular expression
-    name = extract_substring(ID, "(\\w+)-?(.*)?", capture_bracket = 1)
-  ) %>%
-  iso_get_file_info(select = c(matches("file_id"), ID, name, `Peak Center`)) %>%
-  knitr::kable()
-#> Info: mutating file info for 6 data file(s)
-#> Info: aggregating file info from 6 data file(s), selecting info columns 'c(matches("file_id"), ID, name, `Peak Center`)'
+# use parsing and extraction in iso_mutate_file_info +cf_files2 %>% + iso_mutate_file_info( + # change type of Peak Center to logical + `Peak Center` = parse_logical(`Peak Center`), + # retrieve first word of file_id + file_id_1st = extract_word(file_id), + # retrieve second word of ID column + file_id_2nd = extract_word(file_id, 2), + # retrieve file extension from the file_id using regular expression + name = extract_substring(ID, "(\\w+)-?(.*)?", capture_bracket = 1) + ) %>% + iso_get_file_info(select = c(matches("file_id"), ID, name, `Peak Center`)) %>% + knitr::kable() +#> Info: mutating file info for 6 data file(s) +#> Info: aggregating file info from 6 data file(s), selecting info columns 'c(matches("file_id"), ID, name, `Peak Center`)'

file_id Run since 2015?
++++++++ @@ -1199,14 +1305,14 @@

Parse

file_id file_id_1st
-
-# use parsing in iso_filter_file_info
-cf_files2 %>%
-  iso_filter_files(parse_number(`H3 Factor`) > 2) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 1 of 6 files
-#> Info: aggregating file info from 1 data file(s)
+ +# use parsing in iso_filter_file_info +cf_files2 %>% + iso_filter_files(parse_number(`H3 Factor`) > 2) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 1 of 6 files +#> Info: aggregating file info from 1 data file(s) @@ -1237,21 +1343,21 @@

Parse

-
-# use iso_parse_file_info for simplified parsing of column data types
-cf_files2 %>%
-  iso_parse_file_info(
-    integer = Analysis,
-    number = `H3 Factor`,
-    logical = `Peak Center`
-  ) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: parsing 3 file info columns for 6 data file(s):
-#>  - to integer: 'Analysis'
-#>  - to logical: 'Peak Center'
-#>  - to number: 'H3 Factor'
-#> Info: aggregating file info from 6 data file(s)
+ +# use iso_parse_file_info for simplified parsing of column data types +cf_files2 %>% + iso_parse_file_info( + integer = Analysis, + number = `H3 Factor`, + logical = `Peak Center` + ) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: parsing 3 file info columns for 6 data file(s): +#> - to integer: 'Analysis' +#> - to logical: 'Peak Center' +#> - to number: 'H3 Factor' +#> Info: aggregating file info from 6 data file(s) @@ -1333,10 +1439,12 @@

Parse

Resistors

-

Additionally, some IRMS data files contain resistor information that are useful for downstream calculations (see e.g. section on signal conversion later in this vignette):

+

Additionally, some IRMS data files contain resistor information that +are useful for downstream calculations (see e.g. section on signal +conversion later in this vignette):

-cf_files %>% iso_get_resistors() %>% knitr::kable()
-#> Info: aggregating resistors info from 6 data file(s)
+cf_files %>% iso_get_resistors() %>% knitr::kable() +#> Info: aggregating resistors info from 6 data file(s)

@@ -1401,10 +1509,18 @@

Reference values

As well as isotopic reference values for the different gases:

-# reference delta values without ratio values
-cf_files %>% iso_get_standards(file_id:reference) %>% knitr::kable()
-#> Info: aggregating standards info from 6 data file(s)
+# reference delta values without ratio values +cf_files %>% iso_get_standards(file_id:reference) %>% knitr::kable() +#> Info: aggregating standards info from 6 data file(s)

file_id
++++++++ @@ -1449,9 +1565,9 @@

Reference values

file_id standard
-# reference values with ratios
-cf_files %>% iso_get_standards() %>% knitr::kable()
-#> Info: aggregating standards info from 6 data file(s)
+# reference values with ratios +cf_files %>% iso_get_standards() %>% knitr::kable() +#> Info: aggregating standards info from 6 data file(s) @@ -1592,11 +1708,16 @@

Reference values

Raw Data

-

The raw data read from the IRMS files can be retrieved similarly using the iso_get_raw_data() function. Most data aggregation functions also allow for inclusion of file information using the include_file_info parameter, which functions identically to the select parameter of the iso_get_file_info function discussed earlier.

+

The raw data read from the IRMS files can be retrieved similarly +using the iso_get_raw_data() function. Most data +aggregation functions also allow for inclusion of file information using +the include_file_info parameter, which functions +identically to the select parameter of the +iso_get_file_info function discussed earlier.

-# get raw data with default selections (all raw data, no additional file info)
-cf_files %>% iso_get_raw_data() %>% head(n=10) %>% knitr::kable()
-#> Info: aggregating raw data from 6 data file(s)
+# get raw data with default selections (all raw data, no additional file info) +cf_files %>% iso_get_raw_data() %>% head(n=10) %>% knitr::kable() +#> Info: aggregating raw data from 6 data file(s)

@@ -1818,17 +1939,17 @@

Raw Data

-# get specific raw data and add some file information
-cf_files %>%
-  iso_get_raw_data(
-    # select just time and the m/z 2 and 3 ions
-    select = c(time.s, v2.mV, v3.mV),
-    # include the Analysis number fron the file info and rename it to 'run'
-    include_file_info = c(run = Analysis)
-  ) %>%
-  # look at first few records only
-  head(n=10) %>% knitr::kable()
-#> Info: aggregating raw data from 6 data file(s), selecting data columns 'c(time.s, v2.mV, v3.mV)', including file info 'c(run = Analysis)'
+# get specific raw data and add some file information +cf_files %>% + iso_get_raw_data( + # select just time and the m/z 2 and 3 ions + select = c(time.s, v2.mV, v3.mV), + # include the Analysis number fron the file info and rename it to 'run' + include_file_info = c(run = Analysis) + ) %>% + # look at first few records only + head(n=10) %>% knitr::kable() +#> Info: aggregating raw data from 6 data file(s), selecting data columns 'c(time.s, v2.mV, v3.mV)', including file info 'c(run = Analysis)' @@ -1914,16 +2035,31 @@

Raw Data

Data Processing

-

The isoreader package is intended to make raw stable isotope data easily accessible. However, as with most analytical data, there is significant downstream processing required to turn these raw intensity chromatograms into peak-specific, properly referenced isotopic measurements. This and similar functionality as well as data visualization is part of the isoprocessor package which takes isotopic data through the various corrections in a transparent, efficient and reproducible manner.

-

That said, most vendor software also performs some of these calculations and it can be useful to be able to compare new data reduction procedures against those implemented in the vendor software. For this purpose, isoreader retrieves vendor computed data tables whenever possible, as illustrated below.

+

The isoreader package is intended to make raw stable isotope data +easily accessible. However, as with most analytical data, there is +significant downstream processing required to turn these raw intensity +chromatograms into peak-specific, properly referenced isotopic +measurements. This and similar functionality as well as data +visualization is part of the isoprocessor package which +takes isotopic data through the various corrections in a transparent, +efficient and reproducible manner.

+

That said, most vendor software also performs some of these +calculations and it can be useful to be able to compare new data +reduction procedures against those implemented in the vendor software. +For this purpose, isoreader retrieves vendor computed data tables +whenever possible, as illustrated below.

Vendor Data Table

-

As with most data retrieval functions, the iso_get_vendor_data_table() function also allows specific column selection (by default, all columns are selected) and easy addition of file information via the include_file_info parameter (by default, none is included).

+

As with most data retrieval functions, the +iso_get_vendor_data_table() function also allows specific +column selection (by default, all columns are selected) and easy +addition of file information via the include_file_info +parameter (by default, none is included).

-# entire vendor data table
-cf_files %>% iso_get_vendor_data_table() %>% knitr::kable()
-#> Info: aggregating vendor data table from 6 data file(s)
+# entire vendor data table +cf_files %>% iso_get_vendor_data_table() %>% knitr::kable() +#> Info: aggregating vendor data table from 6 data file(s)

file_id
@@ -4062,17 +4198,26 @@

Vendor Data Table
-# get specific parts and add some file information
-cf_files %>%
-  iso_get_vendor_data_table(
-    # select peak number, ret. time, overall intensity and all H delta columns
-    select = c(Nr., Rt, area = `rIntensity All`, matches("^d \\d+H")),
-    # include the Analysis number fron the file info and rename it to 'run'
-    include_file_info = c(run = Analysis)
-  ) %>%
-  knitr::kable()
-#> Info: aggregating vendor data table from 6 data file(s), including file info 'c(run = Analysis)'
-

+# get specific parts and add some file information +cf_files %>% + iso_get_vendor_data_table( + # select peak number, ret. time, overall intensity and all H delta columns + select = c(Nr., Rt, area = `rIntensity All`, matches("^d \\d+H")), + # include the Analysis number fron the file info and rename it to 'run' + include_file_info = c(run = Analysis) + ) %>% + knitr::kable() +#> Info: aggregating vendor data table from 6 data file(s), including file info 'c(run = Analysis)' +
+++++++++ @@ -4311,21 +4456,30 @@

Vendor Data Table
-
-# the data table also provides units if included in the original data file
-# which can be made explicit using the function iso_make_units_explicit()
-cf_files %>%
-  iso_get_vendor_data_table(
-    # select peak number, ret. time, overall intensity and all H delta columns
-    select = c(Nr., Rt, area = `rIntensity All`, matches("^d \\d+H")),
-    # include the Analysis number fron the file info and rename it to 'run'
-    include_file_info = c(run = Analysis)
-  ) %>%
-  # make column units explicit
-  iso_make_units_explicit() %>%
-  knitr::kable()
-#> Info: aggregating vendor data table from 6 data file(s), including file info 'c(run = Analysis)'
+ +# the data table also provides units if included in the original data file +# which can be made explicit using the function iso_make_units_explicit() +cf_files %>% + iso_get_vendor_data_table( + # select peak number, ret. time, overall intensity and all H delta columns + select = c(Nr., Rt, area = `rIntensity All`, matches("^d \\d+H")), + # include the Analysis number fron the file info and rename it to 'run' + include_file_info = c(run = Analysis) + ) %>% + # make column units explicit + iso_make_units_explicit() %>% + knitr::kable() +#> Info: aggregating vendor data table from 6 data file(s), including file info 'c(run = Analysis)'

file_id run
+++++++++ @@ -4568,29 +4722,38 @@

Vendor Data Table

For expert users: retrieving all data

-

For users familiar with the nested data frames from the tidyverse (particularly tidyr’s nest and unnest), there is an easy way to retrieve all data from the iso file objects in a single nested data frame:

+

For users familiar with the nested data frames from the tidyverse (particularly tidyr’s nest and +unnest), there is an easy way to retrieve all data from the +iso file objects in a single nested data frame:

-all_data <- cf_files %>% iso_get_all_data()
-#> Info: aggregating all data from 6 data file(s)
-# not printed out because this data frame is very big
+all_data <- cf_files %>% iso_get_all_data() +#> Info: aggregating all data from 6 data file(s) +# not printed out because this data frame is very big

Saving collections

-

Saving entire collections of isofiles for retrieval at a later point is easily done using the iso_save function which stores collections or individual isoreader file objects in the efficient R data storage format .rds (if not specified, the extension .cf.rds will be automatically appended). These saved collections can be conveniently read back using the same iso_read_continuous_flow command used for raw data files.

+

Saving entire collections of isofiles for retrieval at a later point +is easily done using the iso_save function which stores +collections or individual isoreader file objects in the efficient R data +storage format .rds (if not specified, the extension +.cf.rds will be automatically appended). These saved +collections can be conveniently read back using the same +iso_read_continuous_flow command used for raw data +files.

-# export to R data archive
-cf_files %>% iso_save("cf_files_export.cf.rds")
-#> Info: exporting data from 6 iso_files into R Data Storage 'cf_files_export.cf.rds'
-
-# read back the exported R data archive
-cf_files <- iso_read_continuous_flow("cf_files_export.cf.rds")
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'cf_files_export.cf.rds' with '.cf.rds' reader...
-#> Info: loaded 6 data files from R Data Storage
-#> Info: finished reading 1 files in 0.12 secs
-cf_files %>% iso_get_data_summary() %>% knitr::kable()
-#> Info: aggregating data summary from 6 data file(s)
+# export to R data archive +cf_files %>% iso_save("cf_files_export.cf.rds") +#> Info: exporting data from 6 iso_files into R Data Storage 'cf_files_export.cf.rds' + +# read back the exported R data archive +cf_files <- iso_read_continuous_flow("cf_files_export.cf.rds") +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'cf_files_export.cf.rds' with '.cf.rds' reader... +#> Info: loaded 6 data files from R Data Storage +#> Info: finished reading 1 files in 0.17 secs +cf_files %>% iso_get_data_summary() %>% knitr::kable() +#> Info: aggregating data summary from 6 data file(s)

file_id run
@@ -4663,19 +4826,24 @@

Saving collections

Data Export

-

At the moment, isoreader supports export of all data to Excel and the Feather file format (a Python/R cross-over format). Note that both export methods have similar syntax and append the appropriate file extension for each type of export file (.cf.xlsx and .cf.feather, respectively).

+

At the moment, isoreader supports export of all data to Excel and the +Feather file format +(a Python/R cross-over format). Note that both export methods have +similar syntax and append the appropriate file extension for each type +of export file (.cf.xlsx and .cf.feather, +respectively).

-# export to excel
-cf_files %>% iso_export_to_excel("cf_files_export")
-
-# data sheets available in the exported data file:
-readxl::excel_sheets("cf_files_export.cf.xlsx")
+# export to excel +cf_files %>% iso_export_to_excel("cf_files_export") + +# data sheets available in the exported data file: +readxl::excel_sheets("cf_files_export.cf.xlsx")
-# export to feather
-cf_files %>% iso_export_to_feather("cf_files_export")
-
-# exported feather files
-list.files(pattern = ".cf.feather")
+# export to feather +cf_files %>% iso_export_to_feather("cf_files_export") + +# exported feather files +list.files(pattern = ".cf.feather") @@ -4696,7 +4864,7 @@

Data Export

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/articles/development.html b/articles/development.html index 685fe66..2082548 100644 --- a/articles/development.html +++ b/articles/development.html @@ -39,7 +39,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -102,12 +102,12 @@ -
+

@@ -279,163 +297,225 @@

Adding new file format readers
-
-# copy an example file from the package with the new extension
-iso_get_reader_example("dual_inlet_example.did") %>% file.copy(to = "example.new.did")
-#> [1] TRUE
-
-# read the file
-iso_read_dual_inlet("example.new.did", read_cache = FALSE)
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'example.new.did' with '.new.did' reader...
-#> Info: this is the new reader!
-#> List of 7
-#>  $ version          :Classes 'package_version', 'numeric_version'  hidden list of 1
-#>   ..$ : int [1:3] 1 3 3
-#>  $ read_options     :List of 4
-#>   ..$ file_info        : logi TRUE
-#>   ..$ method_info      : logi TRUE
-#>   ..$ raw_data         : logi TRUE
-#>   ..$ vendor_data_table: logi TRUE
-#>  $ file_info        : tibble [1 × 6] (S3: tbl_df/tbl/data.frame)
-#>   ..$ file_id      : chr "example.new.did"
-#>   ..$ file_root    : chr "."
-#>   ..$ file_path    : chr "example.new.did"
-#>   ..$ file_subpath : chr NA
-#>   ..$ file_datetime: POSIXct[1:1], format: NA
-#>   ..$ file_size    : int 134446
-#>  $ method_info      : list()
-#>  $ raw_data         : tibble [0 × 0] (S3: tbl_df/tbl/data.frame)
-#>  Named list()
-#>  $ vendor_data_table: tibble [0 × 0] (S3: tbl_df/tbl/data.frame)
-#>  Named list()
-#>  $ bgrd_data        : tibble [0 × 0] (S3: tbl_df/tbl/data.frame)
-#>  Named list()
-#>  - attr(*, "class")= chr [1:2] "dual_inlet" "iso_file"
-#>  - attr(*, "problems")= tibble [0 × 3] (S3: tbl_df/tbl/data.frame)
-#>   ..$ type   : chr(0) 
-#>   ..$ func   : chr(0) 
-#>   ..$ details: chr(0)
-#> Info: finished reading 1 files in 0.35 secs
-#> Dual inlet iso file 'example.new.did': 0 cycles, 0 ions ()
-file.remove("example.new.did")
-#> [1] TRUE
-

Note that for parallel processing to work during the read process (parallel = TRUE), isoreader needs to know where to find the new reader function. It will figure this out automatically as long as the function name is unique but if this fails (or to be on the safe side), please specify e.g. env = "R_GlobalEnv" or env = "newpackage" during the reader registration. Also note that isoreader will not automatically know where to find all functions called from within the new reader function if they are not part of base R and it is recommended to make all outside calls explicit (e.g. dplyr::filter(...)) to preempt this potential problem. For info messages and warnings to work with the progress bar and in parallel reads, make sure to use isoreader:::log_message(...) and isoreader:::log_warning(...) instead of base R’s message(...) and warning(...).

-

If you have designed and tested a new reader, please consider contributing it to the isoreader github repository via pull request.

+ +# copy an example file from the package with the new extension +iso_get_reader_example("dual_inlet_example.did") %>% file.copy(to = "example.new.did") +#> [1] TRUE + +# read the file +iso_read_dual_inlet("example.new.did", read_cache = FALSE) +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'example.new.did' with '.new.did' reader... +#> Info: this is the new reader! +#> List of 7 +#> $ version :Classes 'package_version', 'numeric_version' hidden list of 1 +#> ..$ : int [1:3] 1 4 0 +#> $ read_options :List of 4 +#> ..$ file_info : logi TRUE +#> ..$ method_info : logi TRUE +#> ..$ raw_data : logi TRUE +#> ..$ vendor_data_table: logi TRUE +#> $ file_info : tibble [1 × 6] (S3: tbl_df/tbl/data.frame) +#> ..$ file_id : chr "example.new.did" +#> ..$ file_root : chr "." +#> ..$ file_path : chr "example.new.did" +#> ..$ file_subpath : chr NA +#> ..$ file_datetime: POSIXct[1:1], format: NA +#> ..$ file_size : int 134446 +#> $ method_info : list() +#> $ raw_data : tibble [0 × 0] (S3: tbl_df/tbl/data.frame) +#> Named list() +#> $ vendor_data_table: tibble [0 × 0] (S3: tbl_df/tbl/data.frame) +#> Named list() +#> $ bgrd_data : tibble [0 × 0] (S3: tbl_df/tbl/data.frame) +#> Named list() +#> - attr(*, "class")= chr [1:2] "dual_inlet" "iso_file" +#> - attr(*, "problems")= tibble [0 × 3] (S3: tbl_df/tbl/data.frame) +#> ..$ type : chr(0) +#> ..$ func : chr(0) +#> ..$ details: chr(0) +#> Info: finished reading 1 files in 0.54 secs +#> Dual inlet iso file 'example.new.did': 0 cycles, 0 ions () +file.remove("example.new.did") +#> [1] TRUE +

Note that for parallel processing to work during the read process +(parallel = TRUE), isoreader needs to know where to find +the new reader function. It will figure this out automatically as long +as the function name is unique but if this fails (or to be on the safe +side), please specify e.g. env = "R_GlobalEnv" or +env = "newpackage" during the reader registration. Also +note that isoreader will not automatically know where to find all +functions called from within the new reader function if they are not +part of base R and it is recommended to make all outside calls explicit +(e.g. dplyr::filter(...)) to preempt this potential +problem. For info messages and warnings to work with the progress bar +and in parallel reads, make sure to use +isoreader:::log_message(...) and +isoreader:::log_warning(...) instead of base R’s +message(...) and warning(...).

+

If you have designed and tested a new reader, please consider +contributing it to the isoreader github repository via pull +request.

Processing hooks

-

Isoreader defines two processing hooks at the beginning and end of reading an individual file. This is useful for integration into pipelines that require additional output (such as GUIs) but is also sometimes useful for debugging purposes. The expressions are evaluated in the context of the isoreader:::read_iso_file function and have access to all parameters passed to this function, such as e.g. file_n and path. Same as for new readers: for info messages and warnings to work with the progress bar and in parallel reads, make sure to use isoreader:::log_message(...) and isoreader:::log_warning(...) instead of base R’s message(...) and warning(...). The main difference between the two is that log_message() will honor the quiet = TRUE flag passed to the main iso_read...() call whereas log_warning() will always show its message no matter the quiet setting.

+

Isoreader defines two processing hooks at the beginning and end of +reading an individual file. This is useful for integration into +pipelines that require additional output (such as GUIs) but is also +sometimes useful for debugging purposes. The expressions are evaluated +in the context of the isoreader:::read_iso_file function +and have access to all parameters passed to this function, such as +e.g. file_n and path. Same as for new readers: +for info messages and warnings to work with the progress bar and in +parallel reads, make sure to use +isoreader:::log_message(...) and +isoreader:::log_warning(...) instead of base R’s +message(...) and warning(...). The main +difference between the two is that log_message() will honor +the quiet = TRUE flag passed to the main +iso_read...() call whereas log_warning() will +always show its message no matter the quiet setting.

-isoreader:::set_read_file_event_expr({
-  isoreader:::log_message(sprintf("starting file #%.d, named '%s'", file_n, basename(path)))
-})
-isoreader:::set_finish_file_event_expr({
-  isoreader:::log_message(sprintf("finished file #%.d", file_n))
-})
-
-c(
-  iso_get_reader_example("dual_inlet_example.did"),
-  iso_get_reader_example("dual_inlet_example.caf")
-) %>% iso_read_dual_inlet(read_cache = FALSE)
-#> Info: preparing to read 2 data files (all will be cached)...
-#> Info: reading file 'dual_inlet_example.did' with '.did' reader...
-#> Info: starting file #1, named 'dual_inlet_example.did'
-#> Info: finished file #1
-#> Info: reading file 'dual_inlet_example.caf' with '.caf' reader...
-#> Info: starting file #2, named 'dual_inlet_example.caf'
-#> Info: finished file #2
-#> Info: finished reading 2 files in 6.43 secs
-#> Data from 2 dual inlet iso files: 
-#> # A tibble: 2 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-
-isoreader:::initialize_options() # reset all isoreader options
+isoreader:::set_read_file_event_expr({ + isoreader:::log_message(sprintf("starting file #%.d, named '%s'", file_n, basename(path))) +}) +isoreader:::set_finish_file_event_expr({ + isoreader:::log_message(sprintf("finished file #%.d", file_n)) +}) + +c( + iso_get_reader_example("dual_inlet_example.did"), + iso_get_reader_example("dual_inlet_example.caf") +) %>% iso_read_dual_inlet(read_cache = FALSE) +#> Info: preparing to read 2 data files (all will be cached)... +#> Info: reading file 'dual_inlet_example.did' with '.did' reader... +#> Info: starting file #1, named 'dual_inlet_example.did' +#> Info: finished file #1 +#> Info: reading file 'dual_inlet_example.caf' with '.caf' reader... +#> Info: starting file #2, named 'dual_inlet_example.caf' +#> Info: finished file #2 +#> Info: finished reading 2 files in 10.73 secs +#> Data from 2 dual inlet iso files: +#> # A tibble: 2 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (44,4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (44,4… 22 ent… standa… 8 rows… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path + +isoreader:::initialize_options() # reset all isoreader options

Debugging isoreader

-

The best way to start debugging an isoreader call is to switch the package into debug mode. This is done using the internal iso_turn_debug_on() function. This enables debug messages, turns caching off by default so files are always read anew, and makes the package keep more information in the isofile objects. It continues to catch errors inside file readers (keeping track of them in the problems) unless you set iso_turn_debug_on(catch_errors = FALSE), in which case no errors are caught and stop the processing so you get the full traceback and debugging options of your IDE.

+

The best way to start debugging an isoreader call is to switch the +package into debug mode. This is done using the internal +iso_turn_debug_on() function. This enables debug messages, +turns caching off by default so files are always read anew, and makes +the package keep more information in the isofile objects. It continues +to catch errors inside file readers (keeping track of them in the problems) +unless you set iso_turn_debug_on(catch_errors = FALSE), in +which case no errors are caught and stop the processing so you get the +full traceback and debugging options of your IDE.

Debugging binary file reads (Isodat)

-

Errors during the binary file reads usually indicate the approximate position in the file where the error was encountered. The easiest way to get started on figuring out what the file looks like at that position is to use a binary file editor and jump to the position. For a sense of the interpreted structure around that position, one can use the internal function map_binary_structure which tries to apply all frequently occurring binary patterns recognized by isoreader. The binary representation of the source file is only available if in debug mode but if debug mode is ON, it can be accessed as follows:

+

Errors during the binary file reads usually indicate the approximate +position in the file where the error was encountered. The easiest way to +get started on figuring out what the file looks like at that position is +to use a binary file editor and jump to the position. For a sense of the +interpreted structure around that position, one can use the internal +function map_binary_structure which tries to apply all +frequently occurring binary patterns recognized by isoreader. The binary +representation of the source file is only available if in debug mode but +if debug mode is ON, it can be accessed as follows:

-# turn on debug mode
-isoreader:::iso_turn_debug_on()
-#> Info: debug mode turned on, error catching turned on, caching turned off
-# read example file
-ex <- iso_get_reader_example("dual_inlet_example.did") %>%  
-  iso_read_dual_inlet(quiet = TRUE)
-# access binary
-bin <- ex$binary
-# use structure mapping
-bin %>%
-  isoreader:::move_to_pos(1340) %>%
-  isoreader:::map_binary_structure(length = 200)
-#> # Binary data structure:  
-#> 0001340: {4d 65 73 73 61 67 65 44 61 74 61}
-#> 0001351:   <etx>
-#> 0001355:   {/}<fef-0><fef-12>{Peak Center foun..}<4x00><1-000><fef-1c>{Peak Center found at [61032]}<fef-09>{CUserInfo}<ffff>{00 00 00 00 1b 80}
-#> 0001501: <etx>
-#> 0001505: {/}<fef-0><fef-12>
-

This structure representation shows recognized control elements in <...> and data elements in {...} which are converted to text or numeric representation if the interpretation is unambiguous, or plain hexadecimal characters if the nature of the data cannot be determined with certainty. Because this function tries all possible control elements and data interpretations, it is quite slow and may take a while if run for large stretches of binary code (i.e. if the length parameter is very long).

-

For an overview of all the control elements that are currently consider, use the internal get_ctrl_blocks_config_df() function.

+# turn on debug mode +isoreader:::iso_turn_debug_on() +#> Info: debug mode turned on, error catching turned on, caching turned off +# read example file +ex <- iso_get_reader_example("dual_inlet_example.did") %>% + iso_read_dual_inlet(quiet = TRUE) +# access binary +bin <- ex$binary +# use structure mapping +bin %>% + isoreader:::move_to_pos(1340) %>% + isoreader:::map_binary_structure(length = 200) +#> # Binary data structure: +#> 0001340: {4d 65 73 73 61 67 65 44 61 74 61} +#> 0001351: <etx> +#> 0001355: {/}<fef-0><fef-12>{Peak Center foun..}<4x00><1-000><fef-1c>{Peak Center found at [61032]}<fef-09>{CUserInfo}<ffff>{00 00 00 00 1b 80} +#> 0001501: <etx> +#> 0001505: {/}<fef-0><fef-12>
+

This structure representation shows recognized control elements in +<...> and data elements in {...} which +are converted to text or numeric representation if the interpretation is +unambiguous, or plain hexadecimal characters if the nature of the data +cannot be determined with certainty. Because this function tries all +possible control elements and data interpretations, it is quite slow and +may take a while if run for large stretches of binary code (i.e. if the +length parameter is very long).

+

For an overview of all the control elements that are currently +consider, use the internal get_ctrl_blocks_config_df() +function.

-isoreader:::get_ctrl_blocks_config_df()
-#> # A tibble: 26 × 3
-#>    block    regexp                              hexadecimal                     
-#>    <chr>    <chr>                               <chr>                           
-#>  1 del-nl   "\x7f\x85"                          7f 85                           
-#>  2 eop-nl   "܅"                                 dc 85                           
-#>  3 0b-80    "\v\x80"                            0b 80                           
-#>  4 e0-81    "\xe0\x81"                          e0 81                           
-#>  5 ce-80    "\u0380"                            ce 80                           
-#>  6 ce-8a    "Ί"                                 ce 8a                           
-#>  7 ee-85    "\xee\x85"                          ee 85                           
-#>  8 75-84    "u\x84"                             75 84                           
-#>  9 ff-80    "\\x00\xff\x80\\x00"                5c 78 30 30 ff 80 5c 78 30 30   
-#> 10 07-80-id "\x05\x80.\xff(\\x00|\x80|\xff){2}" 05 80 2e ff 28 5c 78 30 30 7c 8…
-#> # … with 16 more rows
-

Additional information can be gleaned from the so-called control blocks, which are larger structural elements of Isodat binary files and are kept in a data frame within the binary object (again only available in debug mode).

+isoreader:::get_ctrl_blocks_config_df() +#> # A tibble: 26 × 3 +#> block regexp hexadecimal +#> <chr> <chr> <chr> +#> 1 del-nl "\x7f\x85" 7f 85 +#> 2 eop-nl "܅" dc 85 +#> 3 0b-80 "\v\x80" 0b 80 +#> 4 e0-81 "\xe0\x81" e0 81 +#> 5 ce-80 "\u0380" ce 80 +#> 6 ce-8a "Ί" ce 8a +#> 7 ee-85 "\xee\x85" ee 85 +#> 8 75-84 "u\x84" 75 84 +#> 9 ff-80 "\\x00\xff\x80\\x00" 5c 78 30 30 ff 80 5c 78 30 30 +#> 10 07-80-id "\x05\x80.\xff(\\x00|\x80|\xff){2}" 05 80 2e ff 28 5c 78 30 30 7c 8… +#> # … with 16 more rows
+

Additional information can be gleaned from the so-called control +blocks, which are larger structural elements of Isodat binary files and +are kept in a data frame within the binary object (again only available +in debug mode).

-bin$C_blocks
-#> # A tibble: 107 × 5
-#>    id1   id2   block                 start   end
-#>    <chr> <chr> <chr>                 <int> <dbl>
-#>  1 06    0b    CFileHeader               1    17
-#>  2 01    0b    CTimeObject             182   198
-#>  3 02    04    CStr                    241   250
-#>  4 01    0a    CDataIndex              471   486
-#>  5 01    11    CSeqLineIndexData       513   535
-#>  6 03    05    CData                   588   598
-#>  7 01    13    CDualInletBlockData    1133  1157
-#>  8 01    10    CMeasurmentInfos       1240  1261
-#>  9 01    15    CISLScriptMessageData  1324  1350
-#> 10 01    11    CMeasurmentErrors      1945  1967
-#> # … with 97 more rows
-

Same as for specific byte positions, one can use the control blocks to navigate the file and map_binary_structure.

+bin$C_blocks +#> # A tibble: 107 × 5 +#> id1 id2 block start end +#> <chr> <chr> <chr> <int> <dbl> +#> 1 06 0b CFileHeader 1 17 +#> 2 01 0b CTimeObject 182 198 +#> 3 02 04 CStr 241 250 +#> 4 01 0a CDataIndex 471 486 +#> 5 01 11 CSeqLineIndexData 513 535 +#> 6 03 05 CData 588 598 +#> 7 01 13 CDualInletBlockData 1133 1157 +#> 8 01 10 CMeasurmentInfos 1240 1261 +#> 9 01 15 CISLScriptMessageData 1324 1350 +#> 10 01 11 CMeasurmentErrors 1945 1967 +#> # … with 97 more rows +

Same as for specific byte positions, one can use the control blocks +to navigate the file and map_binary_structure.

-bin %>%
-  isoreader:::move_to_C_block("CMethod") %>%
-  isoreader:::map_binary_structure(length = 200)
-#> # Binary data structure:  
-#> 0080269: <etx>
-#> 0080273:   {-}<fef-0><fef-06>{Method}<4x00>
-#> 0080299:   <stx>
-#> 0080303:     <7-000>
-#> 0080307:     <C-01-09 CMolecule>
-#> 0080322:   <etx>
-#> 0080326:   {-}<fef-0d>{Eval@Molecule}<fef-0d>{Eval@Molecule}<4x00><1-000><fef-03>{CO2}
-#> 0080406:   <C-00-0b CPartMirror>
-#> 0080423:   <C-02-13 CMethodPrintoutDesc>
-#> 0080448: <etx>
-#> 0080452: {-}<fef-0><fef-0><4x00>
-#> 0080466: <stx>
+bin %>% + isoreader:::move_to_C_block("CMethod") %>% + isoreader:::map_binary_structure(length = 200) +#> # Binary data structure: +#> 0080269: <etx> +#> 0080273: {-}<fef-0><fef-06>{Method}<4x00> +#> 0080299: <stx> +#> 0080303: <7-000> +#> 0080307: <C-01-09 CMolecule> +#> 0080322: <etx> +#> 0080326: {-}<fef-0d>{Eval@Molecule}<fef-0d>{Eval@Molecule}<4x00><1-000><fef-03>{CO2} +#> 0080406: <C-00-0b CPartMirror> +#> 0080423: <C-02-13 CMethodPrintoutDesc> +#> 0080448: <etx> +#> 0080452: {-}<fef-0><fef-0><4x00> +#> 0080466: <stx> @@ -457,7 +537,7 @@

Debugging binary file reads (Isodat)

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/articles/dual_inlet.html b/articles/dual_inlet.html index 19a85e7..0754a8e 100644 --- a/articles/dual_inlet.html +++ b/articles/dual_inlet.html @@ -39,7 +39,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -102,12 +102,12 @@ -
+

Reading files

-

Reading dual inlet files is as simple as passing one or multiple file or folder paths to the iso_read_dual_inlet() function. If folders are provided, any files that have a recognized continuous flow file extensions within those folders will be processed (e.g. all .did and .caf). Here we read several files that are bundled with the package as examples (and whose paths can be retrieved using the iso_get_reader_example() function).

+

Reading dual inlet files is as simple as passing one or multiple file +or folder paths to the iso_read_dual_inlet() function. If +folders are provided, any files that have a recognized continuous flow +file extensions within those folders will be processed (e.g. all +.did and .caf). Here we read several files +that are bundled with the package as examples (and whose paths can be +retrieved using the iso_get_reader_example() function).

-# all available examples
-iso_get_reader_examples() %>% knitr::kable()
+# all available examples +iso_get_reader_examples() %>% knitr::kable()

@@ -208,27 +219,30 @@

Reading files
-# read dual inlet examples
-di_files <-
-  iso_read_dual_inlet(
-    iso_get_reader_example("dual_inlet_example.did"),
-    iso_get_reader_example("dual_inlet_example.caf"),
-    iso_get_reader_example("dual_inlet_nu_example.txt"),
-    nu_masses = 49:44
-  )
-#> Info: preparing to read 3 data files (all will be cached)...
-#> Info: reading file 'dual_inlet_example.did' from cache...
-#> Info: reading file 'dual_inlet_example.caf' from cache...
-#> Info: reading file 'dual_inlet_nu_example.txt' with '.txt' reader...
-#> Info: finished reading 3 files in 1.11 secs
+# read dual inlet examples +di_files <- + iso_read_dual_inlet( + iso_get_reader_example("dual_inlet_example.did"), + iso_get_reader_example("dual_inlet_example.caf"), + iso_get_reader_example("dual_inlet_nu_example.txt"), + nu_masses = 49:44 + ) +#> Info: preparing to read 3 data files (all will be cached)... +#> Info: reading file 'dual_inlet_example.did' from cache... +#> Info: reading file 'dual_inlet_example.caf' from cache... +#> Info: reading file 'dual_inlet_nu_example.txt' with '.txt' reader... +#> Info: finished reading 3 files in 1.34 secs

File summary

-

The di_files variable now contains a set of isoreader objects, one for each file. Take a look at what information was retrieved from the files using the iso_get_data_summary() function.

+

The di_files variable now contains a set of isoreader +objects, one for each file. Take a look at what information was +retrieved from the files using the iso_get_data_summary() +function.

-di_files %>% iso_get_data_summary() %>% knitr::kable()
-#> Info: aggregating data summary from 3 data file(s)
+di_files %>% iso_get_data_summary() %>% knitr::kable() +#> Info: aggregating data summary from 3 data file(s)

@@ -276,9 +290,14 @@

File summary

Problems

-

In case there was any trouble with reading any of the files, the following functions provide an overview summary as well as details of all errors and warnings, respectively. The examples here contain no errors but if you run into any unexpected file read problems, please file a bug report in the isoreader issue tracker.

+

In case there was any trouble with reading any of the files, the +following functions provide an overview summary as well as details of +all errors and warnings, respectively. The examples here contain no +errors but if you run into any unexpected file read problems, please +file a bug report in the isoreader issue +tracker.

-di_files %>% iso_get_problems_summary() %>% knitr::kable()
+di_files %>% iso_get_problems_summary() %>% knitr::kable()

@@ -288,7 +307,7 @@

Problems

file_id
-di_files %>% iso_get_problems() %>% knitr::kable()
+di_files %>% iso_get_problems() %>% knitr::kable() @@ -303,11 +322,19 @@

Problems

File Information

-

Detailed file information can be aggregated for all isofiles using the iso_get_file_info() function which supports the full select syntax of the dplyr package to specify which columns are of interest (by default, all file information is retrieved). Additionally, file information from different file formats can be renamed to the same column name for easy of downstream processing. The following provides a few examples for how this can be used (the names of the interesting info columns may vary between different file formats):

+

Detailed file information can be aggregated for all isofiles using +the iso_get_file_info() function which supports the full select +syntax of the dplyr +package to specify which columns are of interest (by default, all file +information is retrieved). Additionally, file information from different +file formats can be renamed to the same column name for easy of +downstream processing. The following provides a few examples for how +this can be used (the names of the interesting info columns may vary +between different file formats):

-# all file information
-di_files %>% iso_get_file_info(select = c(-file_root)) %>% knitr::kable()
-#> Info: aggregating file info from 3 data file(s), selecting info columns 'c(-file_root)'
+# all file information +di_files %>% iso_get_file_info(select = c(-file_root)) %>% knitr::kable() +#> Info: aggregating file info from 3 data file(s), selecting info columns 'c(-file_root)'

file_id
@@ -378,7 +405,9 @@

File Information13

- + @@ -443,28 +472,28 @@

File InformationNA

- +
49077 CO2_multiply_16V.metPeak Center found at [61032] , Background: 8.87 mV,11.31 mV,12.98 mV,6.40 mV,1.90 mV,5.88 mV (old253), PressAdjust: L: 15972.5 R: 15971.6 ( Manual Adjustment )Peak Center found at [61032] , Background: 8.87 +mV,11.31 mV,12.98 mV,6.40 mV,1.90 mV,5.88 mV (old253), PressAdjust: L: +15972.5 R: 15971.6 ( Manual Adjustment ) 26 NA NAETH-01 3480C:Stable2 4-20-8-20.rdfC:Stable 4-20-8-20.rdf
-# select file information
-di_files %>%
-  iso_get_file_info(
-    select = c(
-      # rename sample id columns from the different file types to a new ID column
-      ID = `Identifier 1`, ID = `Sample Name`,
-      # select columns without renaming
-      Analysis, Method, `Peak Center`,
-      # select the time stamp and rename it to `Date & Time`
-      `Date & Time` = file_datetime,
-      # rename weight columns from the different file types
-      `Sample Weight`, `Sample Weight` = `Weight [mg]`
-    ),
-    # explicitly allow for file specific rename (for the new ID column)
-    file_specific = TRUE
-  ) %>% knitr::kable()
-#> Info: aggregating file info from 3 data file(s), selecting info columns 'c(ID = `Identifier 1`, ID = `Sample Name`, Analysis, Method, `Peak Center`, `Date & Time` = file_datetime, `Sample Weight`, `Sample Weight` = `Weight [mg]`)'
+# select file information +di_files %>% + iso_get_file_info( + select = c( + # rename sample id columns from the different file types to a new ID column + ID = `Identifier 1`, ID = `Sample Name`, + # select columns without renaming + Analysis, Method, `Peak Center`, + # select the time stamp and rename it to `Date & Time` + `Date & Time` = file_datetime, + # rename weight columns from the different file types + `Sample Weight`, `Sample Weight` = `Weight [mg]` + ), + # explicitly allow for file specific rename (for the new ID column) + file_specific = TRUE + ) %>% knitr::kable() +#> Info: aggregating file info from 3 data file(s), selecting info columns 'c(ID = `Identifier 1`, ID = `Sample Name`, Analysis, Method, `Peak Center`, `Date & Time` = file_datetime, `Sample Weight`, `Sample Weight` = `Weight [mg]`)' @@ -517,24 +546,30 @@

File Information

Select/Rename

-

Rather than retrieving specific file info columns using the above example of iso_get_file_info(select = ...), these information can also be modified across an entire collection of isofiles using the iso_select_file_info() and iso_rename_file_info() functions. For example, the above example could be similarly achieved with the following use of iso_select_file_info():

+

Rather than retrieving specific file info columns using the above +example of iso_get_file_info(select = ...), these +information can also be modified across an entire collection of isofiles +using the iso_select_file_info() and +iso_rename_file_info() functions. For example, the above +example could be similarly achieved with the following use of +iso_select_file_info():

-# select + rename specific file info columns
-di_files2 <- di_files %>%
-  iso_select_file_info(
-    ID = `Identifier 1`, ID = `Sample Name`, Analysis, Method,
-    `Peak Center`, `Date & Time` = file_datetime,
-    `Sample Weight`, `Sample Weight` = `Weight [mg]`,
-    file_specific = TRUE
-  )
-#> Info: selecting/renaming the following file info:
-#>  - for 1 file(s): 'file_id', 'Identifier 1'->'ID', 'Analysis', 'Method', 'Peak Center', 'file_datetime'->'Date & Time'
-#>  - for 1 file(s): 'file_id', 'Identifier 1'->'ID', 'Analysis', 'Method', 'Peak Center', 'file_datetime'->'Date & Time', 'Weight [mg]'->'Sample Weight'
-#>  - for 1 file(s): 'file_id', 'Sample Name'->'ID', 'file_datetime'->'Date & Time', 'Sample Weight'
-
-# fetch all file info
-di_files2 %>% iso_get_file_info() %>% knitr::kable()
-#> Info: aggregating file info from 3 data file(s)
+# select + rename specific file info columns +di_files2 <- di_files %>% + iso_select_file_info( + ID = `Identifier 1`, ID = `Sample Name`, Analysis, Method, + `Peak Center`, `Date & Time` = file_datetime, + `Sample Weight`, `Sample Weight` = `Weight [mg]`, + file_specific = TRUE + ) +#> Info: selecting/renaming the following file info: +#> - for 1 file(s): 'file_id', 'Identifier 1'->'ID', 'Analysis', 'Method', 'Peak Center', 'file_datetime'->'Date & Time' +#> - for 1 file(s): 'file_id', 'Identifier 1'->'ID', 'Analysis', 'Method', 'Peak Center', 'file_datetime'->'Date & Time', 'Weight [mg]'->'Sample Weight' +#> - for 1 file(s): 'file_id', 'Sample Name'->'ID', 'file_datetime'->'Date & Time', 'Sample Weight' + +# fetch all file info +di_files2 %>% iso_get_file_info() %>% knitr::kable() +#> Info: aggregating file info from 3 data file(s)

@@ -588,14 +623,18 @@

Select/Rename

Filter

-

Any collection of isofiles can also be filtered based on the available file information using the function iso_filter_files. This function can operate on any column available in the file information and supports full dplyr syntax.

+

Any collection of isofiles can also be filtered based on the +available file information using the function +iso_filter_files. This function can operate on any column +available in the file information and supports full dplyr +syntax.

-# find files that have 'CIT' in the new ID field
-di_files2 %>% iso_filter_files(grepl("CIT", ID)) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 1 of 3 files
-#> Info: aggregating file info from 1 data file(s)
+# find files that have 'CIT' in the new ID field +di_files2 %>% iso_filter_files(grepl("CIT", ID)) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 1 of 3 files +#> Info: aggregating file info from 1 data file(s)

@@ -623,14 +662,14 @@

Filter

-
-# find files that were run in 2017
-di_files2 %>%
-  iso_filter_files(`Date & Time` > "2017-01-01" & `Date & Time` < "2018-01-01") %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 2 of 3 files
-#> Info: aggregating file info from 2 data file(s)
+ +# find files that were run in 2017 +di_files2 %>% + iso_filter_files(`Date & Time` > "2017-01-01" & `Date & Time` < "2018-01-01") %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 2 of 3 files +#> Info: aggregating file info from 2 data file(s) @@ -675,24 +714,30 @@

Filter

Mutate

-

The file information in any collection of isofiles can also be mutated using the function iso_mutate_file_info. This function can introduce new columns and operate on/overwrite any existing columns available in the file information (even if it does not exist in all files) and supports full dplyr syntax. It can also be used in conjunction with iso_with_unit to generate values with implicit units.

+

The file information in any collection of isofiles can also be +mutated using the function iso_mutate_file_info. This +function can introduce new columns and operate on/overwrite any existing +columns available in the file information (even if it does not exist in +all files) and supports full dplyr +syntax. It can also be used in conjunction with +iso_with_unit to generate values with implicit units.

-di_files3 <- di_files2 %>%
-  iso_mutate_file_info(
-    # update existing column
-    ID = paste("ID:", ID),
-    # introduce new column
-    `Run in 2017?` = `Date & Time` > "2017-01-01" & `Date & Time` < "2018-01-01",
-    # parse weight as a number and turn into a column with units
-    `Sample Weight` = `Sample Weight` %>% parse_number() %>% iso_with_units("mg")
-  )
-#> Info: mutating file info for 3 data file(s)
-
-di_files3 %>%
-  iso_get_file_info() %>%
-  iso_make_units_explicit() %>%
-  knitr::kable()
-#> Info: aggregating file info from 3 data file(s)
+di_files3 <- di_files2 %>% + iso_mutate_file_info( + # update existing column + ID = paste("ID:", ID), + # introduce new column + `Run in 2017?` = `Date & Time` > "2017-01-01" & `Date & Time` < "2018-01-01", + # parse weight as a number and turn into a column with units + `Sample Weight` = `Sample Weight` %>% parse_number() %>% iso_with_units("mg") + ) +#> Info: mutating file info for 3 data file(s) + +di_files3 %>% + iso_get_file_info() %>% + iso_make_units_explicit() %>% + knitr::kable() +#> Info: aggregating file info from 3 data file(s)

@@ -751,24 +796,31 @@

Mutate

Add

-

Additionally, a wide range of new file information can be added in the form of a data frame with any number of columns (usually read from a comma-separated-value/csv file or an Excel/xlsx file) using the function iso_add_file_info and specifying which existing file information should be used to merge in the new information. It is similar to dplyr’s left_join but with additional safety checks and the possibility to join the new information sequentially as illustrated below.

+

Additionally, a wide range of new file information can be added in +the form of a data frame with any number of columns (usually read from a +comma-separated-value/csv file or an Excel/xlsx file) using the function +iso_add_file_info and specifying which existing file +information should be used to merge in the new information. It is +similar to dplyr’s +left_join but with additional safety checks and the possibility to +join the new information sequentially as illustrated below.

-# this kind of information data frame is frequently read in from a csv or xlsx file
-new_info <-
-  dplyr::bind_rows(
-    # new information based on new vs. old samples
-    dplyr::tribble(
-      ~Analysis, ~`Run in 2017?`,  ~process,  ~info,
-       NA,       TRUE,              "yes",     "2017 runs",
-       NA,       FALSE,             "yes",     "other runs"
-    ),
-    # new information for a single specific file
-    dplyr::tribble(
-      ~Analysis, ~process,  ~note,
-       "16068",   "no",      "did not inject properly"
-    )
-  )
-new_info %>% knitr::kable()
+# this kind of information data frame is frequently read in from a csv or xlsx file +new_info <- + dplyr::bind_rows( + # new information based on new vs. old samples + dplyr::tribble( + ~Analysis, ~`Run in 2017?`, ~process, ~info, + NA, TRUE, "yes", "2017 runs", + NA, FALSE, "yes", "other runs" + ), + # new information for a single specific file + dplyr::tribble( + ~Analysis, ~process, ~note, + "16068", "no", "did not inject properly" + ) + ) +new_info %>% knitr::kable()

@@ -802,17 +854,25 @@

Add

Analysis
-
-# adding it to the isofiles
-di_files3 %>%
-  iso_add_file_info(new_info, by1 = "Run in 2017?", by2 = "Analysis") %>%
-  iso_get_file_info(select = !!names(new_info)) %>%
-  knitr::kable()
-#> Info: adding new file information ('process', 'info', 'note') to 3 data file(s), joining by 'Run in 2017?' then 'Analysis'...
-#>  - 'Run in 2017?' join: 2/2 new info rows matched 3/3 data files - 1 of these was/were also matched by subsequent joins which took precedence
-#>  - 'Analysis' join: 1/1 new info rows matched 1/3 data files
-#> Info: aggregating file info from 3 data file(s), selecting info columns 'Analysis', 'Run in 2017?', 'process', 'info', 'note'
+ +# adding it to the isofiles +di_files3 %>% + iso_add_file_info(new_info, by1 = "Run in 2017?", by2 = "Analysis") %>% + iso_get_file_info(select = !!names(new_info)) %>% + knitr::kable() +#> Info: adding new file information ('process', 'info', 'note') to 3 data file(s), joining by 'Run in 2017?' then 'Analysis'... +#> - 'Run in 2017?' join: 2/2 new info rows matched 3/3 data files - 1 of these was/were also matched by subsequent joins which took precedence +#> - 'Analysis' join: 1/1 new info rows matched 1/3 data files +#> Info: aggregating file info from 3 data file(s), selecting info columns 'Analysis', 'Run in 2017?', 'process', 'info', 'note' ++++++++ @@ -852,25 +912,41 @@

Add

Parse

-

Most file information is initially read as text to avoid cumbersome specifications during the read process and compatibility issues between different IRMS file formats. However, many file info columns are not easily processed as text. The isoreader package therefore provides several parsing and data extraction functions to facilitate processing the text-based data (some via functionality implemented by the readr package). See code block below for examples. For a complete overview, see the ?extract_data and ?iso_parse_file_info documentation.

+

Most file information is initially read as text to avoid cumbersome +specifications during the read process and compatibility issues between +different IRMS file formats. However, many file info columns are not +easily processed as text. The isoreader package therefore provides +several parsing and data extraction functions to facilitate processing +the text-based data (some via functionality implemented by the readr package). See code block +below for examples. For a complete overview, see the +?extract_data and ?iso_parse_file_info +documentation.

-# use parsing and extraction in iso_mutate_file_info
-di_files2 %>%
-  iso_mutate_file_info(
-    # change type of Peak Center to logical
-    `Peak Center` = parse_logical(`Peak Center`),
-    # retrieve first word of Method column
-    Method_1st = extract_word(Method),
-    # retrieve second word of Method column
-    Method_2nd = extract_word(Method, 2),
-    # retrieve file extension from the file_id using regular expression
-    extension = extract_substring(file_id, "\\.(\\w+)$", capture_bracket = 1)
-  ) %>%
-  iso_get_file_info(select = c(extension, `Peak Center`, matches("Method"))) %>%
-  knitr::kable()
-#> Info: mutating file info for 3 data file(s)
-#> Info: aggregating file info from 3 data file(s), selecting info columns 'c(extension, `Peak Center`, matches("Method"))'
+# use parsing and extraction in iso_mutate_file_info +di_files2 %>% + iso_mutate_file_info( + # change type of Peak Center to logical + `Peak Center` = parse_logical(`Peak Center`), + # retrieve first word of Method column + Method_1st = extract_word(Method), + # retrieve second word of Method column + Method_2nd = extract_word(Method, 2), + # retrieve file extension from the file_id using regular expression + extension = extract_substring(file_id, "\\.(\\w+)$", capture_bracket = 1) + ) %>% + iso_get_file_info(select = c(extension, `Peak Center`, matches("Method"))) %>% + knitr::kable() +#> Info: mutating file info for 3 data file(s) +#> Info: aggregating file info from 3 data file(s), selecting info columns 'c(extension, `Peak Center`, matches("Method"))'

file_id Analysis
++++++++ @@ -907,14 +983,14 @@

Parse

file_id extension
-
-# use parsing in iso_filter_file_info
-di_files2 %>%
-  iso_filter_files(parse_integer(Analysis) > 1500) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 2 of 3 files
-#> Info: aggregating file info from 2 data file(s)
+ +# use parsing in iso_filter_file_info +di_files2 %>% + iso_filter_files(parse_integer(Analysis) > 1500) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 2 of 3 files +#> Info: aggregating file info from 2 data file(s) @@ -956,21 +1032,21 @@

Parse

-
-# use iso_parse_file_info for simplified parsing of column data types
-di_files2 %>%
-  iso_parse_file_info(
-    integer = Analysis,
-    number = `Sample Weight`,
-    logical = `Peak Center`
-  ) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: parsing 3 file info columns for 3 data file(s):
-#>  - to integer: 'Analysis'
-#>  - to logical: 'Peak Center'
-#>  - to number: 'Sample Weight'
-#> Info: aggregating file info from 3 data file(s)
+ +# use iso_parse_file_info for simplified parsing of column data types +di_files2 %>% + iso_parse_file_info( + integer = Analysis, + number = `Sample Weight`, + logical = `Peak Center` + ) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: parsing 3 file info columns for 3 data file(s): +#> - to integer: 'Analysis' +#> - to logical: 'Peak Center' +#> - to number: 'Sample Weight' +#> Info: aggregating file info from 3 data file(s) @@ -1025,10 +1101,12 @@

Parse

Resistors

-

Additionally, some IRMS data files contain resistor information that are useful for downstream calculations (see e.g. section on signal conversion later in this vignette):

+

Additionally, some IRMS data files contain resistor information that +are useful for downstream calculations (see e.g. section on signal +conversion later in this vignette):

-di_files %>% iso_get_resistors() %>% knitr::kable()
-#> Info: aggregating resistors info from 3 data file(s)
+di_files %>% iso_get_resistors() %>% knitr::kable() +#> Info: aggregating resistors info from 3 data file(s)

@@ -1117,10 +1195,18 @@

Reference values

As well as isotopic reference values for the different gases:

-# reference delta values without ratio values
-di_files %>% iso_get_standards(file_id:reference) %>% knitr::kable()
-#> Info: aggregating standards info from 3 data file(s)
+# reference delta values without ratio values +di_files %>% iso_get_standards(file_id:reference) %>% knitr::kable() +#> Info: aggregating standards info from 3 data file(s)

file_id
++++++++ @@ -1189,9 +1275,9 @@

Reference values

file_id standard
-# reference values with ratios
-di_files %>% iso_get_standards() %>% knitr::kable()
-#> Info: aggregating standards info from 3 data file(s)
+# reference values with ratios +di_files %>% iso_get_standards() %>% knitr::kable() +#> Info: aggregating standards info from 3 data file(s) @@ -1387,11 +1473,16 @@

Reference values

Raw Data

-

The raw data read from the IRMS files can be retrieved similarly using the iso_get_raw_data() function. Most data aggregation functions also allow for inclusion of file information using the include_file_info parameter, which functions identically to the select parameter of the iso_get_file_info function discussed earlier.

+

The raw data read from the IRMS files can be retrieved similarly +using the iso_get_raw_data() function. Most data +aggregation functions also allow for inclusion of file information using +the include_file_info parameter, which functions +identically to the select parameter of the +iso_get_file_info function discussed earlier.

-# get raw data with default selections (all raw data, no additional file info)
-di_files %>% iso_get_raw_data() %>% head(n=10) %>% knitr::kable()
-#> Info: aggregating raw data from 3 data file(s)
+# get raw data with default selections (all raw data, no additional file info) +di_files %>% iso_get_raw_data() %>% head(n=10) %>% knitr::kable() +#> Info: aggregating raw data from 3 data file(s)

@@ -1613,17 +1704,17 @@

Raw Data

-# get specific raw data and add some file information
-di_files %>%
-  iso_get_raw_data(
-    # select just time and the two ions
-    select = c(type, cycle, v44.mV, v45.mV),
-    # include the Analysis number fron the file info and rename it to 'run'
-    include_file_info = c(run = Analysis)
-  ) %>%
-  # look at first few records only
-  head(n=10) %>% knitr::kable()
-#> Info: aggregating raw data from 3 data file(s), selecting data columns 'c(type, cycle, v44.mV, v45.mV)', including file info 'c(run = Analysis)'
+# get specific raw data and add some file information +di_files %>% + iso_get_raw_data( + # select just time and the two ions + select = c(type, cycle, v44.mV, v45.mV), + # include the Analysis number fron the file info and rename it to 'run' + include_file_info = c(run = Analysis) + ) %>% + # look at first few records only + head(n=10) %>% knitr::kable() +#> Info: aggregating raw data from 3 data file(s), selecting data columns 'c(type, cycle, v44.mV, v45.mV)', including file info 'c(run = Analysis)' @@ -1720,16 +1811,30 @@

Raw Data

Data Processing

-

The isoreader package is intended to make raw stable isotope data easily accessible. However, as with most analytical data, there is significant downstream processing required to turn these raw signal intensities into properly referenced isotopic measurement. This and similar functionality as well as data visualization is part of the isoprocessor package which takes isotopic data through the various corrections in a transparent, efficient and reproducible manner.

-

That said, most vendor software also performs some of these calculations and it can be useful to be able to compare new data reduction procedures against those implemented in the vendor software. For this purpose, isoreader retrieves vendor computed data tables whenever possible, as illustrated below.

+

The isoreader package is intended to make raw stable isotope data +easily accessible. However, as with most analytical data, there is +significant downstream processing required to turn these raw signal +intensities into properly referenced isotopic measurement. This and +similar functionality as well as data visualization is part of the isoprocessor package which +takes isotopic data through the various corrections in a transparent, +efficient and reproducible manner.

+

That said, most vendor software also performs some of these +calculations and it can be useful to be able to compare new data +reduction procedures against those implemented in the vendor software. +For this purpose, isoreader retrieves vendor computed data tables +whenever possible, as illustrated below.

Vendor Data Table

-

As with most data retrieval functions, the iso_get_vendor_data_table() function also allows specific column selection (by default, all columns are selected) and easy addition of file information via the include_file_info parameter (by default, none is included).

+

As with most data retrieval functions, the +iso_get_vendor_data_table() function also allows specific +column selection (by default, all columns are selected) and easy +addition of file information via the include_file_info +parameter (by default, none is included).

-# entire vendor data table
-di_files %>% iso_get_vendor_data_table() %>% knitr::kable()
-#> Info: aggregating vendor data table from 3 data file(s)
+# entire vendor data table +di_files %>% iso_get_vendor_data_table() %>% knitr::kable() +#> Info: aggregating vendor data table from 3 data file(s)

file_id
@@ -1973,15 +2078,15 @@

Vendor Data Table
-# get specific parts and add some file information
-di_files %>%
-  iso_get_vendor_data_table(
-    # select cycle and all carbon columns
-    select = c(cycle, matches("C")),
-    # include the Identifier 1 fron the file info and rename it to 'id'
-    include_file_info = c(id = `Identifier 1`)
-  ) %>% knitr::kable()
-#> Info: aggregating vendor data table from 3 data file(s), including file info 'c(id = `Identifier 1`)'
+# get specific parts and add some file information +di_files %>% + iso_get_vendor_data_table( + # select cycle and all carbon columns + select = c(cycle, matches("C")), + # include the Identifier 1 fron the file info and rename it to 'id' + include_file_info = c(id = `Identifier 1`) + ) %>% knitr::kable() +#> Info: aggregating vendor data table from 3 data file(s), including file info 'c(id = `Identifier 1`)'

@@ -2195,51 +2300,66 @@

Vendor Data Table

For expert users: retrieving all data

-

For users familiar with the nested data frames from the tidyverse (particularly tidyr’s nest and unnest), there is an easy way to retrieve all data from the iso file objects in a single nested data frame:

+

For users familiar with the nested data frames from the tidyverse (particularly tidyr’s nest and +unnest), there is an easy way to retrieve all data from the +iso file objects in a single nested data frame:

-all_data <- di_files %>% iso_get_all_data()
-#> Info: aggregating all data from 3 data file(s)
-# not printed out because this data frame is very big
+all_data <- di_files %>% iso_get_all_data() +#> Info: aggregating all data from 3 data file(s) +# not printed out because this data frame is very big

Saving collections

-

Saving entire collections of isofiles for retrieval at a later point is easily done using the iso_save function which stores collections or individual isoreader file objects in the efficient R data storage format .rds (if not specified, the extension .di.rds will be automatically appended). These saved collections can be conveniently read back using the same iso_read_dual_inlet command used for raw data files.

+

Saving entire collections of isofiles for retrieval at a later point +is easily done using the iso_save function which stores +collections or individual isoreader file objects in the efficient R data +storage format .rds (if not specified, the extension +.di.rds will be automatically appended). These saved +collections can be conveniently read back using the same +iso_read_dual_inlet command used for raw data files.

-# export to R data archive
-di_files %>% iso_save("di_files_export.di.rds")
-#> Info: exporting data from 3 iso_files into R Data Storage 'di_files_export.di.rds'
-
-# read back the exported R data storage
-iso_read_dual_inlet("di_files_export.di.rds")
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'di_files_export.di.rds' with '.di.rds' reader...
-#> Info: loaded 3 data files from R Data Storage
-#> Info: finished reading 1 files in 0.12 secs
-#> Data from 3 dual inlet iso files: 
-#> # A tibble: 3 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-#> 3 dual_inlet_nu_examp… 82 cycl… 9 entries no method … no vendor data … dual_inl…
+# export to R data archive +di_files %>% iso_save("di_files_export.di.rds") +#> Info: exporting data from 3 iso_files into R Data Storage 'di_files_export.di.rds' + +# read back the exported R data storage +iso_read_dual_inlet("di_files_export.di.rds") +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'di_files_export.di.rds' with '.di.rds' reader... +#> Info: loaded 3 data files from R Data Storage +#> Info: finished reading 1 files in 0.18 secs +#> Data from 3 dual inlet iso files: +#> # A tibble: 3 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (4… 22 ent… standa… 8 rows… dual_i… +#> 3 dual_inlet_nu_example.txt 82 cycles, 6 ions (… 9 entr… no met… no ven… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path

Data Export

-

At the moment, isoreader supports export of all data to Excel and the Feather file format (a Python/R cross-over format). Note that both export methods have similar syntax and append the appropriate file extension for each type of export file (.di.xlsx and .di.feather, respectively).

+

At the moment, isoreader supports export of all data to Excel and the +Feather file format +(a Python/R cross-over format). Note that both export methods have +similar syntax and append the appropriate file extension for each type +of export file (.di.xlsx and .di.feather, +respectively).

-# export to excel
-di_files %>% iso_export_to_excel("di_files_export")
-
-# data sheets available in the exported data file:
-readxl::excel_sheets("di_files_export.di.xlsx")
+# export to excel +di_files %>% iso_export_to_excel("di_files_export") + +# data sheets available in the exported data file: +readxl::excel_sheets("di_files_export.di.xlsx")
-# export to feather
-di_files %>% iso_export_to_feather("di_files_export")
-
-# exported feather files
-list.files(pattern = ".di.feather")
+# export to feather +di_files %>% iso_export_to_feather("di_files_export") + +# exported feather files +list.files(pattern = ".di.feather") @@ -2260,7 +2380,7 @@

Data Export

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/articles/index.html b/articles/index.html index 9212989..2230ddc 100644 --- a/articles/index.html +++ b/articles/index.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -107,7 +107,7 @@

All vignettes

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/articles/operations.html b/articles/operations.html index 0a7076f..aaffa63 100644 --- a/articles/operations.html +++ b/articles/operations.html @@ -39,7 +39,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -102,12 +102,12 @@ -
+

Supported file types

-# list all suported file types
-iso_get_supported_file_types() %>%
-  dplyr::select(extension, software, description, type) %>%
-  knitr::kable()
+# list all suported file types +iso_get_supported_file_types() %>% + dplyr::select(extension, software, description, type) %>% + knitr::kable()
++++++ @@ -206,19 +215,22 @@

Supported file types

Messages

-

By default, isoreader is quite verbose to let the user know what is happening. However, most functions can be silenced by adding the parameter quiet = TRUE to the function call. This can also be done globally using iso_turn_info_messages_off()

+

By default, isoreader is quite verbose to let the user know what is +happening. However, most functions can be silenced by adding the +parameter quiet = TRUE to the function call. This can also +be done globally using iso_turn_info_messages_off()

-# read a file in the default verbose mode
-iso_get_reader_example("dual_inlet_example.did") %>%
-  iso_read_dual_inlet() %>%
-  iso_select_file_info(file_datetime, `Identifier 1`) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'dual_inlet_example.did' from cache...
-#> Info: finished reading 1 files in 0.33 secs
-#> Info: selecting/renaming the following file info across 1 data file(s): 'file_datetime', 'Identifier 1'
-#> Info: aggregating file info from 1 data file(s)
+# read a file in the default verbose mode +iso_get_reader_example("dual_inlet_example.did") %>% + iso_read_dual_inlet() %>% + iso_select_file_info(file_datetime, `Identifier 1`) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'dual_inlet_example.did' from cache... +#> Info: finished reading 1 files in 0.59 secs +#> Info: selecting/renaming the following file info across 1 data file(s): 'file_datetime', 'Identifier 1' +#> Info: aggregating file info from 1 data file(s)

extension software
@@ -232,15 +244,15 @@

Messages

file_id
-
-# read the same file but make the read process quiet
-iso_get_reader_example("dual_inlet_example.did") %>%
-  iso_read_dual_inlet(quiet = TRUE) %>%
-  iso_select_file_info(file_datetime, `Identifier 1`) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: selecting/renaming the following file info across 1 data file(s): 'file_datetime', 'Identifier 1'
-#> Info: aggregating file info from 1 data file(s)
+ +# read the same file but make the read process quiet +iso_get_reader_example("dual_inlet_example.did") %>% + iso_read_dual_inlet(quiet = TRUE) %>% + iso_select_file_info(file_datetime, `Identifier 1`) %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: selecting/renaming the following file info across 1 data file(s): 'file_datetime', 'Identifier 1' +#> Info: aggregating file info from 1 data file(s) @@ -254,14 +266,14 @@

Messages

file_id
-
-# read the same file but turn all isoreader messages off
-iso_turn_info_messages_off()
-iso_get_reader_example("dual_inlet_example.did") %>%
-  iso_read_dual_inlet(quiet = TRUE) %>%
-  iso_select_file_info(file_datetime, `Identifier 1`) %>%
-  iso_get_file_info() %>%
-  knitr::kable()
+ +# read the same file but turn all isoreader messages off +iso_turn_info_messages_off() +iso_get_reader_example("dual_inlet_example.did") %>% + iso_read_dual_inlet(quiet = TRUE) %>% + iso_select_file_info(file_datetime, `Identifier 1`) %>% + iso_get_file_info() %>% + knitr::kable() @@ -275,158 +287,194 @@

Messages

file_id
-
-# turn message back on
-iso_turn_info_messages_on()
-#> Info: information messages turned on
+ +# turn message back on +iso_turn_info_messages_on() +#> Info: information messages turned on

Caching

-

By default, isoreader caches files as R objects to make access faster in the future. This feature can be turned off if you want to force a fresh read from the source file. Alternatively, you can clear the entire isoreader cache in your working directory to clean up previous file reads.

+

By default, isoreader caches files as R objects to make access faster +in the future. This feature can be turned off if you want to force a +fresh read from the source file. Alternatively, you can clear the entire +isoreader cache in your working directory to clean up previous file +reads.

-# cleanup reader cache
-iso_cleanup_reader_cache()
-#> Info: removed all (0) cached isoreader files.
-
-# read a new file (notice the time elapsed)
-cf_file <- iso_get_reader_example("continuous_flow_example.dxf") %>%
-  iso_read_continuous_flow()
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'continuous_flow_example.dxf' from cache...
-#> Info: finished reading 1 files in 0.25 secs
-
-# re-read the same file much faster (it will be read from cache)
-cf_file <- iso_get_reader_example("continuous_flow_example.dxf") %>%
-    iso_read_continuous_flow()
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'continuous_flow_example.dxf' from cache...
-#> Info: finished reading 1 files in 0.47 secs
-
-# turn reader caching off
-iso_turn_reader_caching_off()
-#> Info: caching turned off
-
-# re-read the same file (it will NOT be read from cache)
-cf_file <- iso_get_reader_example("continuous_flow_example.dxf") %>%
-  iso_read_continuous_flow()
-#> Info: preparing to read 1 data files...
-#> Info: reading file 'continuous_flow_example.dxf' with '.dxf' reader...
-#> Info: finished reading 1 files in 3.98 secs
-
-# turn reader caching back on
-iso_turn_reader_caching_on()
-#> Info: caching turned on
+# cleanup reader cache +iso_cleanup_reader_cache() +#> Info: removed all (0) cached isoreader files. + +# read a new file (notice the time elapsed) +cf_file <- iso_get_reader_example("continuous_flow_example.dxf") %>% + iso_read_continuous_flow() +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'continuous_flow_example.dxf' from cache... +#> Info: finished reading 1 files in 0.28 secs + +# re-read the same file much faster (it will be read from cache) +cf_file <- iso_get_reader_example("continuous_flow_example.dxf") %>% + iso_read_continuous_flow() +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'continuous_flow_example.dxf' from cache... +#> Info: finished reading 1 files in 0.27 secs + +# turn reader caching off +iso_turn_reader_caching_off() +#> Info: caching turned off + +# re-read the same file (it will NOT be read from cache) +cf_file <- iso_get_reader_example("continuous_flow_example.dxf") %>% + iso_read_continuous_flow() +#> Info: preparing to read 1 data files... +#> Info: reading file 'continuous_flow_example.dxf' with '.dxf' reader... +#> Info: finished reading 1 files in 5.00 secs + +# turn reader caching back on +iso_turn_reader_caching_on() +#> Info: caching turned on

Parallel processing

-

Isoreader supports parallel processing of data files based on the number of processors available in a computer simply by setting the parallel = TRUE flag in any file read operation. This makes it possible to read large quantities of data files much more quickly on a multi-core system (i.e. most modern laptops).

-

However, whether parallel processing yields significant improvements in read speeds depends on the number of available processors, file types and operating system. In theory, parallel processing always reduces computation time but in practice this is offset by various factors including the size of the data that needs to be sent back and forth between the processors, file system read/write speed, and the spin-up time for new processes. Generally speaking, parallel processing can provide significant improvements in speed with larger number of files (~10+) and more complex read operations (e.g. continuous flow > dual inlet > scan file). Reading from cache is so efficient that there are rarely gains from parallel processing and it is usually faster NOT to read in parallel once a set of files is already cached.

+

Isoreader supports parallel processing of data files based on the +number of processors available in a computer simply by setting the +parallel = TRUE flag in any file read operation. This makes +it possible to read large quantities of data files much more quickly on +a multi-core system (i.e. most modern laptops).

+

However, whether parallel processing yields significant improvements +in read speeds depends on the number of available processors, file types +and operating system. In theory, parallel processing always reduces +computation time but in practice this is offset by various factors +including the size of the data that needs to be sent back and forth +between the processors, file system read/write speed, and the spin-up +time for new processes. Generally speaking, parallel processing can +provide significant improvements in speed with larger number of files +(~10+) and more complex read operations (e.g. continuous flow > dual +inlet > scan file). Reading from cache is so efficient that there are +rarely gains from parallel processing and it is usually faster NOT to +read in parallel once a set of files is already cached.

-# read 3 files in parallel (note that this is usually not a large enough file number to be worth it)
-di_files <-
-  iso_read_dual_inlet(
-    iso_get_reader_example("dual_inlet_example.did"),
-    iso_get_reader_example("dual_inlet_example.caf"),
-    iso_get_reader_example("dual_inlet_nu_example.txt"),
-    nu_masses = 49:44,
-    parallel = TRUE
-  )
-#> Info: preparing to read 3 data files (all will be cached), setting up 3 par...
-#> Info (process 1): reading file 'dual_inlet_example.did' from cache...
-#> Info (process 2): reading file 'dual_inlet_example.caf' from cache...
-#> Info (process 3): reading file 'dual_inlet_nu_example.txt' from cache...
-#> Info: finished reading 3 files in 5.28 secs
+# read 3 files in parallel (note that this is usually not a large enough file number to be worth it) +di_files <- + iso_read_dual_inlet( + iso_get_reader_example("dual_inlet_example.did"), + iso_get_reader_example("dual_inlet_example.caf"), + iso_get_reader_example("dual_inlet_nu_example.txt"), + nu_masses = 49:44, + parallel = TRUE + ) +#> Info: preparing to read 3 data files (all will be cached), setting up 2 par... +#> Info (process 1): reading file 'dual_inlet_example.did' from cache... +#> Info (process 1): reading file 'dual_inlet_nu_example.txt' from cache... +#> Info (process 2): reading file 'dual_inlet_example.caf' from cache... +#> Info: finished reading 3 files in 3.30 secs

Combining / subsetting isofiles

-

All isoreader objects are lists that can be combined or subset to work with only specific files or create a larger collection.

+

All isoreader objects are lists that can be combined or subset to +work with only specific files or create a larger collection.

-# all 3 di_files read above
-di_files
-#> Data from 3 dual inlet iso files: 
-#> # A tibble: 3 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-#> 3 dual_inlet_nu_examp… 82 cycl… 9 entries no method … no vendor data … dual_inl…
-
-# only one of the files (by index)
-di_files[[2]]
-#> Dual inlet iso file 'dual_inlet_example.caf': 8 cycles, 6 ions (44,45,46,47,48,49)
-
-# only one of the files (by file_id)
-di_files$dual_inlet_example.did
-#> Dual inlet iso file 'dual_inlet_example.did': 7 cycles, 6 ions (44,45,46,47,48,49)
-
-# a subset of the files (by index)
-di_files[c(1,3)]
-#> Data from 2 dual inlet iso files: 
-#> # A tibble: 2 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_nu_examp… 82 cycl… 9 entries no method … no vendor data … dual_inl…
-
-# a subset of the files (by file_id)
-di_files[c("dual_inlet_example.did", "dual_inlet_example.caf")]
-#> Data from 2 dual inlet iso files: 
-#> # A tibble: 2 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-
-# same result using iso_filter_files (more flexible + verbose output)
-di_files %>% iso_filter_files(
-  file_id %in% c("dual_inlet_example.did", "dual_inlet_example.caf")
-)
-#> Info: applying file filter, keeping 2 of 3 files
-#> Data from 2 dual inlet iso files: 
-#> # A tibble: 2 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-
-# recombining subset files
-c(
-  di_files[3],
-  di_files[1]
-)
-#> Data from 2 dual inlet iso files: 
-#> # A tibble: 2 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_nu_examp… 82 cycl… 9 entries no method … no vendor data … dual_inl…
-#> 2 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
+# all 3 di_files read above +di_files +#> Data from 3 dual inlet iso files: +#> # A tibble: 3 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (4… 22 ent… standa… 8 rows… dual_i… +#> 3 dual_inlet_nu_example.txt 82 cycles, 6 ions (… 9 entr… no met… no ven… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path + +# only one of the files (by index) +di_files[[2]] +#> Dual inlet iso file 'dual_inlet_example.caf': 8 cycles, 6 ions (44,45,46,47,48,49) + +# only one of the files (by file_id) +di_files$dual_inlet_example.did +#> Dual inlet iso file 'dual_inlet_example.did': 7 cycles, 6 ions (44,45,46,47,48,49) + +# a subset of the files (by index) +di_files[c(1,3)] +#> Data from 2 dual inlet iso files: +#> # A tibble: 2 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_nu_example.txt 82 cycles, 6 ions (… 9 entr… no met… no ven… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path + +# a subset of the files (by file_id) +di_files[c("dual_inlet_example.did", "dual_inlet_example.caf")] +#> Data from 2 dual inlet iso files: +#> # A tibble: 2 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (44,4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (44,4… 22 ent… standa… 8 rows… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path + +# same result using iso_filter_files (more flexible + verbose output) +di_files %>% iso_filter_files( + file_id %in% c("dual_inlet_example.did", "dual_inlet_example.caf") +) +#> Info: applying file filter, keeping 2 of 3 files +#> Data from 2 dual inlet iso files: +#> # A tibble: 2 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (44,4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (44,4… 22 ent… standa… 8 rows… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path + +# recombining subset files +c( + di_files[3], + di_files[1] +) +#> Data from 2 dual inlet iso files: +#> # A tibble: 2 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_nu_example.txt 82 cycles, 6 ions (… 9 entr… no met… no ven… dual_i… +#> 2 dual_inlet_example.did 7 cycles, 6 ions (4… 16 ent… standa… 7 rows… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path

Dealing with file read problems

-

Isoreader is designed to catch problems during file reading without crashing the read pipeline. It keeps track of all problems encountered along the way to make it easy to see what went wrong and remove erroneous files. Most times, files that were only partly saved because of an interrupted instrument analysis will have errors. If you encounter a file that should have intact data in it but has an error in isoreader, please file a bug report and submit your file at https://github.com/isoverse/isoreader/issues

+

Isoreader is designed to catch problems during file reading without +crashing the read pipeline. It keeps track of all problems encountered +along the way to make it easy to see what went wrong and remove +erroneous files. Most times, files that were only partly saved because +of an interrupted instrument analysis will have errors. If you encounter +a file that should have intact data in it but has an error in isoreader, +please file a bug report and submit your file at https://github.com/isoverse/isoreader/issues

-# read two files, one of which is erroneous
-iso_files <-
-  iso_read_continuous_flow(
-    iso_get_reader_example("continuous_flow_example.dxf"),
-    system.file("errdata", "cf_without_data.dxf", package = "isoreader")
-  )
-#> Info: preparing to read 2 data files (all will be cached)...
-#> Info: reading file 'extdata/continuous_flow_example.dxf' from cache...
-#> Info: reading file 'errdata/cf_without_data.dxf' with '.dxf' reader...
-#> Warning: caught error - cannot identify measured masses - block 'CEvalDataI...
-#> Info: finished reading 2 files in 1.45 secs
-#> Warning: encountered 1 problem.
-#> # | FILE                | PROBLEM | OCCURRED IN                  | DETAILS
-#> 1 | cf_without_data.dxf | error   | extract_dxf_raw_voltage_data | cannot ide...
-#> Use iso_get_problems(...) for more details.
-
-# retrieve problem summary
-iso_files %>% iso_get_problems_summary() %>% knitr::kable()
+# read two files, one of which is erroneous +iso_files <- + iso_read_continuous_flow( + iso_get_reader_example("continuous_flow_example.dxf"), + system.file("errdata", "cf_without_data.dxf", package = "isoreader") + ) +#> Info: preparing to read 2 data files (all will be cached)... +#> Info: reading file 'extdata/continuous_flow_example.dxf' from cache... +#> Info: reading file 'errdata/cf_without_data.dxf' with '.dxf' reader... +#> Warning: caught error - cannot identify measured masses - block 'CEvalDataI... +#> Info: finished reading 2 files in 1.19 secs +#> Warning: encountered 1 problem. +#> # | FILE | PROBLEM | OCCURRED IN | DETAILS +#> 1 | cf_without_data.dxf | error | extract_dxf_raw_voltage_data | cannot ide... +#> Use iso_get_problems(...) for more details. + +# retrieve problem summary +iso_files %>% iso_get_problems_summary() %>% knitr::kable()
@@ -440,9 +488,9 @@

Dealing with file read problems

file_id
-
-# retrieve problem details
-iso_files %>% iso_get_problems() %>% knitr::kable()
+ +# retrieve problem details +iso_files %>% iso_get_problems() %>% knitr::kable() @@ -460,164 +508,193 @@

Dealing with file read problemscf_without_data.dxf

- +
error extract_dxf_raw_voltage_datacannot identify measured masses - block ‘CEvalDataIntTransferPart’ not found after position 1 (pos 65327)cannot identify measured masses - block +‘CEvalDataIntTransferPart’ not found after position 1 (pos 65327)
-
-# filter out erroneous files
-iso_files <- iso_files %>% iso_filter_files_with_problems()
-#> Info: removing 1/2 files that have any error (keeping 1)
+ +# filter out erroneous files +iso_files <- iso_files %>% iso_filter_files_with_problems() +#> Info: removing 1/2 files that have any error (keeping 1)

Re-reading files

-

If a file has changed (e.g. is edited through the vendor software) and the changes should be loaded in isoreader, it is easy to re-read and update just those files within a file collection by using the iso_reread_changed_files() function. If some of the files are no longer accessible at their original location, it will throw a warning. If the location for all files has changed, it can be easily adjusted by modifying the file_root file info parameter using iso_set_file_root().

-

Similar functions can be used to re-read outdated files from an older isoreader version (iso_reread_outdated_files()), attempt to re-read problematic files that had read errors/warnings (iso_reread_problem_files()), or simply re-read all files in a collection (iso_reread_all_files()).

+

If a file has changed (e.g. is edited through the vendor software) +and the changes should be loaded in isoreader, it is easy to re-read and +update just those files within a file collection by using the +iso_reread_changed_files() function. If some of the files +are no longer accessible at their original location, it will throw a +warning. If the location for all files has changed, it can be easily +adjusted by modifying the file_root file info parameter +using iso_set_file_root().

+

Similar functions can be used to re-read outdated files from an older +isoreader version (iso_reread_outdated_files()), attempt to +re-read problematic files that had read errors/warnings +(iso_reread_problem_files()), or simply re-read all files +in a collection (iso_reread_all_files()).

-# re-read the 3 dual inlet files from their original location if any have changed
-di_files %>%
-  iso_reread_changed_files()
-#> Info: found 0 changed data file(s), re-reading 0/3.
-#> Data from 3 dual inlet iso files: 
-#> # A tibble: 3 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-#> 3 dual_inlet_nu_examp… 82 cycl… 9 entries no method … no vendor data … dual_inl…
-
-# update the file_root for the files before re-read (in this case to a location
-# that does not hold these files and hence will lead to a warning)
-di_files %>%
-  iso_set_file_root(root = ".") %>%
-  iso_reread_all_files()
-#> Info: setting file root for 3 data file(s) to '.'
-#> Warning: 3 file(s) do not exist at their referenced location and can not be re-read. Consider setting a new root directory with iso_set_file_root() first:
-#>  - 'dual_inlet_example.did' in root '.'
-#>  - 'dual_inlet_example.caf' in root '.'
-#>  - 'dual_inlet_nu_example.txt' in root '.'
-#> Info: found 0 data file(s), re-reading 0/3.
-#> Data from 3 dual inlet iso files: 
-#> # A tibble: 3 × 6
-#>   file_id              raw_data file_info method_info vendor_data_tab… file_path
-#>   <chr>                <glue>   <chr>     <chr>       <chr>            <chr>    
-#> 1 dual_inlet_example.… 7 cycle… 16 entri… standards,… 7 rows, 8 colum… dual_inl…
-#> 2 dual_inlet_example.… 8 cycle… 22 entri… standards,… 8 rows, 9 colum… dual_inl…
-#> 3 dual_inlet_nu_examp… 82 cycl… 9 entries no method … no vendor data … dual_inl…
-#> 
-#> Problem summary:
-#> # A tibble: 3 × 3
-#>   file_id                   warning error
-#>   <chr>                       <int> <int>
-#> 1 dual_inlet_example.caf          1     0
-#> 2 dual_inlet_example.did          1     0
-#> 3 dual_inlet_nu_example.txt       1     0
+# re-read the 3 dual inlet files from their original location if any have changed +di_files %>% + iso_reread_changed_files() +#> Info: found 0 changed data file(s), re-reading 0/3. +#> Data from 3 dual inlet iso files: +#> # A tibble: 3 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (4… 22 ent… standa… 8 rows… dual_i… +#> 3 dual_inlet_nu_example.txt 82 cycles, 6 ions (… 9 entr… no met… no ven… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path + +# update the file_root for the files before re-read (in this case to a location +# that does not hold these files and hence will lead to a warning) +di_files %>% + iso_set_file_root(root = ".") %>% + iso_reread_all_files() +#> Info: setting file root for 3 data file(s) to '.' +#> Warning: 3 file(s) do not exist at their referenced location and can not be re-read. Consider setting a new root directory with iso_set_file_root() first: +#> - 'dual_inlet_example.did' in root '.' +#> - 'dual_inlet_example.caf' in root '.' +#> - 'dual_inlet_nu_example.txt' in root '.' +#> Info: found 0 data file(s), re-reading 0/3. +#> Data from 3 dual inlet iso files: +#> # A tibble: 3 × 6 +#> file_id raw_data file_…¹ metho…² vendo…³ file_…⁴ +#> <chr> <glue> <chr> <chr> <chr> <chr> +#> 1 dual_inlet_example.did 7 cycles, 6 ions (4… 16 ent… standa… 7 rows… dual_i… +#> 2 dual_inlet_example.caf 8 cycles, 6 ions (4… 22 ent… standa… 8 rows… dual_i… +#> 3 dual_inlet_nu_example.txt 82 cycles, 6 ions (… 9 entr… no met… no ven… dual_i… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, +#> # ³​vendor_data_table, ⁴​file_path +#> +#> Problem summary: +#> # A tibble: 3 × 3 +#> file_id warning error +#> <chr> <int> <int> +#> 1 dual_inlet_example.caf 1 0 +#> 2 dual_inlet_example.did 1 0 +#> 3 dual_inlet_nu_example.txt 1 0

Units

-

Isoreader provides a built in data type with units (iso_with_units) that can be used to easily keep track of units inside data frame. These units can be made explicit (=included in the column header), stripped altogether, or turned back to be implicit.

+

Isoreader provides a built in data type with units +(iso_with_units) that can be used to easily keep track of +units inside data frame. These units can be made explicit (=included in +the column header), stripped altogether, or turned back to be +implicit.

-# strip all units
-cf_file %>%
-  iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`)) %>%
-  iso_strip_units() %>% head(3)
-#> Info: aggregating vendor data table from 1 data file(s)
-#> # A tibble: 3 × 4
-#>   file_id                     `Ampl 28` `rIntensity 28` `d 15N/14N`
-#>   <chr>                           <dbl>           <dbl>       <dbl>
-#> 1 continuous_flow_example.dxf     3024.          57524.      0.0160
-#> 2 continuous_flow_example.dxf     3023.          57383.      0     
-#> 3 continuous_flow_example.dxf     2074.          52732.      1.05
-
-# make units explicit
-cf_file %>%
-  iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`)) %>%
-  iso_make_units_explicit() %>% head(3)
-#> Info: aggregating vendor data table from 1 data file(s)
-#> # A tibble: 3 × 4
-#>   file_id                     `Ampl 28 [mV]` `rIntensity 28 […` `d 15N/14N [pe…`
-#>   <chr>                                <dbl>              <dbl>            <dbl>
-#> 1 continuous_flow_example.dxf          3024.             57524.           0.0160
-#> 2 continuous_flow_example.dxf          3023.             57383.           0     
-#> 3 continuous_flow_example.dxf          2074.             52732.           1.05
-
-# introduce new unit columns e.g. in the file info
-cf_file %>%
-  iso_mutate_file_info(weight = iso_with_units(0.42, "mg")) %>%
-  iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`),
-                            include_file_info = weight) %>%
-  iso_make_units_explicit() %>% head(3)
-#> Info: mutating file info for 1 data file(s)
-#> Info: aggregating vendor data table from 1 data file(s), including file info 'weight'
-#> # A tibble: 3 × 5
-#>   file_id         `weight [mg]` `Ampl 28 [mV]` `rIntensity 28…` `d 15N/14N [pe…`
-#>   <chr>                   <dbl>          <dbl>            <dbl>            <dbl>
-#> 1 continuous_flo…          0.42          3024.           57524.           0.0160
-#> 2 continuous_flo…          0.42          3023.           57383.           0     
-#> 3 continuous_flo…          0.42          2074.           52732.           1.05
-
-# or turn a column e.g. with custom format units in the header into implicit units
-cf_file %>%
-  iso_mutate_file_info(weight.mg = 0.42) %>%
-  iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`),
-                            include_file_info = weight.mg) %>%
-  iso_make_units_implicit(prefix = ".", suffix = "") %>% head(3)
-#> Info: mutating file info for 1 data file(s)
-#> Info: aggregating vendor data table from 1 data file(s), including file info 'weight.mg'
-#> # A tibble: 3 × 5
-#>   file_id                        weight `Ampl 28` `rIntensity 28`   `d 15N/14N`
-#>   <chr>                       <dbl[mg]> <dbl[mV]>      <dbl[mVs]> <dbl[permil]>
-#> 1 continuous_flow_example.dxf      0.42  3024.040        57524.32    0.01600287
-#> 2 continuous_flow_example.dxf      0.42  3022.789        57383.21    0.00000000
-#> 3 continuous_flow_example.dxf      0.42  2073.872        52731.67    1.04910065
+# strip all units +cf_file %>% + iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`)) %>% + iso_strip_units() %>% head(3) +#> Info: aggregating vendor data table from 1 data file(s) +#> # A tibble: 3 × 4 +#> file_id `Ampl 28` `rIntensity 28` `d 15N/14N` +#> <chr> <dbl> <dbl> <dbl> +#> 1 continuous_flow_example.dxf 3024. 57524. 0.0160 +#> 2 continuous_flow_example.dxf 3023. 57383. 0 +#> 3 continuous_flow_example.dxf 2074. 52732. 1.05 + +# make units explicit +cf_file %>% + iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`)) %>% + iso_make_units_explicit() %>% head(3) +#> Info: aggregating vendor data table from 1 data file(s) +#> # A tibble: 3 × 4 +#> file_id `Ampl 28 [mV]` `rIntensity 28 [mVs]` d 15N/14N […¹ +#> <chr> <dbl> <dbl> <dbl> +#> 1 continuous_flow_example.dxf 3024. 57524. 0.0160 +#> 2 continuous_flow_example.dxf 3023. 57383. 0 +#> 3 continuous_flow_example.dxf 2074. 52732. 1.05 +#> # … with abbreviated variable name ¹​`d 15N/14N [permil]` + +# introduce new unit columns e.g. in the file info +cf_file %>% + iso_mutate_file_info(weight = iso_with_units(0.42, "mg")) %>% + iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`), + include_file_info = weight) %>% + iso_make_units_explicit() %>% head(3) +#> Info: mutating file info for 1 data file(s) +#> Info: aggregating vendor data table from 1 data file(s), including file info 'weight' +#> # A tibble: 3 × 5 +#> file_id `weight [mg]` `Ampl 28 [mV]` rIntensity …¹ d 15N…² +#> <chr> <dbl> <dbl> <dbl> <dbl> +#> 1 continuous_flow_example.dxf 0.42 3024. 57524. 0.0160 +#> 2 continuous_flow_example.dxf 0.42 3023. 57383. 0 +#> 3 continuous_flow_example.dxf 0.42 2074. 52732. 1.05 +#> # … with abbreviated variable names ¹​`rIntensity 28 [mVs]`, +#> # ²​`d 15N/14N [permil]` + +# or turn a column e.g. with custom format units in the header into implicit units +cf_file %>% + iso_mutate_file_info(weight.mg = 0.42) %>% + iso_get_vendor_data_table(select = c(`Ampl 28`, `rIntensity 28`, `d 15N/14N`), + include_file_info = weight.mg) %>% + iso_make_units_implicit(prefix = ".", suffix = "") %>% head(3) +#> Info: mutating file info for 1 data file(s) +#> Info: aggregating vendor data table from 1 data file(s), including file info 'weight.mg' +#> # A tibble: 3 × 5 +#> file_id weight `Ampl 28` `rIntensity 28` `d 15N/14N` +#> <chr> <dbl[mg]> <dbl[mV]> <dbl[mVs]> <dbl[permil]> +#> 1 continuous_flow_example.dxf 0.42 3024.040 57524.32 0.01600287 +#> 2 continuous_flow_example.dxf 0.42 3022.789 57383.21 0.00000000 +#> 3 continuous_flow_example.dxf 0.42 2073.872 52731.67 1.04910065

Formatting

-

Formatting data into text is easily achieved with the built in R function sprintf but this package also provides a convenience function that knows how to incorporate units information from iso_with_units values. Use iso_format to format and concatenate any single values or entire columns inside a data frame.

+

Formatting data into text is easily achieved with the built in R +function sprintf but this package also provides a +convenience function that knows how to incorporate units information +from iso_with_units values. Use iso_format to +format and concatenate any single values or entire columns inside a data +frame.

-# concatenation example with single values
-iso_format(
-   pi = 3.14159,
-   x = iso_with_units(42, "mg"),
-   ID = "ABC",
-   signif = 4,
-   sep = " | "
-)
-#> [1] "pi: 3.142 | x: 42mg | ID: ABC"
-
-# example inside a data frame
-cf_file %>%
-  iso_get_vendor_data_table(select = c(`Nr.`, `Ampl 28`, `d 15N/14N`)) %>%
-  dplyr::select(-file_id) %>%
-  head(3) %>%
-  # introduce new label columns using iso_format
-  dplyr::mutate(
-    # default concatenation of values
-    label_default = iso_format(
-      `Nr.`, `Ampl 28`, `d 15N/14N`,
-      sep = ", "
-    ),
-    # concatenate with custom names for each value
-    label_named = iso_format(
-      `#` = `Nr.`, A = `Ampl 28`, d15 = `d 15N/14N`,
-      sep = ", "
-    ),
-    # concatenate just the values and increase significant digits
-    label_value = iso_format(
-      `Nr.`, `Ampl 28`, `d 15N/14N`,
-      sep = ", ", format_names = NULL, signif = 6
-    )
-  )
-#> Info: aggregating vendor data table from 1 data file(s)
-#> # A tibble: 3 × 6
-#>     Nr. `Ampl 28`   `d 15N/14N` label_default            label_named label_value
-#>   <int> <dbl[mV]> <dbl[permil]> <chr>                    <chr>       <chr>      
-#> 1     1  3024.040    0.01600287 Nr.: 1, Ampl 28: 3020mV… #: 1, A: 3… 1, 3024.04…
-#> 2     2  3022.789    0.00000000 Nr.: 2, Ampl 28: 3020mV… #: 2, A: 3… 2, 3022.79…
-#> 3     3  2073.872    1.04910065 Nr.: 3, Ampl 28: 2070mV… #: 3, A: 2… 3, 2073.87…
+# concatenation example with single values +iso_format( + pi = 3.14159, + x = iso_with_units(42, "mg"), + ID = "ABC", + signif = 4, + sep = " | " +) +#> [1] "pi: 3.142 | x: 42mg | ID: ABC" + +# example inside a data frame +cf_file %>% + iso_get_vendor_data_table(select = c(`Nr.`, `Ampl 28`, `d 15N/14N`)) %>% + dplyr::select(-file_id) %>% + head(3) %>% + # introduce new label columns using iso_format + dplyr::mutate( + # default concatenation of values + label_default = iso_format( + `Nr.`, `Ampl 28`, `d 15N/14N`, + sep = ", " + ), + # concatenate with custom names for each value + label_named = iso_format( + `#` = `Nr.`, A = `Ampl 28`, d15 = `d 15N/14N`, + sep = ", " + ), + # concatenate just the values and increase significant digits + label_value = iso_format( + `Nr.`, `Ampl 28`, `d 15N/14N`, + sep = ", ", format_names = NULL, signif = 6 + ) + ) +#> Info: aggregating vendor data table from 1 data file(s) +#> # A tibble: 3 × 6 +#> Nr. `Ampl 28` `d 15N/14N` label_default label…¹ label…² +#> <int> <dbl[mV]> <dbl[permil]> <chr> <chr> <chr> +#> 1 1 3024.040 0.01600287 Nr.: 1, Ampl 28: 3020mV, d 15N/… #: 1, … 1, 302… +#> 2 2 3022.789 0.00000000 Nr.: 2, Ampl 28: 3020mV, d 15N/… #: 2, … 2, 302… +#> 3 3 2073.872 1.04910065 Nr.: 3, Ampl 28: 2070mV, d 15N/… #: 3, … 3, 207… +#> # … with abbreviated variable names ¹​label_named, ²​label_value
@@ -638,7 +715,7 @@

Formatting

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/articles/quick_start.html b/articles/quick_start.html index 30f8b1f..f78ce4b 100644 --- a/articles/quick_start.html +++ b/articles/quick_start.html @@ -39,7 +39,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -102,12 +102,12 @@ -
+

Data files

-

For demonstration purposes, this vignette simply reads all supported dual inlet, continuous flow, and scan files that are bundled with the isoreader package. For a more detailed introduction to each file type, check out the specific vignettes for each:

+

For demonstration purposes, this vignette simply reads all supported +dual inlet, continuous flow, and scan files that are bundled with the +isoreader package. For a more detailed introduction to each file type, +check out the specific vignettes for each:

-# all available examples
-iso_get_reader_examples() %>% knitr::kable()
+# all available examples +iso_get_reader_examples() %>% knitr::kable()
@@ -217,74 +227,86 @@

Data filesDual Inlet Files

-# read all available examples
-di_files <- iso_read_dual_inlet(iso_get_reader_examples_folder())
-#> Info: preparing to read 3 data files...
-#> Info: reading file 'dual_inlet_example.caf' with '.caf' reader...
-#> Info: reading file 'dual_inlet_example.did' with '.did' reader...
-#> Info: reading file 'dual_inlet_nu_example.txt' with '.txt' reader...
-#> Warning: found 6 channels but 0 masses were specified - the raw data will b...
-#> Info: finished reading 3 files in 9.61 secs
-#> Warning: encountered 1 problem.
-#> # | FILE                      | PROBLEM | OCCURRED IN | DETAILS
-#> 1 | dual_inlet_nu_example.txt | warning | iso_read_nu | found 6 channels but ...
-#> Use iso_get_problems(...) for more details.
+# read all available examples +di_files <- iso_read_dual_inlet(iso_get_reader_examples_folder()) +#> Info: preparing to read 3 data files... +#> Info: reading file 'dual_inlet_example.caf' with '.caf' reader... +#> Info: reading file 'dual_inlet_example.did' with '.did' reader... +#> Info: reading file 'dual_inlet_nu_example.txt' with '.txt' reader... +#> Warning: found 6 channels but 0 masses were specified - the raw data will b... +#> Info: finished reading 3 files in 11.57 secs +#> Warning: encountered 1 problem. +#> # | FILE | PROBLEM | OCCURRED IN | DETAILS +#> 1 | dual_inlet_nu_example.txt | warning | iso_read_nu | found 6 channels but ... +#> Use iso_get_problems(...) for more details.
-# save as r data storage (read back in with iso_read_dual_inlet)
-iso_save(di_files, filepath = "di_save")
-#> Info: exporting data from 3 iso_files into R Data Storage 'di_save.di.rds'
+# save as r data storage (read back in with iso_read_dual_inlet) +iso_save(di_files, filepath = "di_save") +#> Info: exporting data from 3 iso_files into R Data Storage 'di_save.di.rds'
-# export to excel
-iso_export_to_excel(di_files, filepath = "di_export")
+# export to excel +iso_export_to_excel(di_files, filepath = "di_export")

Continuous Flow Files

-# read all available examples
-cf_files <- iso_read_continuous_flow(iso_get_reader_examples_folder())
-#> Info: preparing to read 3 data files...
-#> Info: reading file 'continuous_flow_example.cf' with '.cf' reader...
-#> Info: reading file 'continuous_flow_example.dxf' with '.dxf' reader...
-#> Info: reading file 'continuous_flow_example.iarc' with '.iarc' reader...
-#>       unpacking isoprime archive file...
-#>       found 1 processing list(s) in .iarc: 'ProcessingList_1'
-#>       found 2 method(s) in .iarc: 'Method_320', 'Method_77'
-#>       found 4 sample(s) in .iarc
-#>       searching processing list 'ProcessingList_1' for gas configurations...
-#>       found configurations for 'CO', 'SO2', 'CO2', 'H2', 'N2'
-#>       processing sample '6632_WSL-2 wood' (IRMS data '133.hdf5', '135.hdf5')
-#>       processing sample '6605_USGS41' (IRMS data '40.hdf5', '43.hdf5')
-#>       processing sample '6617_IAEA600' (IRMS data '80.hdf5', '82.hdf5')
-#>       processing sample '6630_GlutamicAcid04' (IRMS data '124.hdf5', '126.h...
-#> Info: finished reading 3 files in 10.00 secs
+# read all available examples +cf_files <- iso_read_continuous_flow(iso_get_reader_examples_folder()) +#> Info: preparing to read 3 data files... +#> Info: reading file 'continuous_flow_example.cf' with '.cf' reader... +#> Info: reading file 'continuous_flow_example.dxf' with '.dxf' reader... +#> Info: reading file 'continuous_flow_example.iarc' with '.iarc' reader... +#> unpacking isoprime archive file... +#> found 1 processing list(s) in .iarc: 'ProcessingList_1' +#> found 2 method(s) in .iarc: 'Method_320', 'Method_77' +#> found 4 sample(s) in .iarc +#> searching processing list 'ProcessingList_1' for gas configurations... +#> found configurations for 'CO', 'SO2', 'CO2', 'H2', 'N2' +#> processing sample '6632_WSL-2 wood' (IRMS data '133.hdf5', '135.hdf5') +#> processing sample '6605_USGS41' (IRMS data '40.hdf5', '43.hdf5') +#> processing sample '6617_IAEA600' (IRMS data '80.hdf5', '82.hdf5') +#> processing sample '6630_GlutamicAcid04' (IRMS data '124.hdf5', '126.h... +#> Info: finished reading 3 files in 13.68 secs
-# save as r data storage (read back in with iso_read_continuous_flow)
-iso_save(cf_files, filepath = "cf_save")
-#> Info: exporting data from 6 iso_files into R Data Storage 'cf_save.cf.rds'
+# save as r data storage (read back in with iso_read_continuous_flow) +iso_save(cf_files, filepath = "cf_save") +#> Info: exporting data from 6 iso_files into R Data Storage 'cf_save.cf.rds'
-# export to excel
-iso_export_to_excel(cf_files, filepath = "cf_export")
+# export to excel +iso_export_to_excel(cf_files, filepath = "cf_export")

Scan Files

-# read all available examples
-scan_files <- iso_read_scan(iso_get_reader_examples_folder())
-#> Info: preparing to read 4 data files...
-#> Info: reading file 'background_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'full_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'time_scan_example.scn' with '.scn' reader...
-#> Info: finished reading 4 files in 2.91 secs
+# read all available examples +scan_files <- iso_read_scan(iso_get_reader_examples_folder()) +#> Info: preparing to read 4 data files... +#> Info: reading file 'background_scan_example.scn' with '.scn' reader... +#> Info: reading file 'full_scan_example.scn' with '.scn' reader... +#> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader... +#> Info: reading file 'time_scan_example.scn' with '.scn' reader... +#> Info: finished reading 4 files in 2.76 secs +#> Warning: file creation date could not be accessed for all files because +#> this information is not available on some Linux systems, reporting +#> last modified time for file_datetime instead. To turn these warnings +#> off, call iso_turn_datetime_warnings_off() and reread these files with +#> iso_reread_all_files(). +#> Warning: encountered 4 problems. +#> # | FILE | PROBLEM | OCCURRED IN ... +#> 1 | background_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 2 | full_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 3 | peak_shape_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 4 | time_scan_example.scn | warning | extract_os_file_creation_datetime... +#> Use iso_get_problems(...) for more details.
-# save as r data storage (read back in with iso_read_scan)
-iso_save(scan_files, filepath = "scan_save")
-#> Info: exporting data from 4 iso_files into R Data Storage 'scan_save.scan.rds'
+# save as r data storage (read back in with iso_read_scan) +iso_save(scan_files, filepath = "scan_save") +#> Info: exporting data from 4 iso_files into R Data Storage 'scan_save.scan.rds'
-# export to excel
-iso_export_to_excel(scan_files, filepath = "scan_export")
+# export to excel +iso_export_to_excel(scan_files, filepath = "scan_export") @@ -305,7 +327,7 @@

Scan Files

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/articles/scan.html b/articles/scan.html index cd3f39e..54c6e5c 100644 --- a/articles/scan.html +++ b/articles/scan.html @@ -39,7 +39,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -102,12 +102,12 @@ -
+

Reading files

-

Reading scan files is as simple as passing one or multiple file or folder paths to the iso_read_scan() function. If folders are provided, any files that have a recognized scan file extensions within those folders will be processed (e.g. all .scn). Here we read several files that are bundled with the package as examples (and whose paths can be retrieved using the iso_get_reader_example() function).

+

Reading scan files is as simple as passing one or multiple file or +folder paths to the iso_read_scan() function. If folders +are provided, any files that have a recognized scan file extensions +within those folders will be processed (e.g. all .scn). +Here we read several files that are bundled with the package as examples +(and whose paths can be retrieved using the +iso_get_reader_example() function).

-# all available examples
-iso_get_reader_examples() %>% knitr::kable()
+# all available examples +iso_get_reader_examples() %>% knitr::kable()

@@ -209,28 +220,43 @@

Reading files
-# read scan examples
-scan_files <-
-  iso_read_scan(
-    iso_get_reader_example("peak_shape_scan_example.scn"),
-    iso_get_reader_example("background_scan_example.scn"),
-    iso_get_reader_example("full_scan_example.scn"),
-    iso_get_reader_example("time_scan_example.scn")
-  )
-#> Info: preparing to read 4 data files (all will be cached)...
-#> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'background_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'full_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'time_scan_example.scn' with '.scn' reader...
-#> Info: finished reading 4 files in 3.41 secs
+# read scan examples +scan_files <- + iso_read_scan( + iso_get_reader_example("peak_shape_scan_example.scn"), + iso_get_reader_example("background_scan_example.scn"), + iso_get_reader_example("full_scan_example.scn"), + iso_get_reader_example("time_scan_example.scn") + ) +#> Info: preparing to read 4 data files (all will be cached)... +#> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader... +#> Info: reading file 'background_scan_example.scn' with '.scn' reader... +#> Info: reading file 'full_scan_example.scn' with '.scn' reader... +#> Info: reading file 'time_scan_example.scn' with '.scn' reader... +#> Info: finished reading 4 files in 3.02 secs +#> Warning: file creation date could not be accessed for all files because +#> this information is not available on some Linux systems, reporting +#> last modified time for file_datetime instead. To turn these warnings +#> off, call iso_turn_datetime_warnings_off() and reread these files with +#> iso_reread_all_files(). +#> Warning: encountered 4 problems. +#> # | FILE | PROBLEM | OCCURRED IN ... +#> 1 | peak_shape_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 2 | background_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 3 | full_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 4 | time_scan_example.scn | warning | extract_os_file_creation_datetime... +#> Use iso_get_problems(...) for more details.

File summary

-

The scan_files variable now contains a set of isoreader objects, one for each file. Take a look at what information was retrieved from the files using the iso_get_data_summary() function.

+

The scan_files variable now contains a set of isoreader +objects, one for each file. Take a look at what information was +retrieved from the files using the iso_get_data_summary() +function.

-scan_files %>% iso_get_data_summary() %>% knitr::kable()
-#> Info: aggregating data summary from 4 data file(s)
+scan_files %>% iso_get_data_summary() %>% knitr::kable() +#> Info: aggregating data summary from 4 data file(s)

@@ -280,38 +306,103 @@

File summary

Problems

-

In case there was any trouble with reading any of the files, the following functions provide an overview summary as well as details of all errors and warnings, respectively. The examples here contain no errors but if you run into any unexpected file read problems, please file a bug report in the isoreader issue tracker.

+

In case there was any trouble with reading any of the files, the +following functions provide an overview summary as well as details of +all errors and warnings, respectively. The examples here contain no +errors but if you run into any unexpected file read problems, please +file a bug report in the isoreader issue +tracker.

-scan_files %>% iso_get_problems_summary() %>% knitr::kable()
+scan_files %>% iso_get_problems_summary() %>% knitr::kable()

- - + + - + + + + + + + + + + + + + + + + + + + + + +
file_iderrorwarningwarningerror
background_scan_example.scn10
full_scan_example.scn10
peak_shape_scan_example.scn10
time_scan_example.scn10
-scan_files %>% iso_get_problems() %>% knitr::kable()
+scan_files %>% iso_get_problems() %>% knitr::kable()
++++++ - + + + + + + + + + + + + + + + + + + + + + + + + + +
file_id type func details
peak_shape_scan_example.scnwarningextract_os_file_creation_datetimefile creation date cannot be accessed on this Linux +system, using last modified time for file_datetime instead
background_scan_example.scnwarningextract_os_file_creation_datetimefile creation date cannot be accessed on this Linux +system, using last modified time for file_datetime instead
full_scan_example.scnwarningextract_os_file_creation_datetimefile creation date cannot be accessed on this Linux +system, using last modified time for file_datetime instead
time_scan_example.scnwarningextract_os_file_creation_datetimefile creation date cannot be accessed on this Linux +system, using last modified time for file_datetime instead

File Information

-

Detailed file information can be aggregated for all isofiles using the iso_get_file_info() function which supports the full select syntax of the dplyr package to specify which columns are of interest (by default, all file information is retrieved).

+

Detailed file information can be aggregated for all isofiles using +the iso_get_file_info() function which supports the full select +syntax of the dplyr +package to specify which columns are of interest (by default, all file +information is retrieved).

-# all file information
-scan_files %>% iso_get_file_info(select = c(-file_root)) %>% knitr::kable()
-#> Info: aggregating file info from 4 data file(s), selecting info columns 'c(-file_root)'
+# all file information +scan_files %>% iso_get_file_info(select = c(-file_root)) %>% knitr::kable() +#> Info: aggregating file info from 4 data file(s), selecting info columns 'c(-file_root)'
@@ -336,7 +427,7 @@

File Informationpeak_shape_scan_example.scn

- + @@ -345,7 +436,7 @@

File Informationbackground_scan_example.scn

- + @@ -354,7 +445,7 @@

File Informationfull_scan_example.scn

- + @@ -363,7 +454,7 @@

File Informationtime_scan_example.scn

- + @@ -373,18 +464,20 @@

File Information

Select/Rename

-

File information can also be modified across an entire collection of isofiles using the iso_select_file_info() and iso_rename_file_info() functions:

+

File information can also be modified across an entire collection of +isofiles using the iso_select_file_info() and +iso_rename_file_info() functions:

-# select + rename specific file info columns
-scan_files2 <- scan_files %>%
-  iso_select_file_info(-file_root) %>%
-  iso_rename_file_info(`Date & Time` = file_datetime)
-#> Info: selecting/renaming the following file info across 4 data file(s): '-file_root'
-#> Info: renaming the following file info across 4 data file(s): 'file_datetime'->'Date & Time'
-
-# fetch all file info
-scan_files2 %>% iso_get_file_info() %>% knitr::kable()
-#> Info: aggregating file info from 4 data file(s)
+# select + rename specific file info columns +scan_files2 <- scan_files %>% + iso_select_file_info(-file_root) %>% + iso_rename_file_info(`Date & Time` = file_datetime) +#> Info: selecting/renaming the following file info across 4 data file(s): '-file_root' +#> Info: renaming the following file info across 4 data file(s): 'file_datetime'->'Date & Time' + +# fetch all file info +scan_files2 %>% iso_get_file_info() %>% knitr::kable() +#> Info: aggregating file info from 4 data file(s)

peak_shape_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 36411 High Voltage test this comment featurebackground_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 62303 High Voltage NAfull_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 57551 MagnetCurrent NAtime_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 140550 Clock NA
@@ -409,7 +502,7 @@

Select/Renamepeak_shape_scan_example.scn

- + @@ -418,7 +511,7 @@

Select/Renamebackground_scan_example.scn

- + @@ -427,7 +520,7 @@

Select/Renamefull_scan_example.scn

- + @@ -436,7 +529,7 @@

Select/Renametime_scan_example.scn

- + @@ -447,15 +540,19 @@

Select/Rename

Filter

-

Any collection of isofiles can also be filtered based on the available file information using the function iso_filter_files. This function can operate on any column available in the file information and supports full dplyr syntax.

+

Any collection of isofiles can also be filtered based on the +available file information using the function +iso_filter_files. This function can operate on any column +available in the file information and supports full dplyr +syntax.

-# find files that have 'CIT' in the new ID field
-scan_files2 %>%
-  iso_filter_files(type == "High Voltage") %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: applying file filter, keeping 2 of 4 files
-#> Info: aggregating file info from 2 data file(s)
+# find files that have 'CIT' in the new ID field +scan_files2 %>% + iso_filter_files(type == "High Voltage") %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: applying file filter, keeping 2 of 4 files +#> Info: aggregating file info from 2 data file(s)

peak_shape_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 36411 High Voltage test this comment featurebackground_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 62303 High Voltage NAfull_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 57551 MagnetCurrent NAtime_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 140550 Clock NA
@@ -480,7 +577,7 @@

Filter

- + @@ -489,7 +586,7 @@

Filter

- + @@ -500,19 +597,24 @@

Filter

Mutate

-

The file information in any collection of isofiles can also be mutated using the function iso_mutate_file_info. This function can introduce new columns and operate on any existing columns available in the file information (even if it does not exist in all files) and supports full dplyr syntax.

+

The file information in any collection of isofiles can also be +mutated using the function iso_mutate_file_info. This +function can introduce new columns and operate on any existing columns +available in the file information (even if it does not exist in all +files) and supports full dplyr +syntax.

-scan_files3 <- scan_files2 %>%
-  iso_mutate_file_info(
-    # introduce new column
-    `Run in 2019?` = `Date & Time` > "2019-01-01" & `Date & Time` < "2020-01-01"
-  )
-#> Info: mutating file info for 4 data file(s)
-
-scan_files3 %>%
-  iso_get_file_info() %>%
-  knitr::kable()
-#> Info: aggregating file info from 4 data file(s)
+scan_files3 <- scan_files2 %>% + iso_mutate_file_info( + # introduce new column + `Run in 2019?` = `Date & Time` > "2019-01-01" & `Date & Time` < "2020-01-01" + ) +#> Info: mutating file info for 4 data file(s) + +scan_files3 %>% + iso_get_file_info() %>% + knitr::kable() +#> Info: aggregating file info from 4 data file(s)

peak_shape_scan_example.scn peak_shape_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 36411 High Voltage test this comment featurebackground_scan_example.scn background_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 62303 High Voltage NA
@@ -539,7 +641,7 @@

Mutate

- + @@ -549,7 +651,7 @@

Mutate

- + @@ -559,7 +661,7 @@

Mutate

- + @@ -569,7 +671,7 @@

Mutate

- + @@ -582,10 +684,12 @@

Mutate

Resistors

-

Additionally, some IRMS data files contain resistor information that are useful for downstream calculations (see e.g. section on signal conversion later in this vignette):

+

Additionally, some IRMS data files contain resistor information that +are useful for downstream calculations (see e.g. section on signal +conversion later in this vignette):

-scan_files %>% iso_get_resistors() %>% knitr::kable()
-#> Info: aggregating resistors info from 4 data file(s)
+scan_files %>% iso_get_resistors() %>% knitr::kable() +#> Info: aggregating resistors info from 4 data file(s)

peak_shape_scan_example.scn peak_shape_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 36411 High Voltage test this comment featurebackground_scan_example.scn background_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 62303 High Voltage NAfull_scan_example.scn full_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 57551 MagnetCurrent NAtime_scan_example.scn time_scan_example.scn NA2022-04-25 20:14:362023-01-07 08:46:37 140550 Clock NA
@@ -690,11 +794,16 @@

Resistors

Raw Data

-

The raw data read from the scan files can be retrieved similarly using the iso_get_raw_data() function. Most data aggregation functions also allow for inclusion of file information using the include_file_info parameter, which functions identically to the select parameter of the iso_get_file_info function discussed earlier.

+

The raw data read from the scan files can be retrieved similarly +using the iso_get_raw_data() function. Most data +aggregation functions also allow for inclusion of file information using +the include_file_info parameter, which functions +identically to the select parameter of the +iso_get_file_info function discussed earlier.

-# get raw data with default selections (all raw data, no additional file info)
-scan_files %>% iso_get_raw_data() %>% head(n=10) %>% knitr::kable()
-#> Info: aggregating raw data from 4 data file(s)
+# get raw data with default selections (all raw data, no additional file info) +scan_files %>% iso_get_raw_data() %>% head(n=10) %>% knitr::kable() +#> Info: aggregating raw data from 4 data file(s)

file_id
@@ -916,18 +1025,26 @@

Raw Data

-# get specific raw data and add some file information
-scan_files %>%
-  iso_get_raw_data(
-    # select just time and the two ions
-    select = c(x, x_units, v44.mV, v45.mV),
-    # include the scan type and rename the column
-    include_file_info = c(`Scan Type` = type)
-  ) %>%
-  # look at first few records only
-  head(n=10) %>% knitr::kable()
-#> Info: aggregating raw data from 4 data file(s), selecting data columns 'c(x, x_units, v44.mV, v45.mV)', including file info 'c(`Scan Type` = type)'
+# get specific raw data and add some file information +scan_files %>% + iso_get_raw_data( + # select just time and the two ions + select = c(x, x_units, v44.mV, v45.mV), + # include the scan type and rename the column + include_file_info = c(`Scan Type` = type) + ) %>% + # look at first few records only + head(n=10) %>% knitr::kable() +#> Info: aggregating raw data from 4 data file(s), selecting data columns 'c(x, x_units, v44.mV, v45.mV)', including file info 'c(`Scan Type` = type)' ++++++++ @@ -1023,52 +1140,87 @@

Raw Data

For expert users: retrieving all data

-

For users familiar with the nested data frames from the tidyverse (particularly tidyr’s nest and unnest), there is an easy way to retrieve all data from the iso file objects in a single nested data frame:

+

For users familiar with the nested data frames from the tidyverse (particularly tidyr’s nest and +unnest), there is an easy way to retrieve all data from the +iso file objects in a single nested data frame:

-all_data <- scan_files %>% iso_get_all_data()
-#> Info: aggregating all data from 4 data file(s)
-# not printed out because this data frame is very big
+all_data <- scan_files %>% iso_get_all_data() +#> Info: aggregating all data from 4 data file(s) +# not printed out because this data frame is very big

Saving collections

-

Saving entire collections of isofiles for retrieval at a later point is easily done using the iso_save function which stores collections or individual isoreader file objects in the efficient R data storage format .rds (if not specified, the extension .scan.rds will be automatically appended). These saved collections can be conveniently read back using the same iso_read_scan command used for raw data files.

+

Saving entire collections of isofiles for retrieval at a later point +is easily done using the iso_save function which stores +collections or individual isoreader file objects in the efficient R data +storage format .rds (if not specified, the extension +.scan.rds will be automatically appended). These saved +collections can be conveniently read back using the same +iso_read_scan command used for raw data files.

-# export to R data archive
-scan_files %>% iso_save("scan_files_export.scan.rds")
-#> Info: exporting data from 4 iso_files into R Data Storage 'scan_files_export.scan.rds'
-
-# read back the exported R data storage
-iso_read_scan("scan_files_export.scan.rds")
-#> Info: preparing to read 1 data files (all will be cached)...
-#> Info: reading file 'scan_files_export.scan.rds' with '.scan.rds' reader...
-#> Info: loaded 4 data files from R Data Storage
-#> Info: finished reading 1 files in 0.12 secs
-#> Data from 4 scan iso files: 
-#> # A tibble: 4 × 5
-#>   file_id                     raw_data           file_info method_info file_path
-#>   <chr>                       <glue>             <chr>     <chr>       <chr>    
-#> 1 peak_shape_scan_example.scn 220 measurements,… 8 entries resistors   peak_sha…
-#> 2 background_scan_example.scn 525 measurements,… 8 entries resistors   backgrou…
-#> 3 full_scan_example.scn       799 measurements,… 8 entries resistors   full_sca…
-#> 4 time_scan_example.scn       5532 measurements… 8 entries resistors   time_sca…
+# export to R data archive +scan_files %>% iso_save("scan_files_export.scan.rds") +#> Info: exporting data from 4 iso_files into R Data Storage 'scan_files_export.scan.rds' + +# read back the exported R data storage +iso_read_scan("scan_files_export.scan.rds") +#> Info: preparing to read 1 data files (all will be cached)... +#> Info: reading file 'scan_files_export.scan.rds' with '.scan.rds' reader... +#> Info: loaded 4 data files from R Data Storage +#> Info: finished reading 1 files in 0.17 secs +#> Warning: file creation date could not be accessed for all files because +#> this information is not available on some Linux systems, reporting +#> last modified time for file_datetime instead. To turn these warnings +#> off, call iso_turn_datetime_warnings_off() and reread these files with +#> iso_reread_all_files(). +#> Warning: encountered 4 problems. +#> # | FILE | PROBLEM | OCCURRED IN ... +#> 1 | peak_shape_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 2 | background_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 3 | full_scan_example.scn | warning | extract_os_file_creation_datetime... +#> 4 | time_scan_example.scn | warning | extract_os_file_creation_datetime... +#> Use iso_get_problems(...) for more details. +#> Data from 4 scan iso files: +#> # A tibble: 4 × 5 +#> file_id raw_data file_…¹ metho…² file_…³ +#> <chr> <glue> <chr> <chr> <chr> +#> 1 peak_shape_scan_example.scn 220 measurements, 3 ions … 8 entr… resist… peak_s… +#> 2 background_scan_example.scn 525 measurements, 7 ions … 8 entr… resist… backgr… +#> 3 full_scan_example.scn 799 measurements, 3 chann… 8 entr… resist… full_s… +#> 4 time_scan_example.scn 5532 measurements, 2 ions… 8 entr… resist… time_s… +#> # … with abbreviated variable names ¹​file_info, ²​method_info, ³​file_path +#> +#> Problem summary: +#> # A tibble: 4 × 3 +#> file_id warning error +#> <chr> <int> <int> +#> 1 background_scan_example.scn 1 0 +#> 2 full_scan_example.scn 1 0 +#> 3 peak_shape_scan_example.scn 1 0 +#> 4 time_scan_example.scn 1 0

Data Export

-

At the moment, isoreader supports export of all data to Excel and the Feather file format (a Python/R cross-over format). Note that both export methods have similar syntax and append the appropriate file extension for each type of export file (.scan.xlsx and .scan.feather, respectively).

+

At the moment, isoreader supports export of all data to Excel and the +Feather file format +(a Python/R cross-over format). Note that both export methods have +similar syntax and append the appropriate file extension for each type +of export file (.scan.xlsx and .scan.feather, +respectively).

-# export to excel
-scan_files %>% iso_export_to_excel("scan_files_export")
-
-# data sheets available in the exported data file:
-readxl::excel_sheets("scan_files_export.scan.xlsx")
+# export to excel +scan_files %>% iso_export_to_excel("scan_files_export") + +# data sheets available in the exported data file: +readxl::excel_sheets("scan_files_export.scan.xlsx")
-# export to feather
-scan_files %>% iso_export_to_feather("scan_files_export")
-
-# exported feather files
-list.files(pattern = ".scan.feather")
+# export to feather +scan_files %>% iso_export_to_feather("scan_files_export") + +# exported feather files +list.files(pattern = ".scan.feather") @@ -1089,7 +1241,7 @@

Data Export

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/authors.html b/authors.html index 9268603..254f37e 100644 --- a/authors.html +++ b/authors.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -104,16 +104,15 @@

Citation

-

Kopf S, Davidheiser-Kroll B, Kocken I (2022). +

Kopf S, Davidheiser-Kroll B, Kocken I (2023). isoreader: Read Stable Isotope Data Files. -R package version 1.3.3, https://github.com/isoverse/isoreader. +http://isoreader.isoverse.org, https://github.com/isoverse/isoreader.

@Manual{,
   title = {isoreader: Read Stable Isotope Data Files},
   author = {Sebastian Kopf and Brett Davidheiser-Kroll and Ilja Kocken},
-  year = {2022},
-  note = {R package version 1.3.3},
-  url = {https://github.com/isoverse/isoreader},
+  year = {2023},
+  note = {http://isoreader.isoverse.org, https://github.com/isoverse/isoreader},
 }
@@ -127,7 +126,7 @@

Citation

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/index.html b/index.html index a1a561c..48c9f10 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -106,64 +106,70 @@
- +

CRAN_Status_Badge Documentation R build status Binder Binder

About

This package is intended as a unified one-stop command line interface to all common IRMS (isotope ratio mass spectrometry) file formats used in stable isotope geochemistry. It is an extension and highly stream-lined re-implementation of the proof-of-concept isoread package and is designed to fit into a larger framework of IRMS data tools that includes the web-based graphical user interface package isoviewer and the data processing and visualization pipeline isoprocessor.

-

isoreader enables the reading and processing of stable isotope data directly from the data files and thus provides a tool for platform-independent (Windows, Mac, Linux), efficient and reproducible data reduction. Although implemented in R, it can be used in both RMarkdown as well as Jupyter data processing notebooks and also provides functionality for easy export to Python using the shared R/Python feather file format. At present, it can read most Thermo dual inlet (.did, .caf) and continuous flow (.dxf, .cf) data files as well as Elementar continuous flow data archives (.iarc) with additional extensions for other file formats in the works. Due to the dynamic implementation and design based on the popular tidyverse style of R programming, isoreader is easily extendable, takes care of error catching to avoid pipeline breaks due to problems encountered in source data files (modeled after readr) and works great with tidyverse packages such as tidyr, dplyr and ggplot.

+

isoreader enables the reading and processing of stable isotope data directly from the data files and thus provides a tool for platform-independent (Windows, Mac, Linux), efficient and reproducible data reduction. Although implemented in R, it can be used in both RMarkdown as well as Jupyter data processing notebooks and also provides functionality for easy export to Python using the shared R/Python feather file format. At present, it can read most Thermo dual inlet (.did, .caf) and continuous flow (.dxf, .cf) data files as well as Elementar continuous flow data archives (.iarc) with additional extensions for other file formats in the works. Due to the dynamic implementation and design based on the popular tidyverse style of R programming, isoreader is easily extendable, takes care of error catching to avoid pipeline breaks due to problems encountered in source data files (modeled after readr) and works great with tidyverse packages such as tidyr, dplyr and ggplot.

Installation

You can install the latest release of isoreader from CRAN:

-# Note: isoreader is temporarily not available on CRAN because of a missing dependency, please install directly from GitHub using the commands below
-# install.packages("isoreader")
-if(!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")
-devtools::install_github("isoverse/isoreader")
+# Note: isoreader is temporarily not available on CRAN because of a missing dependency, please install directly from GitHub using the commands below +# install.packages("isoreader") +if(!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools") +devtools::install_github("isoverse/isoreader")

Some isoreader features including Excel and feather export depend on optional packages that are not required for the core functionality of isoreader. To use this functionality, please install the following packages manually if not already installed (isoreader will throw an informative warning if they are needed but missing):

-# optional extensions
-install.packages(c("feather", "openxlsx", "xml2", "BiocManager"))
-BiocManager::install("rhdf5")
+# optional extensions +install.packages(c("feather", "openxlsx", "xml2", "BiocManager")) +BiocManager::install("rhdf5")

To install the current development version of isoreader directly from GitHub, please use the devtools package:

-# installs the development tools package if not yet installed
-if(!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")
-devtools::install_github("isoverse/isoreader")
+# installs the development tools package if not yet installed +if(!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools") +devtools::install_github("isoverse/isoreader")

Troubleshooting note: depending on your workspace and operating system, you may have to re-start your R session or manually install some dependencies. For example, the digest package sometimes causes trouble - re-install with remove.packages("digest"); install.packages("digest").

Show me some code

-

You can, for example, automatically read the data from all supported scan files in a directory (and all its subdirectories) simply by providing the path to the folder. The following code demonstrates this with the example data files bundled with the isoreader package. For a more detailed example including continuous flow and dual inlet file reads, check out our Quick Start Vignette.

+

You can, for example, automatically read the data from all supported scan files in a directory (and all its subdirectories) simply by providing the path to the folder. The following code demonstrates this with the example data files bundled with the isoreader package. For a more detailed example including continuous flow and dual inlet file reads, check out our Quick Start Vignette.

-library(isoreader)
-data_folder <- iso_get_reader_examples_folder()
-iso_files <- iso_read_scan(data_folder)
-#> Info: preparing to read 4 data files...
-#> Info: reading file 'background_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'full_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader...
-#> Info: reading file 'time_scan_example.scn' with '.scn' reader...
-#> Info: finished reading 4 files in 0.82 secs
-
-iso_files
-#> Data from 4 scan iso files: 
-#> # A tibble: 4 × 5
-#>   file_id                     raw_data        file_info method_info file_path   
-#>   <chr>                       <glue>          <chr>     <chr>       <chr>       
-#> 1 background_scan_example.scn 525 measuremen… 8 entries resistors   background_…
-#> 2 full_scan_example.scn       799 measuremen… 8 entries resistors   full_scan_e…
-#> 3 peak_shape_scan_example.scn 220 measuremen… 8 entries resistors   peak_shape_…
-#> 4 time_scan_example.scn       5532 measureme… 8 entries resistors   time_scan_e…
+library(isoreader) +data_folder <- iso_get_reader_examples_folder() +iso_files <- iso_read_scan(data_folder) +#> Info: preparing to read 4 data files... +#> Info: reading file 'background_scan_example.scn' with '.scn' reader... +#> Info: reading file 'full_scan_example.scn' with '.scn' reader... +#> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader... +#> Info: reading file 'time_scan_example.scn' with '.scn' reader... +#> Info: finished reading 4 files in 2.40 secs + +iso_files +#> Data from 4 scan iso files: +#> # A tibble: 4 × 5 +#> file_id raw_data file_info method_info file_path +#> <chr> <glue> <chr> <chr> <chr> +#> 1 background_scan_example.scn 525 measurements,… 8 entries resistors backgrou… +#> 2 full_scan_example.scn 799 measurements,… 8 entries resistors full_sca… +#> 3 peak_shape_scan_example.scn 220 measurements,… 8 entries resistors peak_sha… +#> 4 time_scan_example.scn 5532 measurements… 8 entries resistors time_sca…

Supported File Types

Currently supported file types:

file_id Scan Type
++++++ @@ -238,16 +244,16 @@

Supported File TypesDocumentation

@@ -259,12 +265,12 @@

Troubleshooting

Development

-

If you are interested in helping with development, that’s fantastic! Please fork the repository and branch off from the dev branch since it contains the most up-to-date development version of isoreader. Make sure to write testthat tests for your work (stored in the tests/testthat directory). All tests can be run automatically and continuously during development to make it easier to spot any code problems on the go. The easiest way to run them is by running make auto_test in the isoreader directory from command line (it will test everything automatically in a completely separate R session).

+

If you are interested in helping with development, that’s fantastic! Please fork the repository and branch off from the dev branch since it contains the most up-to-date development version of isoreader. Make sure to write testthat tests for your work (stored in the tests/testthat directory). All tests can be run automatically and continuously during development to make it easier to spot any code problems on the go. The easiest way to run them is by running make auto_test in the isoreader directory from command line (it will test everything automatically in a completely separate R session).

Open Source

-

isoreader is and will always be fully open-source (i.e. free as in freedom and free as in free beer) and is provided as is. The source code is released under GPL-2.

+

isoreader is and will always be fully open-source (i.e. free as in freedom and free as in free beer) and is provided as is. The source code is released under GPL-2.

isoverse @@ -309,16 +315,7 @@

Developers

-
-

Dev status

-
    -
  • CRAN_Status_Badge
  • -
  • Documentation
  • -
  • R build status
  • -
  • Binder
  • -
  • Binder
  • -
-
+ @@ -331,7 +328,7 @@

Dev status

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/news/index.html b/news/index.html index 4d0437c..a9375b5 100644 --- a/news/index.html +++ b/news/index.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -92,7 +92,8 @@

Major changes

Bug fixes

-
  • dependency on pandoc removed
+
@@ -141,7 +142,7 @@
Exporting information
-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/paper.html b/paper.html index f0855bb..c79fce6 100644 --- a/paper.html +++ b/paper.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -82,7 +82,10 @@

Summary

-

The measurement and interpretation of the stable isotope composition of any material or molecule has widespread application in disciplines ranging from the earth sciences to ecology, anthropology, and forensics. The naturally occurring differences in the abundance of the stable isotopes of carbon, nitrogen, oxygen, and many other elements provide valuable insight into environmental conditions and sources, fluxes, and mechanisms of material transfer. Because isotopic variations in nature are very small, the measurement itself requires cutting edge analytical instrumentation using isotope ratio mass spectrometry (IRMS) as well as rigorous data reduction procedures for calibration and quality control. The isoreader package implements an easily extendable interface for IRMS data from common instrument vendor file formats and thus enables the reading and processing of stable isotope data directly from the source. This provides a foundational tool for platform-independent, efficient and reproducible data reduction.

+
+ +

The measurement and interpretation of the stable isotope composition of any material or molecule has widespread application in disciplines ranging from the earth sciences to ecology, anthropology, and forensics. The naturally occurring differences in the abundance of the stable isotopes of carbon, nitrogen, oxygen, and many other elements provide valuable insight into environmental conditions and sources, fluxes, and mechanisms of material transfer. Because isotopic variations in nature are very small, the measurement itself requires cutting edge analytical instrumentation using isotope ratio mass spectrometry (IRMS) as well as rigorous data reduction procedures for calibration and quality control. The isoreader package implements an easily extendable interface for IRMS data from common instrument vendor file formats and thus enables the reading and processing of stable isotope data directly from the source. This provides a foundational tool for platform-independent, efficient and reproducible data reduction.

+

Statement of need

Reproducible data processing is a key prerequisite for efficient data exchange, methodological progress, and productive discourse in scientific research. However, generating a record of every step of a data processing pipeline in a format that is transparent and easy to understand is not an easy task. In the world of stable isotopes, many data processing steps require proprietary software for data access and depend on point-and-click interactions. This makes it challenging to share and discuss one’s approach, review others’ and compare calculations and datasets across laboratories. Moreover, it severely restricts opportunities for iteration, exchange of ideas, and data aggregation.

@@ -92,7 +95,9 @@

Statement of needAcknowledgements

We thank Max Lloyd for his valuable contributions to parsing dual inlet file formats. We thank Seth Newsome and the executive committee of the IsoBank initiative for organizing a workshop that helped improve this software. We also thank all the laboratories that shared test files including the Bender, Bergmann, Bradley, Eiler, Kim, Ono, Pearson, Sessions, Sigman, and Snell Labs (all in the USA), and the Ziegler Lab (in the Netherlands), as well as the Stable Isotope Facilities at the University of California Davis (USA), University of Colorado (USA), University of New Brunswick (Canada), University of New Mexico (USA), University of Ottawa (Canada), University of Utah (USA), University of Washington (USA), University of Wyoming (USA), and the United States Geological Survey (USA). Lastly, we thank the members of the stable isotope community on the ISOGEOCHEM listserv for their contributions and bug reports that improved this software. This project was supported, in part, by grants to SHK from the U.S. National Science Foundation (EAR 1928303) and the University of Colorado Boulder.

-

References

+
+

References

+
@@ -110,7 +115,7 @@

Acknowledgements
-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/pkgdown.yml b/pkgdown.yml index 61d9c77..d71bc0f 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,5 +1,5 @@ -pandoc: 2.7.3 -pkgdown: 2.0.3 +pandoc: 2.19.2 +pkgdown: 2.0.7 pkgdown_sha: ~ articles: continuous_flow: continuous_flow.html @@ -8,8 +8,8 @@ articles: operations: operations.html quick_start: quick_start.html scan: scan.html -last_built: 2022-04-25T20:15Z +last_built: 2023-01-07T08:51Z urls: - reference: https://isoreader.isoverse.org/reference - article: https://isoreader.isoverse.org/articles + reference: http://isoreader.isoverse.org/reference + article: http://isoreader.isoverse.org/articles diff --git a/reference/extract_data.html b/reference/extract_data.html index b10138b..61d520a 100644 --- a/reference/extract_data.html +++ b/reference/extract_data.html @@ -24,7 +24,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -123,7 +123,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/extract_substring.html b/reference/extract_substring.html index dee67b3..637bc86 100644 --- a/reference/extract_substring.html +++ b/reference/extract_substring.html @@ -24,7 +24,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -90,32 +90,43 @@

Extract a substring from text

-
extract_substring(
-  string,
-  pattern,
-  capture_n = 1,
-  capture_bracket = 0,
-  missing = NA_character_
-)
+
extract_substring(
+  string,
+  pattern,
+  capture_n = 1,
+  capture_bracket = 0,
+  missing = NA_character_
+)

Arguments

string

string to extract

+ +
pattern

regular expression pattern to search for

+ +
capture_n

within each string, which match of the pattern should be extracted? e.g. if the pattern searches for words, should the first, second or third word be captured?

+ +
capture_bracket

for the captured match, which capture group should be extracted? i.e. which parentheses-enclosed segment of the pattern? by default captures the whole pattern (capture_bracket = 0).

+ +
missing

what to replace missing values with? Note that values can be missing because there are not enough captured matches or because the actual capture_bracket is empty.

+

Value

-

character vector of same length as string with the extracted substrings

+ + +

character vector of same length as string with the extracted substrings

See also

@@ -136,7 +147,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/extract_word.html b/reference/extract_word.html index f6da716..bd95b89 100644 --- a/reference/extract_word.html +++ b/reference/extract_word.html @@ -24,7 +24,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -90,36 +90,51 @@

Extract words from text

-
extract_word(
-  string,
-  capture_n = 1,
-  include_numbers = TRUE,
-  include_underscore = FALSE,
-  include_dash = FALSE,
-  include_space = FALSE,
-  include_colon = FALSE,
-  missing = NA_character_
-)
+
extract_word(
+  string,
+  capture_n = 1,
+  include_numbers = TRUE,
+  include_underscore = FALSE,
+  include_dash = FALSE,
+  include_space = FALSE,
+  include_colon = FALSE,
+  missing = NA_character_
+)

Arguments

string

string to extract

+ +
capture_n

which word to extract? 1st, 2nd, 3rd?

+ +
include_numbers

whether to include numbers (0-9) as part of the word (if FALSE, numbers will work as a word separator)

+ +
include_underscore

whether to include the underscore character (_) as part of a word (if FALSE, it will work as a word separator)

+ +
include_dash

whether to include the dash character (-) as part of a word (if FALSE, it will work as a word separator)

+ +
include_space

whether to include the space character ( ) as part of a word (if FALSE, it will work as a word separator)

+ +
include_colon

whether to include the colon character (.) as part of a word (if FALSE, it will work as a word separator)

+ +
missing

what to replace missing values with? Note that values can be missing because there are not enough captured matches or because the actual capture_bracket is empty.

+

See also

@@ -130,11 +145,11 @@

See also

Examples

-
x_text <- extract_word(c("sample number16.2", "sample number7b"),
-                       capture_n = 2, include_colon = TRUE)
-# "number16.2" "number7b"
-x_num <- parse_number(x_text)
-# 16.2 7.0
+    
x_text <- extract_word(c("sample number16.2", "sample number7b"),
+                       capture_n = 2, include_colon = TRUE)
+# "number16.2" "number7b"
+x_num <- parse_number(x_text)
+# 16.2 7.0
 
@@ -149,7 +164,7 @@

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/file_readers.html b/reference/file_readers.html index 90555bb..8695c91 100644 --- a/reference/file_readers.html +++ b/reference/file_readers.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,58 +88,73 @@

Register file readers

-
iso_register_dual_inlet_file_reader(
-  extension,
-  func,
-  description = NA_character_,
-  software = NA_character_,
-  cacheable = TRUE,
-  post_read_check = TRUE,
-  overwrite = FALSE,
-  env = find_func(func)
-)
-
-iso_register_continuous_flow_file_reader(
-  extension,
-  func,
-  description = NA_character_,
-  software = NA_character_,
-  cacheable = TRUE,
-  post_read_check = TRUE,
-  overwrite = FALSE,
-  env = find_func(func)
-)
-
-iso_register_scan_file_reader(
-  extension,
-  func,
-  description = NA_character_,
-  software = NA_character_,
-  cacheable = TRUE,
-  post_read_check = TRUE,
-  overwrite = FALSE,
-  env = find_func(func)
-)
+
iso_register_dual_inlet_file_reader(
+  extension,
+  func,
+  description = NA_character_,
+  software = NA_character_,
+  cacheable = TRUE,
+  post_read_check = TRUE,
+  overwrite = FALSE,
+  env = find_func(func)
+)
+
+iso_register_continuous_flow_file_reader(
+  extension,
+  func,
+  description = NA_character_,
+  software = NA_character_,
+  cacheable = TRUE,
+  post_read_check = TRUE,
+  overwrite = FALSE,
+  env = find_func(func)
+)
+
+iso_register_scan_file_reader(
+  extension,
+  func,
+  description = NA_character_,
+  software = NA_character_,
+  cacheable = TRUE,
+  post_read_check = TRUE,
+  overwrite = FALSE,
+  env = find_func(func)
+)

Arguments

extension

the file extension (e.g. .dxf) of the data file. Must be unique otherwise different files can not automatically be matched with the appropriate file reader based on their extension.

+ +
func

the name of the function that should be used a filter reader. All file reader functions must accept a data structure argument as the first argument and return the same data structure with added data.

+ +
description

what is this file type about?

+ +
software

what is the software program that creates this file type?

+ +
cacheable

whether this file type is cacheable. If TRUE (the default), user requests to cache the file will be honored. If FALSE, this file type will never be cached no matter what the user requests.

+ +
post_read_check

whether isoreader should conduct a data integrity check after reading the file. Should always be TRUE unless there is independent data integrity checking already taking place inside the reader.

+ +
overwrite

whether to overwrite an existing file reader for the same extension

+ +
env

the environment where to find the function, by default this will be determined automatically and will throw an error if there is any ambiguity (e.g. the same function name in multiple packages) in which case it should be set manually

+

Details

@@ -169,7 +184,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/index.html b/reference/index.html index bb765cb..f5360a1 100644 --- a/reference/index.html +++ b/reference/index.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -422,7 +422,7 @@

Moved to isoprocessor or deprecated
-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_add_file_info.html b/reference/iso_add_file_info.html index 75cccf3..fee9b61 100644 --- a/reference/iso_add_file_info.html +++ b/reference/iso_add_file_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,31 +88,42 @@

Add additional file information

-
# S3 method for iso_file_list
-iso_add_file_info(iso_files, new_file_info, ..., quiet = default(quiet))
-
-# S3 method for data.frame
-iso_add_file_info(df, new_file_info, ..., quiet = default(quiet))
-
-iso_add_file_info(...)
+
# S3 method for iso_file_list
+iso_add_file_info(iso_files, new_file_info, ..., quiet = default(quiet))
+
+# S3 method for data.frame
+iso_add_file_info(df, new_file_info, ..., quiet = default(quiet))
+
+iso_add_file_info(...)

Arguments

iso_files

collection of iso_file objects

+ +
new_file_info

data frame with new file information to add to the isofiles

+ +
...

each parameter specifies a set of join_by column(s) to add the new_file_info to the existing file information. The provided parameters are applied sequentially. At least one must be specified.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+ +
df

a data frame of iso files data retrieved by any of the data retrieval functions (e.g. iso_get_file_info, iso_get_raw_data, etc.

+

Value

-

the original iso files or data frame with the new file info added in.

+ + +

the original iso files or data frame with the new file info added in.

Details

@@ -142,7 +153,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_caching.html b/reference/iso_caching.html index 7630425..b011a54 100644 --- a/reference/iso_caching.html +++ b/reference/iso_caching.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,15 +88,16 @@

Turn caching on/off

-
iso_turn_reader_caching_on(data = NULL)
-
-iso_turn_reader_caching_off(data = NULL)
+
iso_turn_reader_caching_on(data = NULL)
+
+iso_turn_reader_caching_off(data = NULL)

Arguments

data

a data frame - returned invisibly as is if provided (e.g. in the middle of a pipeline)

+

See also

@@ -118,7 +119,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_calculate_ratios.html b/reference/iso_calculate_ratios.html index 9d28f4c..dbc1b81 100644 --- a/reference/iso_calculate_ratios.html +++ b/reference/iso_calculate_ratios.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

moved to isoprocessor

-
iso_calculate_ratios(...)
+
iso_calculate_ratios(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_cleanup_reader_cache.html b/reference/iso_cleanup_reader_cache.html index 9777d75..64e2047 100644 --- a/reference/iso_cleanup_reader_cache.html +++ b/reference/iso_cleanup_reader_cache.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

Cleanup cached files

-
iso_cleanup_reader_cache(all = FALSE)
+
iso_cleanup_reader_cache(all = FALSE)

Arguments

all

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_convert_signals.html b/reference/iso_convert_signals.html index db91991..0b72dfc 100644 --- a/reference/iso_convert_signals.html +++ b/reference/iso_convert_signals.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

moved to isoprocessor

-
iso_convert_signals(...)
+
iso_convert_signals(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_convert_time.html b/reference/iso_convert_time.html index 3d0af58..a5a039d 100644 --- a/reference/iso_convert_time.html +++ b/reference/iso_convert_time.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

moved to isoprocessor

-
iso_convert_time(...)
+
iso_convert_time(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_data_structure.html b/reference/iso_data_structure.html index 39ec913..96fa87e 100644 --- a/reference/iso_data_structure.html +++ b/reference/iso_data_structure.html @@ -29,7 +29,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -100,29 +100,34 @@

Isoreader data structure functions

-
iso_is_file(x)
-
-iso_is_file_list(x)
-
-iso_is_object(x)
-
-iso_is_dual_inlet(x)
-
-iso_is_continuous_flow(x)
-
-iso_is_scan(x)
-
-iso_as_file_list(..., discard_duplicates = TRUE)
+
iso_is_file(x)
+
+iso_is_file_list(x)
+
+iso_is_object(x)
+
+iso_is_dual_inlet(x)
+
+iso_is_continuous_flow(x)
+
+iso_is_scan(x)
+
+iso_as_file_list(..., discard_duplicates = TRUE)

Arguments

x

an object to test whether it has the specific class

+ +
...

iso_file and iso_file_list objects to concatenate

+ +
discard_duplicates

whether to automatically discard files with duplicate file IDs (i.e. duplicate file names). If TRUE (the default), only the first files are kept and any files with the same file ID are discarded. If FALSE, all duplicate files are kept but their file IDs are appended with suffix #1, #2, etc.

+
@@ -137,7 +142,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_debug_mode.html b/reference/iso_debug_mode.html index aa8c147..2dd8fc9 100644 --- a/reference/iso_debug_mode.html +++ b/reference/iso_debug_mode.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,25 +88,32 @@

Debugging functions

-
iso_turn_debug_on(data = NULL, catch_errors = TRUE, cache = FALSE)
-
-iso_turn_debug_off(data = NULL)
-
-set_read_file_event_expr(event_expr = NULL)
-
-set_finish_file_event_expr(event_expr = NULL)
+
iso_turn_debug_on(data = NULL, catch_errors = TRUE, cache = FALSE)
+
+iso_turn_debug_off(data = NULL)
+
+set_read_file_event_expr(event_expr = NULL)
+
+set_finish_file_event_expr(event_expr = NULL)

Arguments

data

a data frame - returned invisibly as is if provided (e.g. in the middle of a pipeline)

+ +
catch_errors

whether to still catch errors in debug mode or whether to throw them

+ +
cache

whether to cache or read anything from cache

+ +
event_expr

an expression to evaluate in the context of reading individual iso files (evaluated in the local environment at the beginning of a file read)

+
@@ -121,7 +128,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_expand_paths.html b/reference/iso_expand_paths.html index 17d116e..8c7c1c0 100644 --- a/reference/iso_expand_paths.html +++ b/reference/iso_expand_paths.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,21 +88,28 @@

Expand file paths

-
iso_expand_paths(path, extensions = c(), root = ".")
+
iso_expand_paths(path, extensions = c(), root = ".")

Arguments

path

vector of file/folder paths, mixed relative and absolute paths are allowed.

+ +
extensions

which extensions to look for? (with or without leading .) - this is typically one or more of the extensions listed by iso_get_supported_file_types

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+

Value

-

data frame with columns root (root as provided) and path of all the found files.

+ + +

data frame with columns root (root as provided) and path of all the found files.

See also

@@ -124,7 +131,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_export_to_excel.html b/reference/iso_export_to_excel.html index af03919..aedad8d 100644 --- a/reference/iso_export_to_excel.html +++ b/reference/iso_export_to_excel.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,52 +88,77 @@

Export data to Excel

-
iso_export_to_excel(
-  iso_files,
-  filepath,
-  include_file_info = everything(),
-  include_raw_data = everything(),
-  include_standards = !!enexpr(include_method_info),
-  include_resistors = !!enquo(include_method_info),
-  include_vendor_data_table = everything(),
-  include_problems = everything(),
-  with_explicit_units = FALSE,
-  include_method_info = everything(),
-  with_ratios = NULL,
-  quiet = default(quiet)
-)
+
iso_export_to_excel(
+  iso_files,
+  filepath,
+  include_file_info = everything(),
+  include_raw_data = everything(),
+  include_standards = !!enexpr(include_method_info),
+  include_resistors = !!enquo(include_method_info),
+  include_vendor_data_table = everything(),
+  include_problems = everything(),
+  with_explicit_units = FALSE,
+  include_method_info = everything(),
+  with_ratios = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
filepath

the path (folder and filename) to the export file. The correct file extension is automatically added if not already in the filename, i.e. filename can be provided with or without extension.

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
include_raw_data

which columns from the raw data to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set to NULL to include no raw data.

+ +
include_standards

which columns from the standards info to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. By default, everything is included (both standards and ratios). To omit the ratios, change to select = file_id:reference. Set to NULL to include no standards info.

+ +
include_resistors

which columns from the resistors info to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set to NULL to include no resistors info.

+ +
include_vendor_data_table

which columns from the vendor data table to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set parameter with_explicit_units = TRUE to make column units explicit (keep in mind that this will require specific include_vendor_data_table column selections to reflect the column names including the units). Set to NULL to include no vendor data table.

+ +
include_problems

which columns from problems to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes none of the read problems by default. Set to include_problems = everything() to include all columns.

+ +
with_explicit_units

whether to include units in the column headers of the returned data frame instead of the column data types (see iso_double_with_units). Note that any select conditions have to refer to the column names including the full units.

+ +
include_method_info

deprecated in favor of the more specific include_standards and include_resistors

+ +
with_ratios

deprecated, please use the select parameter to explicitly include or exclude ratio columns

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Value

-

returns the iso_files object invisibly for use in pipelines

+ + +

returns the iso_files object invisibly for use in pipelines

See also

@@ -154,7 +179,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_export_to_feather.html b/reference/iso_export_to_feather.html index 9651f56..4bcdd1c 100644 --- a/reference/iso_export_to_feather.html +++ b/reference/iso_export_to_feather.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,49 +88,72 @@

Export to feather

-
iso_export_to_feather(
-  iso_files,
-  filepath_prefix,
-  include_file_info = everything(),
-  include_raw_data = everything(),
-  include_standards = !!enexpr(include_method_info),
-  include_resistors = !!enquo(include_method_info),
-  include_vendor_data_table = everything(),
-  include_problems = everything(),
-  with_explicit_units = FALSE,
-  include_method_info = everything(),
-  quiet = default(quiet)
-)
+
iso_export_to_feather(
+  iso_files,
+  filepath_prefix,
+  include_file_info = everything(),
+  include_raw_data = everything(),
+  include_standards = !!enexpr(include_method_info),
+  include_resistors = !!enquo(include_method_info),
+  include_vendor_data_table = everything(),
+  include_problems = everything(),
+  with_explicit_units = FALSE,
+  include_method_info = everything(),
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
filepath_prefix

what to use as the prefix for the feather file names (e.g. name of the data collection or current date)

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
include_raw_data

which columns from the raw data to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set to NULL to include no raw data.

+ +
include_standards

which columns from the standards info to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. By default, everything is included (both standards and ratios). To omit the ratios, change to select = file_id:reference. Set to NULL to include no standards info.

+ +
include_resistors

which columns from the resistors info to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set to NULL to include no resistors info.

+ +
include_vendor_data_table

which columns from the vendor data table to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set parameter with_explicit_units = TRUE to make column units explicit (keep in mind that this will require specific include_vendor_data_table column selections to reflect the column names including the units). Set to NULL to include no vendor data table.

+ +
include_problems

which columns from problems to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes none of the read problems by default. Set to include_problems = everything() to include all columns.

+ +
with_explicit_units

whether to include units in the column headers of the returned data frame instead of the column data types (see iso_double_with_units). Note that any select conditions have to refer to the column names including the full units.

+ +
include_method_info

deprecated in favor of the more specific include_standards and include_resistors

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Value

-

returns the iso_files object invisibly for use in pipelines

+ + +

returns the iso_files object invisibly for use in pipelines

See also

@@ -151,7 +174,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_filter_files.html b/reference/iso_filter_files.html index 73a0333..9240849 100644 --- a/reference/iso_filter_files.html +++ b/reference/iso_filter_files.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,17 +88,22 @@

Filter iso_files

-
iso_filter_files(iso_files, ..., quiet = default(quiet))
+
iso_filter_files(iso_files, ..., quiet = default(quiet))

Arguments

iso_files

collection of iso_file objects

+ +
...

dplyr-style filter conditions applied based on each file's file_info (see iso_get_file_info)

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -123,7 +128,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_filter_files_with_problems.html b/reference/iso_filter_files_with_problems.html index ba61ae0..769f4f4 100644 --- a/reference/iso_filter_files_with_problems.html +++ b/reference/iso_filter_files_with_problems.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,24 +88,31 @@

Filter out problematic files

-
iso_filter_files_with_problems(
-  iso_files,
-  remove_files_with_errors = TRUE,
-  remove_files_with_warnings = FALSE,
-  quiet = default(quiet)
-)
+
iso_filter_files_with_problems(
+  iso_files,
+  remove_files_with_errors = TRUE,
+  remove_files_with_warnings = FALSE,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
remove_files_with_errors

whether to remove files with errors (default is TRUE)

+ +
remove_files_with_warnings

whether to remove files with warnings (default is FALSE)

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -128,7 +135,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_find_absolute_path_roots.html b/reference/iso_find_absolute_path_roots.html index 254ab9c..643059c 100644 --- a/reference/iso_find_absolute_path_roots.html +++ b/reference/iso_find_absolute_path_roots.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,21 +88,28 @@

Find roots for absolute paths

-
iso_find_absolute_path_roots(path, root = ".", check_existence = TRUE)
+
iso_find_absolute_path_roots(path, root = ".", check_existence = TRUE)

Arguments

path

vector of file/folder paths, mixed relative and absolute paths are allowed.

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
check_existence

whether to check for the existence of the paths

+

Value

-

a data frame with the root directories and paths relative to the root - order of input paths is preserved

+ + +

a data frame with the root directories and paths relative to the root - order of input paths is preserved

See also

@@ -124,7 +131,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_format.html b/reference/iso_format.html index a7501d0..b7381ec 100644 --- a/reference/iso_format.html +++ b/reference/iso_format.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,39 +88,50 @@

Format values

-
iso_format(
-  ...,
-  signif = 3,
-  format_names = "%s: ",
-  format_units = "%s",
-  replace_permil = TRUE,
-  sep = "\n"
-)
+
iso_format(
+  ...,
+  signif = 3,
+  format_names = "%s: ",
+  format_units = "%s",
+  replace_permil = TRUE,
+  sep = "\n"
+)

Arguments

...

variable names with data. Must have the same dimensions if multiple are supplied. Can be named to rename variable name output. Will include units in output for all iso_with_units.

+ +
signif

number of significant digits for numbered data

+ +
format_names

how to format the variable names, set to NULL to remove names

+ +
format_units

how to format the units from iso_double_with_units variables, set to NULL to omit units

+ +
replace_permil

whether to replace the term 'permil' with the permil symbol (\u2030)

+ +
sep

separator between variables if multiple are provided in ...

+

Examples

-
x <- iso_with_units(1:5, "V")
-y <- iso_with_units(1:5, "permil")
-iso_format(x, y)
+    
x <- iso_with_units(1:5, "V")
+y <- iso_with_units(1:5, "permil")
+iso_format(x, y)
 #> [1] "x: 1V\ny: 1‰" "x: 2V\ny: 2‰" "x: 3V\ny: 3‰" "x: 4V\ny: 4‰" "x: 5V\ny: 5‰"
-iso_format(amplitude = x, d13C = y)
+iso_format(amplitude = x, d13C = y)
 #> [1] "amplitude: 1V\nd13C: 1‰" "amplitude: 2V\nd13C: 2‰"
 #> [3] "amplitude: 3V\nd13C: 3‰" "amplitude: 4V\nd13C: 4‰"
 #> [5] "amplitude: 5V\nd13C: 5‰"
@@ -138,7 +149,7 @@ 

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_all_data.html b/reference/iso_get_all_data.html index 22b185c..482ff7b 100644 --- a/reference/iso_get_all_data.html +++ b/reference/iso_get_all_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0
@@ -88,52 +88,77 @@

Aggregate all isofiles data

-
iso_get_all_data(
-  iso_files,
-  include_file_info = everything(),
-  include_raw_data = everything(),
-  include_standards = everything(),
-  include_resistors = everything(),
-  include_vendor_data_table = everything(),
-  include_problems = NULL,
-  gather = FALSE,
-  with_explicit_units = with_units,
-  with_units = FALSE,
-  with_ratios = NULL,
-  quiet = default(quiet)
-)
+
iso_get_all_data(
+  iso_files,
+  include_file_info = everything(),
+  include_raw_data = everything(),
+  include_standards = everything(),
+  include_resistors = everything(),
+  include_vendor_data_table = everything(),
+  include_problems = NULL,
+  gather = FALSE,
+  with_explicit_units = with_units,
+  with_units = FALSE,
+  with_ratios = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
include_raw_data

which columns from the raw data to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set to NULL to include no raw data.

+ +
include_standards

which columns from the standards info to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. By default, everything is included (both standards and ratios). To omit the ratios, change to select = file_id:reference. Set to NULL to include no standards info.

+ +
include_resistors

which columns from the resistors info to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set to NULL to include no resistors info.

+ +
include_vendor_data_table

which columns from the vendor data table to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes all columns by default. Set parameter with_explicit_units = TRUE to make column units explicit (keep in mind that this will require specific include_vendor_data_table column selections to reflect the column names including the units). Set to NULL to include no vendor data table.

+ +
include_problems

which columns from problems to include. Use c(...) to select multiple columns, supports all select syntax including renaming columns. Includes none of the read problems by default. Set to include_problems = everything() to include all columns.

+ +
gather

whether to gather raw data into long format (e.g. for ease of use in plotting). Not that the select parameter applies to the data columns BEFORE gathering.

+ +
with_explicit_units

whether to include units in the column headers of the returned data frame instead of the column data types (see iso_double_with_units). Note that any select conditions have to refer to the column names including the full units.

+ +
with_units

this parameter has been DEPRECATED with the introduction of unit-data types (see iso_double_with_units) and will be removed in future versions of isoreader. Please use with_explicit_units instead if you really want columns to have units explicitly in the column name. Alternatively, consider working with the new implicit unit system and convert vendor data tables as needed with iso_make_units_explicit and iso_make_units_implicit.

+ +
with_ratios

deprecated, please use the select parameter to explicitly include or exclude ratio columns

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Value

-

data_frame with file_ids, file_types and nested data frames for each data type (file_info, raw_data, vendor_data_table, etc.)

+ + +

data_frame with file_ids, file_types and nested data frames for each data type (file_info, raw_data, vendor_data_table, etc.)

See also

@@ -158,7 +183,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_bgrd_data.html b/reference/iso_get_bgrd_data.html index f91fcfc..1e06762 100644 --- a/reference/iso_get_bgrd_data.html +++ b/reference/iso_get_bgrd_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,27 +88,36 @@

Aggregate background data

-
iso_get_bgrd_data(
-  iso_files,
-  select = everything(),
-  gather = FALSE,
-  include_file_info = NULL,
-  quiet = default(quiet)
-)
+
iso_get_bgrd_data(
+  iso_files,
+  select = everything(),
+  gather = FALSE,
+  include_file_info = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
select

which data columns to select - use c(...) to select multiple, supports all select syntax. By default, all columns are selected.

+ +
gather

whether to gather raw data into long format (e.g. for ease of use in plotting). Not that the select parameter applies to the data columns BEFORE gathering.

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -133,7 +142,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_data.html b/reference/iso_get_data.html index ad59753..5a6e439 100644 --- a/reference/iso_get_data.html +++ b/reference/iso_get_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

DEPRECATED

-
iso_get_data(...)
+
iso_get_data(...)

Arguments

...

forwarded to iso_get_all_data

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_data_summary.html b/reference/iso_get_data_summary.html index c47607e..e9c2e0f 100644 --- a/reference/iso_get_data_summary.html +++ b/reference/iso_get_data_summary.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,19 +88,26 @@

Get data summary

-
iso_get_data_summary(iso_files, quiet = default(quiet))
+
iso_get_data_summary(iso_files, quiet = default(quiet))

Arguments

iso_files

single iso file or collection of iso_file objects

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Value

-

a tibble that summarizes the data in the iso_files

+ + +

a tibble that summarizes the data in the iso_files

+ +
@@ -115,7 +122,7 @@

Value

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_default_reader_parameters.html b/reference/iso_get_default_reader_parameters.html index 36cab0e..e6f4385 100644 --- a/reference/iso_get_default_reader_parameters.html +++ b/reference/iso_get_default_reader_parameters.html @@ -25,7 +25,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -92,7 +92,7 @@

Get the current default parameters

-
iso_get_default_reader_parameters()
+
iso_get_default_reader_parameters()
@@ -115,7 +115,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_file_info.html b/reference/iso_get_file_info.html index dff8806..1fd8c92 100644 --- a/reference/iso_get_file_info.html +++ b/reference/iso_get_file_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,27 +88,36 @@

Aggregate file info

-
iso_get_file_info(
-  iso_files,
-  select = everything(),
-  file_specific = FALSE,
-  simplify = TRUE,
-  quiet = default(quiet)
-)
+
iso_get_file_info(
+  iso_files,
+  select = everything(),
+  file_specific = FALSE,
+  simplify = TRUE,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
select

which columns to select - use c(...) to select multiple, supports all select syntax including renaming columns. File id is always included and cannot be renamed.

+ +
file_specific

whether to run the select criteria (...) specifically within each individual file rather than on all files jointly. This is a lot slower but makes it possible to select different columns in different iso_files depending on what exists in each file and is mostly of use when working with data from multiple instruments.

+ +
simplify

if set to TRUE (the default), nested value columns in the file info will be unnested as long as they are compatible across file types. Note that file info entries with multiple values still remain nested multi-value (=list) columns even with simplify=TRUE. These can be unnested using unnest.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Note

@@ -137,7 +146,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_problems.html b/reference/iso_get_problems.html index 03f76b8..1bffc37 100644 --- a/reference/iso_get_problems.html +++ b/reference/iso_get_problems.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,15 +88,18 @@

Retrieve parsing problems

-
iso_get_problems(iso_files, select = everything())
+
iso_get_problems(iso_files, select = everything())

Arguments

iso_files

collection of iso_file objects

+ +
select

which data columns to select - use c(...) to select multiple, supports all select syntax. By default, all columns are selected.

+

See also

@@ -119,7 +122,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_problems_summary.html b/reference/iso_get_problems_summary.html index dc89e9f..5330abf 100644 --- a/reference/iso_get_problems_summary.html +++ b/reference/iso_get_problems_summary.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,25 +88,32 @@

Retrieve a summary of the problems

-
iso_get_problems_summary(
-  iso_files,
-  problem_files_only = TRUE,
-  include_file_info = NULL
-)
+
iso_get_problems_summary(
+  iso_files,
+  problem_files_only = TRUE,
+  include_file_info = NULL
+)

Arguments

iso_files

collection of iso_file objects

+ +
problem_files_only

whether to list only problem files or all files

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+

Value

-

data frame with file_id and number of encountered errors and warnings

+ + +

data frame with file_id and number of encountered errors and warnings

See also

@@ -129,7 +136,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_raw_data.html b/reference/iso_get_raw_data.html index 12d670c..c3dca99 100644 --- a/reference/iso_get_raw_data.html +++ b/reference/iso_get_raw_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,27 +88,36 @@

Aggregate raw data

-
iso_get_raw_data(
-  iso_files,
-  select = everything(),
-  gather = FALSE,
-  include_file_info = NULL,
-  quiet = default(quiet)
-)
+
iso_get_raw_data(
+  iso_files,
+  select = everything(),
+  gather = FALSE,
+  include_file_info = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
select

which data columns to select - use c(...) to select multiple, supports all select syntax. By default, all columns are selected.

+ +
gather

whether to gather raw data into long format (e.g. for ease of use in plotting). Not that the select parameter applies to the data columns BEFORE gathering.

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -140,7 +149,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_reader_example.html b/reference/iso_get_reader_example.html index 294287f..6fad4a4 100644 --- a/reference/iso_get_reader_example.html +++ b/reference/iso_get_reader_example.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,17 +88,18 @@

Example files

-
iso_get_reader_example(filename)
-
-iso_get_reader_examples()
-
-iso_get_reader_examples_folder()
+
iso_get_reader_example(filename)
+
+iso_get_reader_examples()
+
+iso_get_reader_examples_folder()

Arguments

filename

the name of the example file for which to retrieve the system path

+

Details

@@ -109,7 +110,7 @@

Details

Examples

-
iso_get_reader_examples()
+    
iso_get_reader_examples()
 #> # A tibble: 10 × 4
 #>    filename                     type            software description            
 #>    <chr>                        <chr>           <chr>    <chr>                  
@@ -123,8 +124,8 @@ 

Examples

#> 8 full_scan_example.scn scan Isodat Scan file format #> 9 peak_shape_scan_example.scn scan Isodat Scan file format #> 10 time_scan_example.scn scan Isodat Scan file format -iso_get_reader_examples_folder() -#> [1] "/Users/runner/work/_temp/Library/isoreader/extdata" +iso_get_reader_examples_folder() +#> [1] "/home/runner/work/_temp/Library/isoreader/extdata"
@@ -139,7 +140,7 @@

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_resistors.html b/reference/iso_get_resistors.html index e82ec50..f215763 100644 --- a/reference/iso_get_resistors.html +++ b/reference/iso_get_resistors.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,24 +88,31 @@

Aggregate resistors from methods info

-
iso_get_resistors(
-  iso_files,
-  select = everything(),
-  include_file_info = NULL,
-  quiet = default(quiet)
-)
+
iso_get_resistors(
+  iso_files,
+  select = everything(),
+  include_file_info = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
select

which data columns to select - use c(...) to select multiple, supports all select syntax. By default, all columns are selected.

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -130,7 +137,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_resistors_info.html b/reference/iso_get_resistors_info.html index dae1b77..3cd216c 100644 --- a/reference/iso_get_resistors_info.html +++ b/reference/iso_get_resistors_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

DEPRECATED

-
iso_get_resistors_info(...)
+
iso_get_resistors_info(...)

Arguments

...

forwarded to iso_get_resistors

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_standards.html b/reference/iso_get_standards.html index 7b67138..66616bb 100644 --- a/reference/iso_get_standards.html +++ b/reference/iso_get_standards.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,27 +88,36 @@

Aggregate standards from methods info

-
iso_get_standards(
-  iso_files,
-  select = everything(),
-  include_file_info = NULL,
-  with_ratios = NULL,
-  quiet = default(quiet)
-)
+
iso_get_standards(
+  iso_files,
+  select = everything(),
+  include_file_info = NULL,
+  with_ratios = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
select

which data columns to select - use c(...) to select multiple, supports all select syntax. By default, everything is included (both standards and ratios). To omit the ratios, change to select = file_id:reference.

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
with_ratios

deprecated, please use the select parameter to explicitly include or exclude ratio columns

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -133,7 +142,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_standards_info.html b/reference/iso_get_standards_info.html index 99e56be..60c98d9 100644 --- a/reference/iso_get_standards_info.html +++ b/reference/iso_get_standards_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

DEPRECATED

-
iso_get_standards_info(...)
+
iso_get_standards_info(...)

Arguments

...

forwarded to iso_get_standards

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_supported_file_types.html b/reference/iso_get_supported_file_types.html index 592b5b9..6a8c33d 100644 --- a/reference/iso_get_supported_file_types.html +++ b/reference/iso_get_supported_file_types.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,7 +88,7 @@

Supported file types

-
iso_get_supported_file_types()
+
iso_get_supported_file_types()
@@ -109,7 +109,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_units.html b/reference/iso_get_units.html index 007720b..b6efc93 100644 --- a/reference/iso_get_units.html +++ b/reference/iso_get_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

Retrieve number units

-
iso_get_units(x)
+
iso_get_units(x)

Arguments

x

variable to get the units for (vector or data frame)

+

See also

@@ -118,7 +119,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_get_vendor_data_table.html b/reference/iso_get_vendor_data_table.html index 4ad79cb..1b6c86e 100644 --- a/reference/iso_get_vendor_data_table.html +++ b/reference/iso_get_vendor_data_table.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,30 +88,41 @@

Aggregate vendor computed table data

-
iso_get_vendor_data_table(
-  iso_files,
-  with_units = FALSE,
-  select = everything(),
-  include_file_info = NULL,
-  with_explicit_units = with_units,
-  quiet = default(quiet)
-)
+
iso_get_vendor_data_table(
+  iso_files,
+  with_units = FALSE,
+  select = everything(),
+  include_file_info = NULL,
+  with_explicit_units = with_units,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
with_units

this parameter has been DEPRECATED with the introduction of unit-data types (see iso_double_with_units) and will be removed in future versions of isoreader. Please use with_explicit_units instead if you really want columns to have units explicitly in the column name. Alternatively, consider working with the new implicit unit system and convert vendor data tables as needed with iso_make_units_explicit and iso_make_units_implicit.

+ +
select

which data columns to select - use c(...) to select multiple, supports all select syntax. By default, all columns are selected.

+ +
include_file_info

which file information to include (see iso_get_file_info). Use c(...) to select multiple, supports all select syntax including renaming columns.

+ +
with_explicit_units

whether to include units in the column headers of the returned data frame instead of the column data types (see iso_double_with_units). Note that any select conditions have to refer to the column names including the full units.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -136,7 +147,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_has_problems.html b/reference/iso_has_problems.html index 81db5ea..1a6338c 100644 --- a/reference/iso_has_problems.html +++ b/reference/iso_has_problems.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,17 +88,20 @@

Check for parsing problems

-
iso_has_problems(iso_files)
+
iso_has_problems(iso_files)

Arguments

iso_files

collection of iso_file objects

+

Value

-

boolean

+ + +

boolean

See also

@@ -121,7 +124,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_info_messages.html b/reference/iso_info_messages.html index 9559ef3..04da32c 100644 --- a/reference/iso_info_messages.html +++ b/reference/iso_info_messages.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,19 +88,20 @@

Control information messages

-
iso_turn_info_messages_on(data = NULL)
-
-iso_turn_info_messages_off(data = NULL)
-
-iso_turn_datetime_warnings_on(data = NULL)
-
-iso_turn_datetime_warnings_off(data = NULL)
+
iso_turn_info_messages_on(data = NULL)
+
+iso_turn_info_messages_off(data = NULL)
+
+iso_turn_datetime_warnings_on(data = NULL)
+
+iso_turn_datetime_warnings_off(data = NULL)

Arguments

data

a data frame - returned invisibly as is if provided (e.g. in the middle of a pipeline)

+

Details

@@ -127,7 +128,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_is_double_with_units.html b/reference/iso_is_double_with_units.html index ed64fd6..cd73c68 100644 --- a/reference/iso_is_double_with_units.html +++ b/reference/iso_is_double_with_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

Check if a value has units

-
iso_is_double_with_units(x)
+
iso_is_double_with_units(x)

Arguments

x

vector to check for whether it is a double with units

+

See also

@@ -118,7 +119,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_make_units_explicit.html b/reference/iso_make_units_explicit.html index e5837bb..378435a 100644 --- a/reference/iso_make_units_explicit.html +++ b/reference/iso_make_units_explicit.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,17 +88,22 @@

Make units explicit

-
iso_make_units_explicit(df, prefix = " [", suffix = "]")
+
iso_make_units_explicit(df, prefix = " [", suffix = "]")

Arguments

df

the data frame in which to make the units explicit

+ +
prefix

the prefix for the units

+ +
suffix

the suffix for the units

+

See also

@@ -112,9 +117,9 @@

See also

Examples

-
# a data frame with implicit units
-df <- tibble(peak = 1:5, height = iso_double_with_units(1:5, "V"))
-df
+    
# a data frame with implicit units
+df <- tibble(peak = 1:5, height = iso_double_with_units(1:5, "V"))
+df
 #> # A tibble: 5 × 2
 #>    peak   height
 #>   <int> <dbl[V]>
@@ -123,9 +128,9 @@ 

Examples

#> 3 3 3 #> 4 4 4 #> 5 5 5 - -# show with explicit units -iso_make_units_explicit(df) + +# show with explicit units +iso_make_units_explicit(df) #> # A tibble: 5 × 2 #> peak `height [V]` #> <int> <dbl> @@ -134,9 +139,9 @@

Examples

#> 3 3 3 #> 4 4 4 #> 5 5 5 - -# show with explicit units (custom prefix & suffix) -iso_make_units_explicit(df, prefix = ".", suffix = "") + +# show with explicit units (custom prefix & suffix) +iso_make_units_explicit(df, prefix = ".", suffix = "") #> # A tibble: 5 × 2 #> peak height.V #> <int> <dbl> @@ -159,7 +164,7 @@

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_make_units_implicit.html b/reference/iso_make_units_implicit.html index 215646c..6d8b359 100644 --- a/reference/iso_make_units_implicit.html +++ b/reference/iso_make_units_implicit.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0
@@ -88,17 +88,22 @@

Make units implicit

-
iso_make_units_implicit(df, prefix = " [", suffix = "]")
+
iso_make_units_implicit(df, prefix = " [", suffix = "]")

Arguments

df

the data frame in which to make the units implicit/explicit

+ +
prefix

the prefix for the units

+ +
suffix

the suffix for the units

+

See also

@@ -112,9 +117,9 @@

See also

Examples

-
# generate implicit units
-df <- tibble(peak = 1:5, `height [V]` = 1:5)
-iso_make_units_implicit(df)
+    
# generate implicit units
+df <- tibble(peak = 1:5, `height [V]` = 1:5)
+iso_make_units_implicit(df)
 #> # A tibble: 5 × 2
 #>    peak   height
 #>   <int> <dbl[V]>
@@ -123,9 +128,9 @@ 

Examples

#> 3 3 3 #> 4 4 4 #> 5 5 5 - -# convert back and forth -iso_make_units_implicit(df) %>% iso_make_units_explicit() + +# convert back and forth +iso_make_units_implicit(df) %>% iso_make_units_explicit() #> # A tibble: 5 × 2 #> peak `height [V]` #> <int> <dbl> @@ -134,10 +139,10 @@

Examples

#> 3 3 3 #> 4 4 4 #> 5 5 5 - -# implicit units from custom prefix & suffix -df <- tibble(peak = 1:5, height.V = 1:5) -iso_make_units_implicit(df, prefix = ".", suffix = "") + +# implicit units from custom prefix & suffix +df <- tibble(peak = 1:5, height.V = 1:5) +iso_make_units_implicit(df, prefix = ".", suffix = "") #> # A tibble: 5 × 2 #> peak height #> <int> <dbl[V]> @@ -160,7 +165,7 @@

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_mutate_file_info.html b/reference/iso_mutate_file_info.html index 8773be9..a6fca9e 100644 --- a/reference/iso_mutate_file_info.html +++ b/reference/iso_mutate_file_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0
@@ -88,17 +88,22 @@

Mutate file info

-
iso_mutate_file_info(iso_files, ..., quiet = default(quiet))
+
iso_mutate_file_info(iso_files, ..., quiet = default(quiet))

Arguments

iso_files

collection of iso_file objects

+ +
...

dplyr-style mutate conditions applied to the combined file info (see iso_get_file_info)

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -123,7 +128,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_omit_files_with_problems.html b/reference/iso_omit_files_with_problems.html index bdba966..438e83f 100644 --- a/reference/iso_omit_files_with_problems.html +++ b/reference/iso_omit_files_with_problems.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

Renamed to iso_filter_files_with_problems

-
iso_omit_files_with_problems(...)
+
iso_omit_files_with_problems(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_parse_file_info.html b/reference/iso_parse_file_info.html index 88df7cd..b6b6d32 100644 --- a/reference/iso_parse_file_info.html +++ b/reference/iso_parse_file_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,36 +88,51 @@

Parse file info

-
iso_parse_file_info(
-  iso_files,
-  number = c(),
-  double = c(),
-  integer = c(),
-  logical = c(),
-  datetime = c(),
-  text = c(),
-  quiet = default(quiet)
-)
+
iso_parse_file_info(
+  iso_files,
+  number = c(),
+  double = c(),
+  integer = c(),
+  logical = c(),
+  datetime = c(),
+  text = c(),
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
number

dplyr-style select condition to choose columns that should be converted to a number using parse_number. Use c(...) to select multiple columns.

+ +
double

dplyr-style select condition to choose columns that should be converted to a double using parse_double. Use c(...) to select multiple columns.

+ +
integer

dplyr-style select condition to choose columns that should be converted to an integer using parse_integer. Use c(...) to select multiple columns.

+ +
logical

dplyr-style select condition to choose columns that should be converted to a boolean (TRUE/FALSE) using parse_logical. Use c(...) to select multiple columns.

+ +
datetime

dplyr-style select condition to choose columns that should be converted to a date-time using parse_datetime. Use c(...) to select multiple columns.

+ +
text

dplyr-style select condition to choose columns that should be converted to text using as.character. Use c(...) to select multiple columns.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -142,7 +157,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_plot_continuous_flow_data.html b/reference/iso_plot_continuous_flow_data.html index 5d8b3fb..6ed8dfe 100644 --- a/reference/iso_plot_continuous_flow_data.html +++ b/reference/iso_plot_continuous_flow_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

moved to isoprocessor

-
iso_plot_continuous_flow_data(...)
+
iso_plot_continuous_flow_data(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_plot_dual_inlet_data.html b/reference/iso_plot_dual_inlet_data.html index b83cfd9..d28df7d 100644 --- a/reference/iso_plot_dual_inlet_data.html +++ b/reference/iso_plot_dual_inlet_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

moved to isoprocessor

-
iso_plot_dual_inlet_data(...)
+
iso_plot_dual_inlet_data(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_plot_raw_data.html b/reference/iso_plot_raw_data.html index f0d08a4..3c9fefd 100644 --- a/reference/iso_plot_raw_data.html +++ b/reference/iso_plot_raw_data.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

moved to isoprocessor

-
iso_plot_raw_data(...)
+
iso_plot_raw_data(...)

Arguments

...

deprecated

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_printing.html b/reference/iso_printing.html index 851ef26..c71c68e 100644 --- a/reference/iso_printing.html +++ b/reference/iso_printing.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,30 +88,35 @@

Isofile printing

-
# S3 method for iso_file_list
-print(x, ...)
-
-# S3 method for iso_file
-print(x, ..., show_problems = TRUE)
-
-# S3 method for dual_inlet
-print(x, ..., show_problems = TRUE)
-
-# S3 method for continuous_flow
-print(x, ..., show_problems = TRUE)
-
-# S3 method for scan
-print(x, ..., show_problems = TRUE)
+
# S3 method for iso_file_list
+print(x, ...)
+
+# S3 method for iso_file
+print(x, ..., show_problems = TRUE)
+
+# S3 method for dual_inlet
+print(x, ..., show_problems = TRUE)
+
+# S3 method for continuous_flow
+print(x, ..., show_problems = TRUE)
+
+# S3 method for scan
+print(x, ..., show_problems = TRUE)

Arguments

x

Object to show.

+ +
...

additional parameters passed to print.default

+ +
show_problems

whether to show encountered problems

+
@@ -126,7 +131,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_problem_functions.html b/reference/iso_problem_functions.html index f7fe1a9..dd13dfc 100644 --- a/reference/iso_problem_functions.html +++ b/reference/iso_problem_functions.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -118,7 +118,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_read_continuous_flow.html b/reference/iso_read_continuous_flow.html index 70ca333..18063ce 100644 --- a/reference/iso_read_continuous_flow.html +++ b/reference/iso_read_continuous_flow.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,57 +88,86 @@

Load continuous flow data

-
iso_read_continuous_flow(
-  ...,
-  root = ".",
-  read_raw_data = default(read_raw_data),
-  read_file_info = default(read_file_info),
-  read_method_info = default(read_method_info),
-  read_vendor_data_table = default(read_vendor_data_table),
-  discard_duplicates = TRUE,
-  parallel = FALSE,
-  parallel_plan = future::multisession,
-  parallel_cores = future::availableCores(),
-  cache = default(cache),
-  read_cache = default(cache),
-  reread_outdated_cache = FALSE,
-  quiet = default(quiet),
-  cache_files_with_errors = TRUE
-)
+
iso_read_continuous_flow(
+  ...,
+  root = ".",
+  read_raw_data = default(read_raw_data),
+  read_file_info = default(read_file_info),
+  read_method_info = default(read_method_info),
+  read_vendor_data_table = default(read_vendor_data_table),
+  discard_duplicates = TRUE,
+  parallel = FALSE,
+  parallel_plan = future::multisession,
+  parallel_cores = future::availableCores(),
+  cache = default(cache),
+  read_cache = default(cache),
+  reread_outdated_cache = FALSE,
+  quiet = default(quiet),
+  cache_files_with_errors = TRUE
+)

Arguments

...

one or multiple file/folder paths. All files must have a supported file extension. All folders are expanded and searched for files with supported file extensions (which are then included in the read).

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
read_raw_data

whether to read the raw mass/ion data from the file

+ +
read_file_info

whether to read auxiliary file information (file id, sequence information, etc.)

+ +
read_method_info

whether to read methods information (standards, processing info)

+ +
read_vendor_data_table

whether to read the vendor computed data table

+ +
discard_duplicates

whether to automatically discard files with duplicate file IDs (i.e. duplicate file names). If TRUE (the default), only the first files are kept and any files with the same file ID are discarded. If FALSE, all duplicate files are kept but their file IDs are appended with suffix #1, #2, etc.

+ +
parallel

whether to process in parallel based on the number of available CPU cores. This may yield performance increases for files that are slow to parse such as continuous flow isodat files but usually provides little benefit for efficient data formats such as reading from R Data Archives.

+ +
parallel_plan

which parallel processing strategy to use, see plan, typically future::multisession for compatibility with RStudio interactive mode. If supported by the operating system and running in detached mode (not interactively in RStudio) can also use future::multicore.

+ +
parallel_cores
-

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+ +
cache

whether to cache iso_files. Note that R Data Storage files (.rds, see iso_save) are never cached since they are already essentially in cached form.

+ +
read_cache

whether to reload from cache if a cached version exists. Note that it will only read from cache if the raw data file has not been modified since. Files that have been modified on disc (e.g. edited in the vendor software) will always be read anew. To automatically reread cached files that were cached by an outdated version of the isoreader package, set the reread_outdated_cache flag.

+ +
reread_outdated_cache

whether to re-read outdated cache files whenever they are encountered.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+ +
cache_files_with_errors

deprecated. Please use iso_reread_problem_files instead to selectively re-read all files in a collection of iso files that had been previously read with errors or warnings.

+

See also

@@ -159,7 +188,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_read_dual_inlet.html b/reference/iso_read_dual_inlet.html index 8179282..cddf42e 100644 --- a/reference/iso_read_dual_inlet.html +++ b/reference/iso_read_dual_inlet.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,60 +88,91 @@

Load dual inlet data

-
iso_read_dual_inlet(
-  ...,
-  root = ".",
-  read_raw_data = default(read_raw_data),
-  read_file_info = default(read_file_info),
-  read_method_info = default(read_method_info),
-  read_vendor_data_table = default(read_vendor_data_table),
-  nu_masses = c(),
-  discard_duplicates = TRUE,
-  parallel = FALSE,
-  parallel_plan = future::multisession,
-  parallel_cores = future::availableCores(),
-  cache = default(cache),
-  read_cache = default(cache),
-  reread_outdated_cache = FALSE,
-  quiet = default(quiet),
-  cache_files_with_errors = TRUE
-)
+
iso_read_dual_inlet(
+  ...,
+  root = ".",
+  read_raw_data = default(read_raw_data),
+  read_file_info = default(read_file_info),
+  read_method_info = default(read_method_info),
+  read_vendor_data_table = default(read_vendor_data_table),
+  nu_masses = c(),
+  discard_duplicates = TRUE,
+  parallel = FALSE,
+  parallel_plan = future::multisession,
+  parallel_cores = future::availableCores(),
+  cache = default(cache),
+  read_cache = default(cache),
+  reread_outdated_cache = FALSE,
+  quiet = default(quiet),
+  cache_files_with_errors = TRUE
+)

Arguments

...

one or multiple file/folder paths. All files must have a supported file extension. All folders are expanded and searched for files with supported file extensions (which are then included in the read).

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
read_raw_data

whether to read the raw mass/ion data from the file

+ +
read_file_info

whether to read auxiliary file information (file id, sequence information, etc.)

+ +
read_method_info

whether to read methods information (standards, processing info)

+ +
read_vendor_data_table

whether to read the vendor computed data table

+ +
nu_masses

list of masses (e.g. c("46","45","44")) to map the collector channels (interpreted in order, i.e. the first channel will be linked to the first mass, the second channel to the second mass, etc.). This parameter is only used for reading Nu data files.

+ +
discard_duplicates

whether to automatically discard files with duplicate file IDs (i.e. duplicate file names). If TRUE (the default), only the first files are kept and any files with the same file ID are discarded. If FALSE, all duplicate files are kept but their file IDs are appended with suffix #1, #2, etc.

+ +
parallel

whether to process in parallel based on the number of available CPU cores. This may yield performance increases for files that are slow to parse such as continuous flow isodat files but usually provides little benefit for efficient data formats such as reading from R Data Archives.

+ +
parallel_plan

which parallel processing strategy to use, see plan, typically future::multisession for compatibility with RStudio interactive mode. If supported by the operating system and running in detached mode (not interactively in RStudio) can also use future::multicore.

+ +
parallel_cores
-

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+ +
cache

whether to cache iso_files. Note that R Data Storage files (.rds, see iso_save) are never cached since they are already essentially in cached form.

+ +
read_cache

whether to reload from cache if a cached version exists. Note that it will only read from cache if the raw data file has not been modified since. Files that have been modified on disc (e.g. edited in the vendor software) will always be read anew. To automatically reread cached files that were cached by an outdated version of the isoreader package, set the reread_outdated_cache flag.

+ +
reread_outdated_cache

whether to re-read outdated cache files whenever they are encountered.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+ +
cache_files_with_errors

deprecated. Please use iso_reread_problem_files instead to selectively re-read all files in a collection of iso files that had been previously read with errors or warnings.

+

See also

@@ -162,7 +193,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_read_files.html b/reference/iso_read_files.html index 8bc0dcc..82cd8af 100644 --- a/reference/iso_read_files.html +++ b/reference/iso_read_files.html @@ -25,7 +25,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -92,61 +92,92 @@

Core function to read isotope data files

-
iso_read_files(
-  paths,
-  root,
-  supported_extensions,
-  data_structure,
-  read_options = c(),
-  reader_options = list(),
-  discard_duplicates = TRUE,
-  cache_files_with_errors = TRUE,
-  parallel = FALSE,
-  parallel_plan = future::multisession,
-  parallel_cores = future::availableCores(),
-  cache = default(cache),
-  read_cache = default(cache),
-  reread_outdated_cache = FALSE,
-  quiet = default(quiet)
-)
+
iso_read_files(
+  paths,
+  root,
+  supported_extensions,
+  data_structure,
+  read_options = c(),
+  reader_options = list(),
+  discard_duplicates = TRUE,
+  cache_files_with_errors = TRUE,
+  parallel = FALSE,
+  parallel_plan = future::multisession,
+  parallel_cores = future::availableCores(),
+  cache = default(cache),
+  read_cache = default(cache),
+  reread_outdated_cache = FALSE,
+  quiet = default(quiet)
+)

Arguments

paths

one or multiple file/folder paths. All files must have a supported file extension. All folders are expanded and searched for files with supported file extensions (which are then included in the read). Paths can be absolute paths or relative to the provided file root (which is the current working directory by default). For absolute paths, a common root directory will be guessed using iso_find_absolute_path_roots. The root portion of paths will never be displayed in info messages.

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
supported_extensions

data frame with supported extensions and corresponding reader functions (columns 'extension', 'func', 'cacheable')

+ +
data_structure

the basic data structure for the type of iso_file

+ +
read_options

vector of read options to be stored in the data structure (e.g. c(read_vendor_data_table = FALSE)). The read_ prefix is optional.

+ +
reader_options

list of parameters to be passed on to the reader

+ +
discard_duplicates

whether to automatically discard files with duplicate file IDs (i.e. duplicate file names). If TRUE (the default), only the first files are kept and any files with the same file ID are discarded. If FALSE, all duplicate files are kept but their file IDs are appended with suffix #1, #2, etc.

+ +
cache_files_with_errors

deprecated. Please use iso_reread_problem_files instead to selectively re-read all files in a collection of iso files that had been previously read with errors or warnings.

+ +
parallel

whether to process in parallel based on the number of available CPU cores. This may yield performance increases for files that are slow to parse such as continuous flow isodat files but usually provides little benefit for efficient data formats such as reading from R Data Archives.

+ +
parallel_plan

which parallel processing strategy to use, see plan, typically future::multisession for compatibility with RStudio interactive mode. If supported by the operating system and running in detached mode (not interactively in RStudio) can also use future::multicore.

+ +
parallel_cores
-

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+ +
cache

whether to cache iso_files. Note that R Data Storage files (.rds, see iso_save) are never cached since they are already essentially in cached form.

+ +
read_cache

whether to reload from cache if a cached version exists. Note that it will only read from cache if the raw data file has not been modified since. Files that have been modified on disc (e.g. edited in the vendor software) will always be read anew. To automatically reread cached files that were cached by an outdated version of the isoreader package, set the reread_outdated_cache flag.

+ +
reread_outdated_cache

whether to re-read outdated cache files whenever they are encountered.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Value

-

single iso_file object (if single file) or list of iso_files (iso_file_list)

+ + +

single iso_file object (if single file) or list of iso_files (iso_file_list)

@@ -161,7 +192,7 @@

Value

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_read_scan.html b/reference/iso_read_scan.html index d3c0252..d811b44 100644 --- a/reference/iso_read_scan.html +++ b/reference/iso_read_scan.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,54 +88,81 @@

Load scan data

-
iso_read_scan(
-  ...,
-  root = ".",
-  read_raw_data = default(read_raw_data),
-  read_file_info = default(read_file_info),
-  read_method_info = default(read_method_info),
-  discard_duplicates = TRUE,
-  parallel = FALSE,
-  parallel_plan = future::multisession,
-  parallel_cores = future::availableCores(),
-  cache = default(cache),
-  read_cache = default(cache),
-  reread_outdated_cache = FALSE,
-  quiet = default(quiet),
-  cache_files_with_errors = TRUE
-)
+
iso_read_scan(
+  ...,
+  root = ".",
+  read_raw_data = default(read_raw_data),
+  read_file_info = default(read_file_info),
+  read_method_info = default(read_method_info),
+  discard_duplicates = TRUE,
+  parallel = FALSE,
+  parallel_plan = future::multisession,
+  parallel_cores = future::availableCores(),
+  cache = default(cache),
+  read_cache = default(cache),
+  reread_outdated_cache = FALSE,
+  quiet = default(quiet),
+  cache_files_with_errors = TRUE
+)

Arguments

...

one or multiple file/folder paths. All files must have a supported file extension. All folders are expanded and searched for files with supported file extensions (which are then included in the read).

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
read_raw_data

whether to read the raw mass/ion data from the file

+ +
read_file_info

whether to read auxiliary file information (file id, sequence information, etc.)

+ +
read_method_info

whether to read methods information (standards, processing info)

+ +
discard_duplicates

whether to automatically discard files with duplicate file IDs (i.e. duplicate file names). If TRUE (the default), only the first files are kept and any files with the same file ID are discarded. If FALSE, all duplicate files are kept but their file IDs are appended with suffix #1, #2, etc.

+ +
parallel

whether to process in parallel based on the number of available CPU cores. This may yield performance increases for files that are slow to parse such as continuous flow isodat files but usually provides little benefit for efficient data formats such as reading from R Data Archives.

+ +
parallel_plan

which parallel processing strategy to use, see plan, typically future::multisession for compatibility with RStudio interactive mode. If supported by the operating system and running in detached mode (not interactively in RStudio) can also use future::multicore.

+ +
parallel_cores
-

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+

how many processor cores to use for parallel processing. By default the maximum available number of cores (availableCores), which will allow maximal processing speed but may slow other programs running on your machine. Choose a smaller number if you want some processing resources to remain available for other processes. Will issue a warning if too many cores are requested and reset to the maximum available.

+ +
cache

whether to cache iso_files. Note that R Data Storage files (.rds, see iso_save) are never cached since they are already essentially in cached form.

+ +
read_cache

whether to reload from cache if a cached version exists. Note that it will only read from cache if the raw data file has not been modified since. Files that have been modified on disc (e.g. edited in the vendor software) will always be read anew. To automatically reread cached files that were cached by an outdated version of the isoreader package, set the reread_outdated_cache flag.

+ +
reread_outdated_cache

whether to re-read outdated cache files whenever they are encountered.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+ +
cache_files_with_errors

deprecated. Please use iso_reread_problem_files instead to selectively re-read all files in a collection of iso files that had been previously read with errors or warnings.

+

See also

@@ -156,7 +183,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_rename_file_info.html b/reference/iso_rename_file_info.html index f60f0d1..9c7f83e 100644 --- a/reference/iso_rename_file_info.html +++ b/reference/iso_rename_file_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,24 +88,31 @@

Rename file info columns

-
iso_rename_file_info(
-  iso_files,
-  ...,
-  file_specific = FALSE,
-  quiet = default(quiet)
-)
+
iso_rename_file_info(
+  iso_files,
+  ...,
+  file_specific = FALSE,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
...

dplyr-style rename conditions applied based on each file's file_info (see iso_get_file_info)

+ +
file_specific

whether to run the select criteria (...) specifically within each individual file rather than on all files jointly. This is a lot slower but makes it possible to select different columns in different iso_files depending on what exists in each file and is mostly of use when working with data from multiple instruments.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -130,7 +137,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_reread_files.html b/reference/iso_reread_files.html index 57e7475..8386ba3 100644 --- a/reference/iso_reread_files.html +++ b/reference/iso_reread_files.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,57 +88,68 @@

Re-read iso_files

-
iso_reread_files(iso_files, ...)
-
-iso_reread_all_files(
-  iso_files,
-  ...,
-  stop_if_missing = FALSE,
-  quiet = default(quiet)
-)
-
-iso_reread_changed_files(
-  iso_files,
-  ...,
-  stop_if_missing = FALSE,
-  quiet = default(quiet)
-)
-
-iso_reread_outdated_files(
-  iso_files,
-  ...,
-  stop_if_missing = FALSE,
-  quiet = default(quiet)
-)
-
-iso_reread_problem_files(
-  iso_files,
-  ...,
-  stop_if_missing = FALSE,
-  reread_files_with_errors = TRUE,
-  reread_files_with_warnings = FALSE,
-  quiet = default(quiet)
-)
-
-iso_reread_storage(...)
-
-iso_reread_archive(...)
+
iso_reread_files(iso_files, ...)
+
+iso_reread_all_files(
+  iso_files,
+  ...,
+  stop_if_missing = FALSE,
+  quiet = default(quiet)
+)
+
+iso_reread_changed_files(
+  iso_files,
+  ...,
+  stop_if_missing = FALSE,
+  quiet = default(quiet)
+)
+
+iso_reread_outdated_files(
+  iso_files,
+  ...,
+  stop_if_missing = FALSE,
+  quiet = default(quiet)
+)
+
+iso_reread_problem_files(
+  iso_files,
+  ...,
+  stop_if_missing = FALSE,
+  reread_files_with_errors = TRUE,
+  reread_files_with_warnings = FALSE,
+  quiet = default(quiet)
+)
+
+iso_reread_storage(...)
+
+iso_reread_archive(...)

Arguments

iso_files

collection of iso_files

+ +
...

additional read parameters that should be used for re-reading the iso_files, see iso_read_dual_inlet, iso_read_continuous_flow and iso_read_scan for details (except read_cache which is always set to FALSE to force re-reads).

+ +
stop_if_missing

whether to stop re-reading if any of the original data files are missing (if FALSE, will warn about the missing files adding a warning to them, but also re-read those that do exist)

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+ +
reread_files_with_errors

whether to re-read files that had read in with errors the last time (default TRUE)

+ +
reread_files_with_warnings

whether to re-read files that had read in with warnings the last time (default TRUE)

+

Details

@@ -153,38 +164,54 @@

Details

Examples

-
# example for re-reading a saved isofile collection
-iso_turn_reader_caching_off()
+    
# example for re-reading a saved isofile collection
+iso_turn_reader_caching_off()
 #> Info: caching turned off
-saved_files_path <- "saved_isofile.scan.rds"
-
-# create saved collection
-iso_get_reader_examples_folder() %>% 
- iso_read_scan() %>%
- iso_save(saved_files_path)
+saved_files_path <- "saved_isofile.scan.rds"
+
+# create saved collection
+iso_get_reader_examples_folder() %>% 
+ iso_read_scan() %>%
+ iso_save(saved_files_path)
 #> Info: preparing to read 4 data files...
 #> Info: reading file 'background_scan_example.scn' with '.scn' reader...
 #> Info: reading file 'full_scan_example.scn' with '.scn' reader...
 #> Info: reading file 'peak_shape_scan_example.scn' with '.scn' reader...
 #> Info: reading file 'time_scan_example.scn' with '.scn' reader...
-#> Info: finished reading 4 files in 2.94 secs
+#> Info: finished reading 4 files in 2.95 secs
+#> Warning: file creation date could not be accessed for all files because this information is not available on some Linux systems, reporting last modified time for file_datetime instead. To turn these warnings off, call iso_turn_datetime_warnings_off() and reread these files with iso_reread_all_files().
+#> Warning: encountered 4 problems.
+#> # | FILE                        | PROBLEM | OCCURRED IN                      ...
+#> 1 | background_scan_example.scn | warning | extract_os_file_creation_datetime...
+#> 2 | full_scan_example.scn       | warning | extract_os_file_creation_datetime...
+#> 3 | peak_shape_scan_example.scn | warning | extract_os_file_creation_datetime...
+#> 4 | time_scan_example.scn       | warning | extract_os_file_creation_datetime...
+#> Use iso_get_problems(...) for more details.
 #> Info: exporting data from 4 iso_files into R Data Storage 'saved_isofile.scan.rds'
- 
-# load collection
-iso_read_scan(saved_files_path) %>%
- # reread outdated files (alternatively "_all_" or "_changed_")
- iso_reread_outdated_files() %>%
- # re-save collection to its original location
- iso_save(saved_files_path)
+ 
+# load collection
+iso_read_scan(saved_files_path) %>%
+ # reread outdated files (alternatively "_all_" or "_changed_")
+ iso_reread_outdated_files() %>%
+ # re-save collection to its original location
+ iso_save(saved_files_path)
 #> Info: preparing to read 1 data files...
 #> Info: reading file 'saved_isofile.scan.rds' with '.scan.rds' reader...
 #> Info: loaded 4 data files from R Data Storage
-#> Info: finished reading 1 files in 0.16 secs
+#> Info: finished reading 1 files in 0.20 secs
+#> Warning: file creation date could not be accessed for all files because this information is not available on some Linux systems, reporting last modified time for file_datetime instead. To turn these warnings off, call iso_turn_datetime_warnings_off() and reread these files with iso_reread_all_files().
+#> Warning: encountered 4 problems.
+#> # | FILE                        | PROBLEM | OCCURRED IN                      ...
+#> 1 | background_scan_example.scn | warning | extract_os_file_creation_datetime...
+#> 2 | full_scan_example.scn       | warning | extract_os_file_creation_datetime...
+#> 3 | peak_shape_scan_example.scn | warning | extract_os_file_creation_datetime...
+#> 4 | time_scan_example.scn       | warning | extract_os_file_creation_datetime...
+#> Use iso_get_problems(...) for more details.
 #> Info: found 0 outdated data file(s), re-reading 0/4.
 #> Info: exporting data from 4 iso_files into R Data Storage 'saved_isofile.scan.rds'
-
-# cleanup
-unlink(saved_files_path)
+
+# cleanup
+unlink(saved_files_path)
 
@@ -199,7 +226,7 @@

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_root_paths.html b/reference/iso_root_paths.html index e0223d3..5dceadb 100644 --- a/reference/iso_root_paths.html +++ b/reference/iso_root_paths.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,21 +88,28 @@

Root paths

-
iso_root_paths(path, root = ".", check_existence = TRUE)
+
iso_root_paths(path, root = ".", check_existence = TRUE)

Arguments

path

vector of file/folder paths, mixed relative and absolute paths are allowed.

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
check_existence

whether to check for the existence of the paths

+

Value

-

a data frame with the root directories and paths relative to the root - order of input paths is preserved

+ + +

a data frame with the root directories and paths relative to the root - order of input paths is preserved

See also

@@ -124,7 +131,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_save.html b/reference/iso_save.html index 5e5ff64..6454169 100644 --- a/reference/iso_save.html +++ b/reference/iso_save.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,21 +88,28 @@

Save data to R Data Storage (.rds)

-
iso_save(iso_files, filepath, quiet = default(quiet))
+
iso_save(iso_files, filepath, quiet = default(quiet))

Arguments

iso_files

collection of iso_file objects

+ +
filepath

the path (folder and filename) to the export file. The correct file extension is automatically added if not already in the filename, i.e. filename can be provided with or without extension.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

Value

-

returns the iso_files object invisibly for use in pipelines

+ + +

returns the iso_files object invisibly for use in pipelines

See also

@@ -123,7 +130,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_select_file_info.html b/reference/iso_select_file_info.html index 7390a27..2292ead 100644 --- a/reference/iso_select_file_info.html +++ b/reference/iso_select_file_info.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,24 +88,31 @@

Select file info columns

-
iso_select_file_info(
-  iso_files,
-  ...,
-  file_specific = FALSE,
-  quiet = default(quiet)
-)
+
iso_select_file_info(
+  iso_files,
+  ...,
+  file_specific = FALSE,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
...

dplyr-style select conditions applied based on each file's file_info (see iso_get_file_info). Note that the file_id column will always be kept, no matter the selection criteria, and cannot be renamed to protect from unexpected behavior.

+ +
file_specific

whether to run the select criteria (...) specifically within each individual file rather than on all files jointly. This is a lot slower but makes it possible to select different columns in different iso_files depending on what exists in each file and is mostly of use when working with data from multiple instruments.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -130,7 +137,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_set_default_read_parameters.html b/reference/iso_set_default_read_parameters.html index 1bc8353..2c9ea8d 100644 --- a/reference/iso_set_default_read_parameters.html +++ b/reference/iso_set_default_read_parameters.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,30 +88,41 @@

Set default read options

-
iso_set_default_read_parameters(
-  data = NULL,
-  read_raw_data,
-  read_file_info,
-  read_method_info,
-  read_vendor_data_table,
-  quiet = default(quiet)
-)
+
iso_set_default_read_parameters(
+  data = NULL,
+  read_raw_data,
+  read_file_info,
+  read_method_info,
+  read_vendor_data_table,
+  quiet = default(quiet)
+)

Arguments

data

a data frame - returned invisibly as is if provided (e.g. in the middle of a pipeline)

+ +
read_raw_data

if provided, set as the default for `read_raw_data` parameters

+ +
read_file_info

if provided, set as the default for `read_file_info` parameters

+ +
read_method_info

if provided, set as the default for `read_method_info` parameters

+ +
read_vendor_data_table

if provided, set as the default for `read_vendor_data_table` parameters

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -133,7 +144,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_set_file_root.html b/reference/iso_set_file_root.html index cf45189..c5a0ce1 100644 --- a/reference/iso_set_file_root.html +++ b/reference/iso_set_file_root.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,24 +88,31 @@

Set iso file directory root

-
iso_set_file_root(
-  iso_files,
-  root = ".",
-  remove_embedded_root = NULL,
-  quiet = default(quiet)
-)
+
iso_set_file_root(
+  iso_files,
+  root = ".",
+  remove_embedded_root = NULL,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_file objects

+ +
root

new root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). Can be supplied as a vector of same length as the iso_files if the files have different roots. Use root = "." to set the root to the current working directory (the default).

+ +
remove_embedded_root

set this parameter to a root path that is embedded in the isofiles' file_path. Will warn about any paths that cannot be simplified by removing the specified remove_embedded_root.

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+

See also

@@ -130,7 +137,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_shorten_relative_paths.html b/reference/iso_shorten_relative_paths.html index dbea182..0d0b20e 100644 --- a/reference/iso_shorten_relative_paths.html +++ b/reference/iso_shorten_relative_paths.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,19 +88,24 @@

Shorten relative paths

-
iso_shorten_relative_paths(path, root = ".")
+
iso_shorten_relative_paths(path, root = ".")

Arguments

path

vector of file/folder paths, mixed relative and absolute paths are allowed.

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+

Value

-

a data frame with the root directories and paths relative to the root - order of input paths is preserved

+ + +

a data frame with the root directories and paths relative to the root - order of input paths is preserved

See also

@@ -112,22 +117,22 @@

See also

Examples

-
iso_shorten_relative_paths(file.path("A", "B", "C"), "A") # root = "A", path = B/C
+    
iso_shorten_relative_paths(file.path("A", "B", "C"), "A") # root = "A", path = B/C
 #> # A tibble: 1 × 2
 #>   root  path 
 #>   <chr> <chr>
 #> 1 A     B/C  
-iso_shorten_relative_paths(file.path("A", "B", "C"), file.path("A", "B")) # root = "A/B", path = "C"
+iso_shorten_relative_paths(file.path("A", "B", "C"), file.path("A", "B")) # root = "A/B", path = "C"
 #> # A tibble: 1 × 2
 #>   root  path 
 #>   <chr> <chr>
 #> 1 A/B   C    
-iso_shorten_relative_paths(file.path("A", "C", "D"), file.path("A", "B")) # root = "A", path = "C/D"
+iso_shorten_relative_paths(file.path("A", "C", "D"), file.path("A", "B")) # root = "A", path = "C/D"
 #> # A tibble: 1 × 2
 #>   root  path 
 #>   <chr> <chr>
 #> 1 A     C/D  
-iso_shorten_relative_paths(file.path("A", "B", "C"), "B") # root = ".", path stays "A/B/C"
+iso_shorten_relative_paths(file.path("A", "B", "C"), "B") # root = ".", path stays "A/B/C"
 #> # A tibble: 1 × 2
 #>   root  path 
 #>   <chr> <chr>
@@ -146,7 +151,7 @@ 

Examples

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_strip_units.html b/reference/iso_strip_units.html index 01a305b..16ed169 100644 --- a/reference/iso_strip_units.html +++ b/reference/iso_strip_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0
@@ -88,13 +88,14 @@

Strip units from variables

-
iso_strip_units(x)
+
iso_strip_units(x)

Arguments

x

variable to strip units from (vector or data frame)

+

See also

@@ -118,7 +119,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/iso_with_units.html b/reference/iso_with_units.html index 776c4ee..e2aa781 100644 --- a/reference/iso_with_units.html +++ b/reference/iso_with_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,17 +88,20 @@

Generate values with units

-
iso_with_units(x, units = "undefined units")
-
-iso_double_with_units(x = double(), units = "undefined units")
+
iso_with_units(x, units = "undefined units")
+
+iso_double_with_units(x = double(), units = "undefined units")

Arguments

x

the values (single value or vector)

+ +
units

the units for the value, by default "undefined units" but this parameter should always be supplied when working with real data that has units

+

Details

@@ -132,7 +135,7 @@

See also

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/isoread.html b/reference/isoread.html index b1fe0b9..b453aa6 100644 --- a/reference/isoread.html +++ b/reference/isoread.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,13 +88,14 @@

Read isotope data file

-
isoread(...)
+
isoread(...)

Arguments

...

original isoread parameters

+
@@ -109,7 +110,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/isoreader-package.html b/reference/isoreader-package.html index 6ae405b..72abae6 100644 --- a/reference/isoreader-package.html +++ b/reference/isoreader-package.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -90,7 +90,8 @@

isoreader: Read Stable Isotope Data Files

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/map_binary_structure.html b/reference/map_binary_structure.html index 0bebbd5..cfec7b6 100644 --- a/reference/map_binary_structure.html +++ b/reference/map_binary_structure.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,24 +88,31 @@

Map isodat file binary structure.

-
map_binary_structure(
-  bfile,
-  length = 100,
-  start = bfile$pos,
-  ctrl_blocks = get_ctrl_blocks_config()
-)
+
map_binary_structure(
+  bfile,
+  length = 100,
+  start = bfile$pos,
+  ctrl_blocks = get_ctrl_blocks_config()
+)

Arguments

bfile

the binary file, stored in each iso_file under $binary if (and only if) the file was read with iso_turn_debug_on activated before.

+ +
length

how many bytes to map

+ +
start

at which byte position to start mapping (index 1 based)

+ +
ctrl_blocks

named list of block patterns with size, regexp and [optional] replace function

+
@@ -120,7 +127,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/print.binary_structure_map.html b/reference/print.binary_structure_map.html index dc64095..2c2a7ff 100644 --- a/reference/print.binary_structure_map.html +++ b/reference/print.binary_structure_map.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,28 +88,37 @@

Print binary structure map

-
# S3 method for binary_structure_map
-print(
-  x,
-  ...,
-  data_as_raw = FALSE,
-  line_break_blocks = c("cblock", "stx", "etx"),
-  pos_info = TRUE
-)
+
# S3 method for binary_structure_map
+print(
+  x,
+  ...,
+  data_as_raw = FALSE,
+  line_break_blocks = c("cblock", "stx", "etx"),
+  pos_info = TRUE
+)

Arguments

x

object to show.

+ +
...

additional parameters passed to print.default

+ +
data_as_raw

whether to show data as raw

+ +
line_break_blocks

at which blocks to introduce a line break

+ +
pos_info

whether to include position information

+
@@ -124,7 +133,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/read_iso_file.html b/reference/read_iso_file.html index 421a2fa..52c28aa 100644 --- a/reference/read_iso_file.html +++ b/reference/read_iso_file.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,60 +88,81 @@

Read individual iso file

-
read_iso_file(
-  ds,
-  root,
-  path,
-  file_n,
-  files_n,
-  read_from_cache,
-  read_from_old_cache,
-  reread_outdated_cache,
-  write_to_cache,
-  cachepath,
-  old_cachepath,
-  post_read_check,
-  ext,
-  reader_fun,
-  reader_options,
-  reader_fun_env
-)
+
read_iso_file(
+  ds,
+  root,
+  path,
+  file_n,
+  files_n,
+  read_from_cache,
+  reread_outdated_cache,
+  write_to_cache,
+  cachepath,
+  post_read_check,
+  ext,
+  reader_fun,
+  reader_options,
+  reader_fun_env
+)

Arguments

ds

the basic data structure for the type of iso_file

+ +
root

root directory for the isofiles. Can be relative to the current working directory (e.g. "data") or an absolute path on the file system (e.g. "/Users/..." or "C:/Data/.."). The default is the current working directory ("."). Can be supplied as a vector of same length as the provided paths if the paths have different roots.

+ +
path

file path

+ +
file_n

number of processed file for info messages

+ +
files_n

total number of files for info messages

+ +
read_from_cache

whether to read from cache

-
read_from_old_cache
-

whether to read from old cache files (to be deprecated in isoreader 2.0)

+ +
reread_outdated_cache

whether to reread outdated cache files

+ +
write_to_cache

whether to write to cache

+ +
cachepath

path for the cache file

-
old_cachepath
-

path for the old cache files

+ +
post_read_check

whether to run data integrity checks after a file read

+ +
ext

file extension

+ +
reader_fun

file reader function

+ +
reader_options

list of parameters to be passed on to the reader

+ +
reader_fun_env

where to find the reader function

+
@@ -156,7 +177,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/reexports.html b/reference/reexports.html index f774883..9de82f2 100644 --- a/reference/reexports.html +++ b/reference/reexports.html @@ -50,7 +50,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -126,7 +126,7 @@

Objects exported from other packages

rlang
-

!!, !!!

+

!!, !!!

tibble
@@ -153,7 +153,7 @@

Objects exported from other packages

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/reread_iso_files.html b/reference/reread_iso_files.html index 8730b0e..64da240 100644 --- a/reference/reread_iso_files.html +++ b/reference/reread_iso_files.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,39 +88,56 @@

Re-read iso_files

-
reread_iso_files(
-  iso_files,
-  ...,
-  stop_if_missing = FALSE,
-  reread_only_changed_files = FALSE,
-  reread_only_outdated_files = FALSE,
-  reread_files_without_problems = TRUE,
-  reread_files_with_errors = TRUE,
-  reread_files_with_warnings = TRUE,
-  quiet = default(quiet)
-)
+
reread_iso_files(
+  iso_files,
+  ...,
+  stop_if_missing = FALSE,
+  reread_only_changed_files = FALSE,
+  reread_only_outdated_files = FALSE,
+  reread_files_without_problems = TRUE,
+  reread_files_with_errors = TRUE,
+  reread_files_with_warnings = TRUE,
+  quiet = default(quiet)
+)

Arguments

iso_files

collection of iso_files

+ +
...

additional read parameters that should be used for re-reading the iso_files, see iso_read_dual_inlet, iso_read_continuous_flow and iso_read_scan for details (except read_cache which is always set to FALSE to force re-reads).

+ +
stop_if_missing

whether to stop re-reading if any of the original data files are missing (if FALSE, will warn about the missing files adding a warning to them, but also re-read those that do exist)

+ +
reread_only_changed_files

whether to re-read only files that have since be changed on disc (i.e. have no valid cache file), default FALSE i.e. re-read ALL files

+ +
reread_only_outdated_files

whether to re-read only files that were read by an outdated version of isoreader (default FALSE, i.e. re-read ALL files)

+ +
reread_files_without_problems

whether to re-read files that had read in without problems the last time (default TRUE)

+ +
reread_files_with_errors

whether to re-read files that had read in with errors the last time (default TRUE)

+ +
reread_files_with_warnings

whether to re-read files that had read in with warnings the last time (default TRUE)

+ +
quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. Set parameter to overwrite global defaults for this function or set global defaults with calls to iso_turn_info_messages_on and iso_turn_info_messages_off

+
@@ -135,7 +152,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/set_temp.html b/reference/set_temp.html index 88b2cc9..c801fc5 100644 --- a/reference/set_temp.html +++ b/reference/set_temp.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,15 +88,18 @@

Set temporary option

-
set_temp(name, value)
+
set_temp(name, value)

Arguments

name

name of the temporary option

+ +
value

value of the temporary option

+
@@ -111,7 +114,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/vec_arith.iso_double_with_units.html b/reference/vec_arith.iso_double_with_units.html index de219f7..887bdf0 100644 --- a/reference/vec_arith.iso_double_with_units.html +++ b/reference/vec_arith.iso_double_with_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,22 +88,24 @@

vec_arith for iso_double_with_units

-
# S3 method for iso_double_with_units
-vec_arith(op, x, y, ...)
+
# S3 method for iso_double_with_units
+vec_arith(op, x, y, ...)

Arguments

op

An arithmetic operator as a string

-
x
-

A pair of vectors. For !, unary + and unary -, y will be -a sentinel object of class MISSING, as created by MISSING().

-
y
+ + +
x, y

A pair of vectors. For !, unary + and unary -, y will be a sentinel object of class MISSING, as created by MISSING().

+ +
...

These dots are for future extensions and must be empty.

+
@@ -118,7 +120,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/vec_cast.iso_double_with_units.html b/reference/vec_cast.iso_double_with_units.html index 451c6bf..3f6184f 100644 --- a/reference/vec_cast.iso_double_with_units.html +++ b/reference/vec_cast.iso_double_with_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,20 +88,25 @@

vec_cast for iso_double_with_units

-
# S3 method for iso_double_with_units
-vec_cast(x, to, ...)
+
# S3 method for iso_double_with_units
+vec_cast(x, to, ...)

Arguments

x

Vectors to cast.

+ +
to

Type to cast to. If NULL, x will be returned as is.

+ +
...

For vec_cast_common(), vectors to cast. For vec_cast(), vec_cast_default(), and vec_restore(), these dots are only for future extensions and should be empty.

+
@@ -116,7 +121,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/reference/vec_ptype2.iso_double_with_units.html b/reference/vec_ptype2.iso_double_with_units.html index fffdedf..90eece0 100644 --- a/reference/vec_ptype2.iso_double_with_units.html +++ b/reference/vec_ptype2.iso_double_with_units.html @@ -23,7 +23,7 @@ Isoreader - 1.3.3 + 1.4.0 @@ -88,18 +88,19 @@

vec_ptype2 for iso_double_with_units

-
# S3 method for iso_double_with_units
-vec_ptype2(x, y, ...)
+
# S3 method for iso_double_with_units
+vec_ptype2(x, y, ...)

Arguments

-
x
-

Vector types.

-
y
+
x, y

Vector types.

+ +
...

These dots are for future extensions and must be empty.

+
@@ -114,7 +115,7 @@

Arguments

-

Site built with pkgdown 2.0.3.

+

Site built with pkgdown 2.0.7.

diff --git a/sitemap.xml b/sitemap.xml index d6c7776..49cdab0 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,267 +1,267 @@ - https://isoreader.isoverse.org/404.html + http://isoreader.isoverse.org/404.html - https://isoreader.isoverse.org/LICENSE-text.html + http://isoreader.isoverse.org/LICENSE-text.html - https://isoreader.isoverse.org/articles/continuous_flow.html + http://isoreader.isoverse.org/articles/continuous_flow.html - https://isoreader.isoverse.org/articles/development.html + http://isoreader.isoverse.org/articles/development.html - https://isoreader.isoverse.org/articles/dual_inlet.html + http://isoreader.isoverse.org/articles/dual_inlet.html - https://isoreader.isoverse.org/articles/index.html + http://isoreader.isoverse.org/articles/index.html - https://isoreader.isoverse.org/articles/operations.html + http://isoreader.isoverse.org/articles/operations.html - https://isoreader.isoverse.org/articles/quick_start.html + http://isoreader.isoverse.org/articles/quick_start.html - https://isoreader.isoverse.org/articles/scan.html + http://isoreader.isoverse.org/articles/scan.html - https://isoreader.isoverse.org/authors.html + http://isoreader.isoverse.org/authors.html - https://isoreader.isoverse.org/index.html + http://isoreader.isoverse.org/index.html - https://isoreader.isoverse.org/news/index.html + http://isoreader.isoverse.org/news/index.html - https://isoreader.isoverse.org/paper.html + http://isoreader.isoverse.org/paper.html - https://isoreader.isoverse.org/reference/extract_data.html + http://isoreader.isoverse.org/reference/extract_data.html - https://isoreader.isoverse.org/reference/extract_substring.html + http://isoreader.isoverse.org/reference/extract_substring.html - https://isoreader.isoverse.org/reference/extract_word.html + http://isoreader.isoverse.org/reference/extract_word.html - https://isoreader.isoverse.org/reference/file_readers.html + http://isoreader.isoverse.org/reference/file_readers.html - https://isoreader.isoverse.org/reference/index.html + http://isoreader.isoverse.org/reference/index.html - https://isoreader.isoverse.org/reference/iso_add_file_info.html + http://isoreader.isoverse.org/reference/iso_add_file_info.html - https://isoreader.isoverse.org/reference/iso_caching.html + http://isoreader.isoverse.org/reference/iso_caching.html - https://isoreader.isoverse.org/reference/iso_calculate_ratios.html + http://isoreader.isoverse.org/reference/iso_calculate_ratios.html - https://isoreader.isoverse.org/reference/iso_cleanup_reader_cache.html + http://isoreader.isoverse.org/reference/iso_cleanup_reader_cache.html - https://isoreader.isoverse.org/reference/iso_convert_signals.html + http://isoreader.isoverse.org/reference/iso_convert_signals.html - https://isoreader.isoverse.org/reference/iso_convert_time.html + http://isoreader.isoverse.org/reference/iso_convert_time.html - https://isoreader.isoverse.org/reference/iso_data_structure.html + http://isoreader.isoverse.org/reference/iso_data_structure.html - https://isoreader.isoverse.org/reference/iso_debug_mode.html + http://isoreader.isoverse.org/reference/iso_debug_mode.html - https://isoreader.isoverse.org/reference/iso_expand_paths.html + http://isoreader.isoverse.org/reference/iso_expand_paths.html - https://isoreader.isoverse.org/reference/iso_export_to_excel.html + http://isoreader.isoverse.org/reference/iso_export_to_excel.html - https://isoreader.isoverse.org/reference/iso_export_to_feather.html + http://isoreader.isoverse.org/reference/iso_export_to_feather.html - https://isoreader.isoverse.org/reference/iso_filter_files.html + http://isoreader.isoverse.org/reference/iso_filter_files.html - https://isoreader.isoverse.org/reference/iso_filter_files_with_problems.html + http://isoreader.isoverse.org/reference/iso_filter_files_with_problems.html - https://isoreader.isoverse.org/reference/iso_find_absolute_path_roots.html + http://isoreader.isoverse.org/reference/iso_find_absolute_path_roots.html - https://isoreader.isoverse.org/reference/iso_format.html + http://isoreader.isoverse.org/reference/iso_format.html - https://isoreader.isoverse.org/reference/iso_get_all_data.html + http://isoreader.isoverse.org/reference/iso_get_all_data.html - https://isoreader.isoverse.org/reference/iso_get_bgrd_data.html + http://isoreader.isoverse.org/reference/iso_get_bgrd_data.html - https://isoreader.isoverse.org/reference/iso_get_data.html + http://isoreader.isoverse.org/reference/iso_get_data.html - https://isoreader.isoverse.org/reference/iso_get_data_summary.html + http://isoreader.isoverse.org/reference/iso_get_data_summary.html - https://isoreader.isoverse.org/reference/iso_get_default_reader_parameters.html + http://isoreader.isoverse.org/reference/iso_get_default_reader_parameters.html - https://isoreader.isoverse.org/reference/iso_get_file_info.html + http://isoreader.isoverse.org/reference/iso_get_file_info.html - https://isoreader.isoverse.org/reference/iso_get_problems.html + http://isoreader.isoverse.org/reference/iso_get_problems.html - https://isoreader.isoverse.org/reference/iso_get_problems_summary.html + http://isoreader.isoverse.org/reference/iso_get_problems_summary.html - https://isoreader.isoverse.org/reference/iso_get_raw_data.html + http://isoreader.isoverse.org/reference/iso_get_raw_data.html - https://isoreader.isoverse.org/reference/iso_get_reader_example.html + http://isoreader.isoverse.org/reference/iso_get_reader_example.html - https://isoreader.isoverse.org/reference/iso_get_resistors.html + http://isoreader.isoverse.org/reference/iso_get_resistors.html - https://isoreader.isoverse.org/reference/iso_get_resistors_info.html + http://isoreader.isoverse.org/reference/iso_get_resistors_info.html - https://isoreader.isoverse.org/reference/iso_get_standards.html + http://isoreader.isoverse.org/reference/iso_get_standards.html - https://isoreader.isoverse.org/reference/iso_get_standards_info.html + http://isoreader.isoverse.org/reference/iso_get_standards_info.html - https://isoreader.isoverse.org/reference/iso_get_supported_file_types.html + http://isoreader.isoverse.org/reference/iso_get_supported_file_types.html - https://isoreader.isoverse.org/reference/iso_get_units.html + http://isoreader.isoverse.org/reference/iso_get_units.html - https://isoreader.isoverse.org/reference/iso_get_vendor_data_table.html + http://isoreader.isoverse.org/reference/iso_get_vendor_data_table.html - https://isoreader.isoverse.org/reference/iso_has_problems.html + http://isoreader.isoverse.org/reference/iso_has_problems.html - https://isoreader.isoverse.org/reference/iso_info_messages.html + http://isoreader.isoverse.org/reference/iso_info_messages.html - https://isoreader.isoverse.org/reference/iso_is_double_with_units.html + http://isoreader.isoverse.org/reference/iso_is_double_with_units.html - https://isoreader.isoverse.org/reference/iso_make_units_explicit.html + http://isoreader.isoverse.org/reference/iso_make_units_explicit.html - https://isoreader.isoverse.org/reference/iso_make_units_implicit.html + http://isoreader.isoverse.org/reference/iso_make_units_implicit.html - https://isoreader.isoverse.org/reference/iso_mutate_file_info.html + http://isoreader.isoverse.org/reference/iso_mutate_file_info.html - https://isoreader.isoverse.org/reference/iso_omit_files_with_problems.html + http://isoreader.isoverse.org/reference/iso_omit_files_with_problems.html - https://isoreader.isoverse.org/reference/iso_parse_file_info.html + http://isoreader.isoverse.org/reference/iso_parse_file_info.html - https://isoreader.isoverse.org/reference/iso_plot_continuous_flow_data.html + http://isoreader.isoverse.org/reference/iso_plot_continuous_flow_data.html - https://isoreader.isoverse.org/reference/iso_plot_dual_inlet_data.html + http://isoreader.isoverse.org/reference/iso_plot_dual_inlet_data.html - https://isoreader.isoverse.org/reference/iso_plot_raw_data.html + http://isoreader.isoverse.org/reference/iso_plot_raw_data.html - https://isoreader.isoverse.org/reference/iso_printing.html + http://isoreader.isoverse.org/reference/iso_printing.html - https://isoreader.isoverse.org/reference/iso_problem_functions.html + http://isoreader.isoverse.org/reference/iso_problem_functions.html - https://isoreader.isoverse.org/reference/iso_read_continuous_flow.html + http://isoreader.isoverse.org/reference/iso_read_continuous_flow.html - https://isoreader.isoverse.org/reference/iso_read_dual_inlet.html + http://isoreader.isoverse.org/reference/iso_read_dual_inlet.html - https://isoreader.isoverse.org/reference/iso_read_files.html + http://isoreader.isoverse.org/reference/iso_read_files.html - https://isoreader.isoverse.org/reference/iso_read_scan.html + http://isoreader.isoverse.org/reference/iso_read_scan.html - https://isoreader.isoverse.org/reference/iso_rename_file_info.html + http://isoreader.isoverse.org/reference/iso_rename_file_info.html - https://isoreader.isoverse.org/reference/iso_reread_files.html + http://isoreader.isoverse.org/reference/iso_reread_files.html - https://isoreader.isoverse.org/reference/iso_root_paths.html + http://isoreader.isoverse.org/reference/iso_root_paths.html - https://isoreader.isoverse.org/reference/iso_save.html + http://isoreader.isoverse.org/reference/iso_save.html - https://isoreader.isoverse.org/reference/iso_select_file_info.html + http://isoreader.isoverse.org/reference/iso_select_file_info.html - https://isoreader.isoverse.org/reference/iso_set_default_read_parameters.html + http://isoreader.isoverse.org/reference/iso_set_default_read_parameters.html - https://isoreader.isoverse.org/reference/iso_set_file_root.html + http://isoreader.isoverse.org/reference/iso_set_file_root.html - https://isoreader.isoverse.org/reference/iso_shorten_relative_paths.html + http://isoreader.isoverse.org/reference/iso_shorten_relative_paths.html - https://isoreader.isoverse.org/reference/iso_strip_units.html + http://isoreader.isoverse.org/reference/iso_strip_units.html - https://isoreader.isoverse.org/reference/iso_with_units.html + http://isoreader.isoverse.org/reference/iso_with_units.html - https://isoreader.isoverse.org/reference/isoread.html + http://isoreader.isoverse.org/reference/isoread.html - https://isoreader.isoverse.org/reference/isoreader-package.html + http://isoreader.isoverse.org/reference/isoreader-package.html - https://isoreader.isoverse.org/reference/map_binary_structure.html + http://isoreader.isoverse.org/reference/map_binary_structure.html - https://isoreader.isoverse.org/reference/print.binary_structure_map.html + http://isoreader.isoverse.org/reference/print.binary_structure_map.html - https://isoreader.isoverse.org/reference/read_iso_file.html + http://isoreader.isoverse.org/reference/read_iso_file.html - https://isoreader.isoverse.org/reference/reexports.html + http://isoreader.isoverse.org/reference/reexports.html - https://isoreader.isoverse.org/reference/reread_iso_files.html + http://isoreader.isoverse.org/reference/reread_iso_files.html - https://isoreader.isoverse.org/reference/set_temp.html + http://isoreader.isoverse.org/reference/set_temp.html - https://isoreader.isoverse.org/reference/vec_arith.iso_double_with_units.html + http://isoreader.isoverse.org/reference/vec_arith.iso_double_with_units.html - https://isoreader.isoverse.org/reference/vec_cast.iso_double_with_units.html + http://isoreader.isoverse.org/reference/vec_cast.iso_double_with_units.html - https://isoreader.isoverse.org/reference/vec_ptype2.iso_double_with_units.html + http://isoreader.isoverse.org/reference/vec_ptype2.iso_double_with_units.html
type extension