tidy.nmr_dataset_1D | R Documentation |
This dataframe is useful for plotting with ggplot, although it may be very long and therefore use a lot of RAM.
## S3 method for class 'nmr_dataset_1D'
tidy(
x,
NMRExperiment = NULL,
chemshift_range = NULL,
columns = character(0L),
matrix_name = "data_1r",
axis_name = "axis",
...
)
x |
an |
NMRExperiment |
A character vector with the NMRExperiments to include. |
chemshift_range |
range of the chemical shifts to be included. Can be of length 3
to include the resolution in the third element (e.g. |
columns |
A character vector with the metadata columns to get, use |
matrix_name |
A string with the matrix name, typically "data_1r" |
axis_name |
A string with the axis name, for now "axis" is the only valid option |
... |
Ignored |
A data frame with NMRExperiment
, chemshift
, intensity
and any additional column requested
dir_to_demo_dataset <- system.file("dataset-demo", package = "AlpsNMR")
dataset <- nmr_read_samples_dir(dir_to_demo_dataset)
dataset_1D <- nmr_interpolate_1D(dataset, axis = c(min = -1.0, max = 1.6, by = 2.3E-4))
dummy_metadata <- system.file("dataset-demo", "dummy_metadata.xlsx", package = "AlpsNMR")
NMRExp_SubjID <- readxl::read_excel(dummy_metadata, sheet = 1)
dataset_1D <- nmr_meta_add(dataset_1D, NMRExp_SubjID)
df_for_ggplot <- tidy(dataset_1D, chemshift_range = c(1.2, 1.4), columns = "SubjectID")
head(df_for_ggplot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.