File: py_save_object.Rd

package info (click to toggle)
r-cran-reticulate 1.41.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,088 kB
  • sloc: cpp: 5,154; python: 620; sh: 13; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,152 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pickle.R
\name{py_save_object}
\alias{py_save_object}
\alias{py_load_object}
\title{Save and Load Python Objects}
\usage{
py_save_object(object, filename, pickle = "pickle", ...)

py_load_object(filename, pickle = "pickle", ..., convert = TRUE)
}
\arguments{
\item{object}{A Python object.}

\item{filename}{The output file name. Note that the file extension \code{.pickle}
is considered the "standard" extension for serialized Python objects
as created by the \code{pickle} module.}

\item{pickle}{The "pickle" implementation to use. Defaults to \verb{"pickle}",
but other compatible Python "pickle" implementations (e.g. \code{"cPickle"})
could be used as well.}

\item{...}{Optional arguments, to be passed to the \code{pickle} module's
\code{dump()} and \code{load()} functions.}

\item{convert}{Bool. Whether the loaded pickle object should be converted to
an R object.}
}
\description{
Save and load Python objects.
}
\details{
Python objects are serialized using the \code{pickle} module -- see
\url{https://docs.python.org/3/library/pickle.html} for more details.
}