Skip to content

Commit 22c9d04

Browse files
More doc cleaning
1 parent 01084ce commit 22c9d04

11 files changed

Lines changed: 178 additions & 83 deletions

File tree

r/R/array.R

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,24 @@
1717

1818
#' @include arrow-package.R
1919

20-
#' @title class Array
21-
#'
22-
#' Array base type. Immutable data array with some logical type and some length.
23-
#'
20+
#' @title Array class
21+
#' @description Array base type. Immutable data array with some logical type
22+
#' and some length.
2423
#' @usage NULL
2524
#' @format NULL
2625
#' @docType class
2726
#'
27+
#' @section Factory:
28+
#' The `Array$create()` factory method instantiates an `Array` and
29+
#' takes the following arguments:
30+
#' * `x`: an R vector, list, or `data.frame`
31+
#' * `type`: an optional [data type][data-type] for `x`. If omitted, the type
32+
#' will be inferred from the data.
2833
#' @section Usage:
2934
#'
3035
#' ```
3136
#' a <- Array$create(x)
32-
#'
33-
#' a$IsNull(i)
34-
#' a$IsValid(i)
35-
#' a$length() or length(a)
36-
#' a$offset()
37-
#' a$null_count()
38-
#' a$type()
39-
#' a$type_id()
40-
#' a$Equals(b)
41-
#' a$ApproxEquals(b)
42-
#' a$as_vector()
43-
#' a$ToString()
44-
#' a$Slice(offset, length = NULL)
45-
#' a$RangeEquals(other, start_idx, end_idx, other_start_idx)
37+
#' length(a)
4638
#'
4739
#' print(a)
4840
#' a == a

r/R/buffer.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
#' @title class Buffer
18+
#' @title Buffer class
1919
#' @usage NULL
2020
#' @format NULL
2121
#' @docType class
22-
#' @description `buffer()` lets you create an `arrow::Buffer` from an R object
22+
#' @description A Buffer is an object containing a pointer to a piece of
23+
#' contiguous memory with a particular size.
24+
#' @section Factory:
25+
#' `buffer()` lets you create an `arrow::Buffer` from an R object
2326
#' @section Methods:
2427
#'
2528
#' - `$is_mutable()` :

r/R/chunked-array.R

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,31 @@
1717

1818
#' @include arrow-package.R
1919

20-
#' @title class ChunkedArray
21-
#'
20+
#' @title ChunkedArray class
2221
#' @usage NULL
2322
#' @format NULL
2423
#' @docType class
24+
#' @description A `ChunkedArray` is a data structure managing a list of
25+
#' primitive Arrow [Arrays][Array] logically as one large array.
26+
#' @section Factory:
27+
#' The `ChunkedArray$create()` factory method instantiates the object from
28+
#' various Arrays or R vectors. `chunked_array()` is an alias for it.
2529
#'
2630
#' @section Methods:
2731
#'
28-
#' TODO
32+
#' - `$length()`
33+
#' - `$chunk(i)`
34+
#' - `$as_vector()`
35+
#' - `$Slice(offset, length = NULL)`
36+
#' - `$cast(target_type, safe = TRUE, options = cast_options(safe))`
37+
#' - `$null_count()`
38+
#' - `$chunks()`
39+
#' - `$num_chunks()`
40+
#' - `$type()`
2941
#'
30-
#' @rdname chunked-array
31-
#' @name chunked-array
42+
#' @rdname ChunkedArray
43+
#' @name ChunkedArray
44+
#' @seealso [Array]
3245
#' @export
3346
ChunkedArray <- R6Class("ChunkedArray", inherit = Object,
3447
public = list(
@@ -60,10 +73,8 @@ ChunkedArray$create <- function(..., type = NULL) {
6073
shared_ptr(ChunkedArray, ChunkedArray__from_list(list2(...), type))
6174
}
6275

63-
#' Create a [ChunkedArray][chunked-array] from various R vectors
64-
#'
6576
#' @param \dots Vectors to coerce
6677
#' @param type currently ignored
67-
#'
78+
#' @rdname ChunkedArray
6879
#' @export
6980
chunked_array <- ChunkedArray$create

r/R/schema.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ read_schema.InputStream <- function(stream, ...) {
8787
}
8888

8989
#' @export
90-
`read_schema.Buffer` <- function(stream, ...) {
90+
read_schema.Buffer <- function(stream, ...) {
9191
stream <- BufferReader$create(stream)
9292
on.exit(stream$close())
9393
shared_ptr(Schema, ipc___ReadSchema_InputStream(stream))
9494
}
9595

9696
#' @export
97-
`read_schema.raw` <- function(stream, ...) {
97+
read_schema.raw <- function(stream, ...) {
9898
stream <- BufferReader$create(stream)
9999
on.exit(stream$close())
100100
shared_ptr(Schema, ipc___ReadSchema_InputStream(stream))

r/man/ChunkedArray.Rd

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/Field.Rd

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/Schema.Rd

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/array.Rd

Lines changed: 14 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/buffer.Rd

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/chunked-array.Rd

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)