Learn R Programming

mboxr (version 0.2.0)

merge_mbox_all: Merging all mbox files in current directory into one tibble.

Description

Use this function for merging all mbox files into one tibble object.

Usage

merge_mbox_all(path = ".", file = NULL)

Arguments

path

A character vector of full path names; the default corresponds to the working directory, getwd. Tilde expansion (see path.expand) is performed. Missing values will be ignored.

file

Output RDS file if you want to save. The default is NULL, which is not saving the output as a file.

Value

One tibble object for all the merged mbox files in your current directory will be returned.

Details

merge_mbox_all

See example below.

References

https://en.wikipedia.org/wiki/Mbox

https://docs.python.org/3/library/mailbox.html

https://www.anaconda.com/download/

Examples

Run this code
# NOT RUN {
# Changing working directory to temp for the demonstration purpose only.
setwd(tempdir())
library(mboxr)
test_path <- system.file("extdata", package = "mboxr")
# Save your own RDS file as an output if you need it:
data <- merge_mbox_all(path = test_path, file = "output.rds")
# Now you can use the imported file as a tibble.
str(data)
# }

Run the code above in your browser using DataLab