load_pq: Load a phyloseq object from an RData file written by...

View source: R/dada_phyloseq.R

load_pqR Documentation

Load a phyloseq object from an RData file written by save_pq() or write_pq()

Description

lifecycle-maturing

This is the reverse function of save_pq() and write_pq() when used with rdata = TRUE. Those functions save the phyloseq object in an RData file named physeq.RData (the object is always stored under the name physeq). Contrary to base::load(), load_pq() returns the phyloseq object so it can be assigned to any name, without modifying the calling environment.

Usage

load_pq(path = NULL)

Arguments

path

(required) a path to the folder where the phyloseq object was saved, or directly the path to the .RData/.rda file. If a folder is given, the file physeq.RData inside it is loaded.

Value

The loaded phyloseq object.

Author(s)

Adrien Taudière

See Also

save_pq(), write_pq(), read_pq()

Examples


save_pq(data_fungi, path = paste0(tempdir(), "/phyloseq"))
# Load the object and assign it to any name you like
my_pq <- load_pq(path = paste0(tempdir(), "/phyloseq"))
unlink(paste0(tempdir(), "/phyloseq"), recursive = TRUE)


MiscMetabar documentation built on Nov. 16, 2026, 5:06 p.m.