Description Usage Arguments Details Author(s) References See Also Examples
This package provides access to the cnpy
library by Carl Rogers
which provides read and write facilities for files created with (or for) the
NumPy extension for Python.
Support is currently limited to reading and writing of either vectors
or matrices of numeric types. Integer support can be added if the
package, as well Rcpp are recompiled using the -std=c++11
flag.
Files with gzip
compression can be transparently read and
written as well.
1 2 3 |
filename |
string with (path and) filename for a |
type |
string with type 'numeric' (default) or 'integer'. Integer
support is available only if Rcpp and RcppCNPy have been compiled
with the |
object |
an R object, currently limited to a vector or matrix of either integer or numeric type |
dotranspose |
a boolean variable indicating whether a two-dimensional object should be transposed after reading, default is yes |
mode |
a one-character string indicating whether files are
appended to ("a") or written ("w", the default). In case of writing
|
The package uses Rcpp modules to provide R bindings npyLoad()
and npySave()
which wrap the npy_load()
and
npy_save()
functions. Currently, only one- and two-dimensional
vectors and matrices are suppported; higher-dimensional arrays could
be added.
Dirk Eddelbuettel provided the binding to R (using the Rcpp package).
Carl Rogers wrote the underlying cnpy
library, which is
released under the MIT license.
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Rcpp, in particular the Rcpp modules documentation.
The cnpy
repository: https://github.com/rogersce/cnpy
1 | ## TODO, but see demo()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.