Description Usage Arguments Value See Also Examples
RaggedArrayNew
constructs a new RaggedArray object, filling it with the provided data, if any. Either dataList
or nvec & allocLen
are mandatory. Given one, the other(s) will be inferred. Alternately, if dataList
is a serialized RaggedArray (e.g. is an R list with element SerializedRaggedArray
), a new object will be created using the default List constructor. In this case, specs are silently ignored.
See RaggedArrayClass
for methods to manipulate object.
1 2 | RaggedArrayNew(dataList = NULL, nvec = NULL, allocLen = NULL,
growBy = NULL)
|
dataList |
List of (numeric) vectors to fill the new object, or the results of a previous |
nvec |
Number of (column) vectors that object will store. This is constant over the lifespan of the object. Defaults to |
allocLen |
Number of rows to allocate in underlying data matrix. Object will grow as needed. Defaults to |
growBy |
Number of rows to grow object data matrix by when reallocation is needed. Can be changed. Defaults to |
An object of (S4) class RaggedArray.
Other Ragged.Array.Docs: RaggedArray-package
1 2 3 4 5 6 | ragged <- RaggedArrayNew( list( 1:5, 1:6, 1:7))
all.equal(ragged, RaggedArrayNew( ragged$serialize() ))
ragged$sapply(function(x) x*2)
head(ragged$data)
sourceCpp(system.file('examples', 'cpp', 'userSapplyFun.cpp', package='RaggedArray'))
ragged$sapplyC(FunTimes10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.