read_npx_format_get_format: Help function to determine the format (wide or long) of the...

View source: R/read_npx_format.R

read_npx_format_get_formatR Documentation

Help function to determine the format (wide or long) of the input dataset.

Description

The function uses the first read_n rows of the input dataset to determine the format of the input file.

The user can provide the file format as an input argument long_format. If the user did not provide an input with regards to the file format, then it is auto-determined is this function. If file format was provided as input, then the function cross-checks that its auto-detection matches the user input. If not, it will throw a warning, and accept user's input as the correct answer.

Usage

read_npx_format_get_format(df_top_n, file, long_format = NULL)

Arguments

df_top_n

A tibble containing the first read_n rows of the input dataset.

file

Path to Olink software output file in wide or long format. Expecting file extensions "xls", "xlsx", "csv", or "txt".

long_format

Boolean marking format of input file. One of TRUE for long format and FALSE for wide format files. Defaults to NULL for auto-detection.

Value

A list with two elements:

  • A scalar boolean (is_long_format) marking if the input file is in long (TRUE) or wide (FALSE) format.

  • A character vector (data_cells) from the input file which allows detection of the quantification method. Used in function read_npx_format_get_quant.

Author(s)

Klev Diamanti

See Also

read_npx_format read_npx_format_read read_npx_format_get_platform read_npx_format_get_quant


OlinkAnalyze documentation built on June 24, 2026, 1:06 a.m.