View source: R/read_imagej_results.R
read_imagej_results | R Documentation |
The function loads spreadsheets obtained with ImageJ (https://imagej.net/)
that were stored as *.csv files (comma-separated) in a common folder whose
path is specified by the folder_in
argument.
read_imagej_results(
folder_in = NULL,
metadata = c("site_id", "depth", "image_id"),
image_id_default = "a",
na_replace = FALSE
)
folder_in |
Sets the path to the directory where the *.csv files are located (e.g. "./data_in/" if the files are in a subfolder relatively to the working directory). |
metadata |
A vector that describes the metadata stored in the file names. By default, metadata = c("core_id", "depth", "image_id"), for file names formatted as "CoreID_Depth_ImageID.csv". However, other file name formats are possible. See the Description here below. |
image_id_default |
Specifies the value or character that shall be
added if sometimes the file name does not include
the information for the ImageID. By default,
|
na_replace |
Logical. If |
The function expects that the file names include a set of information that identify the samples unequivocally, and that the information is given as strings separated by a dash (-) or an underscore (_) (do not use empty spaces (space bar) to separate the metadata). It is recommended to use a hierarchical file-name format that includes the ImageID information last.
By default the following set of information is expected in the file names:
a site identifier;
a sample identifier, for instance the master core depth;
an image identifier (a character string) in case several images were taken for a sample. If only one image was taken from a sample, the image identifier is optional (an "a" will be added if the file name does not include this information).
However, users can choose a different set and number of identifiers. Possible alternatives may include:
"CoreID_SectionID_Depth_ImageID.csv" or
"CoreID_SectionID_DepthInDrive_ImageID.csv".
If the file names include a "depth" value, make sure to take note as to which depth values are mentioned (top depth, mid depth, bottom depth), as well as to which depth scale the values are referring to (e.g. the master core depth, depth in drive, or other). Further, make sure the file names include useful information to link the data with other data types from the same sediment archive, such as the chronology or other proxy data.
A data.frame with the specified metadata
columns, and all columns
that appear in any of the input files.
Walter Finsinger
## Not run:
folder_in = "./data_in/",
metadata = c("site_id", "depth", "image_id"),
image_id_default = "a",
na_replace = FALSE
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.