Learn R Programming

powdR (version 1.3.0)

as_multi_xy.data.frame: Create a multiXY object from a list of XRPD data

Description

as_multi_xy.data.frame takes a data frame of XRPD data from multiple samples and ensures that it meets various requirements to create a multiXY object. Once a multiXY object has been created, it can easily be plotted using the associated plot.multiXY method.

Usage

# S3 method for data.frame
as_multi_xy(x, ...)

Arguments

x

a data frame of XRPD data, with the first column as the 2theta axis and subsequent columns of count intensities.

...

other arguments

Value

a multiXY object.

Examples

Run this code
# NOT RUN {
#load the soils data
data(soils)

#Convert to data frame
soils_df <- multi_xy_to_df(soils,
                           tth = TRUE)

#Convert back to multiXY object
soils2 <- as_multi_xy(soils_df)

# }

Run the code above in your browser using DataLab