Skip to content

Commit 65563f5

Browse files
minimal documentation for check()
1 parent b7135c7 commit 65563f5

File tree

8 files changed

+123
-20
lines changed

8 files changed

+123
-20
lines changed

r/.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
^\.Rproj\.user$
33
^README\.Rmd$
44
src/.clang-format
5+
LICENSE.md

r/NAMESPACE

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ S3method("==","arrow::DataType")
99
S3method("==","arrow::Field")
1010
S3method(length,"arrow::Array")
1111
S3method(print,"arrow-enum")
12-
export(DateUnit)
13-
export(Field_initialize)
14-
export(MakeArray)
15-
export(StatusCode)
16-
export(TimeUnit)
17-
export(Type)
18-
export(array_data)
1912
export(boolean)
2013
export(date32)
2114
export(date64)

r/R/R6.R

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#' @importFrom purrr map map_int map2
55
#' @importFrom rlang dots_n
66
#' @importFrom assertthat assert_that
7-
87
`arrow::Object` <- R6Class("arrow::Object",
98
public = list(
109
`.:xp:.` = NULL,
@@ -274,65 +273,95 @@
274273
)
275274
)
276275

276+
#' Apache Arrow data types
277+
#'
278+
#' Apache Arrow data types
279+
#'
280+
#' @param unit time unit
281+
#' @param precision precision
282+
#' @param scale scale
283+
#' @param type type
284+
#' @param ... ...
285+
#'
286+
#' @rdname DataType
277287
#' @export
278288
int8 <- function() `arrow::Int8`$new()
279289

290+
#' @rdname DataType
280291
#' @export
281292
int16 <- function() `arrow::Int16`$new()
282293

294+
#' @rdname DataType
283295
#' @export
284296
int32 <- function() `arrow::Int32`$new()
285297

298+
#' @rdname DataType
286299
#' @export
287300
int64 <- function() `arrow::Int64`$new()
288301

302+
#' @rdname DataType
289303
#' @export
290304
uint8 <- function() `arrow::UInt8`$new()
291305

306+
#' @rdname DataType
292307
#' @export
293308
uint16 <- function() `arrow::UInt16`$new()
294309

310+
#' @rdname DataType
295311
#' @export
296312
uint32 <- function() `arrow::UInt32`$new()
297313

314+
#' @rdname DataType
298315
#' @export
299316
uint64 <- function() `arrow::UInt64`$new()
300317

318+
#' @rdname DataType
301319
#' @export
302320
float16 <- function() `arrow::Float16`$new()
303321

322+
#' @rdname DataType
304323
#' @export
305324
float32 <- function() `arrow::Float32`$new()
306325

326+
#' @rdname DataType
307327
#' @export
308328
float64 <- function() `arrow::Float64`$new()
309329

330+
#' @rdname DataType
310331
#' @export
311332
boolean <- function() `arrow::Boolean`$new()
312333

334+
#' @rdname DataType
313335
#' @export
314336
utf8 <- function() `arrow::Utf8`$new()
315337

338+
#' @rdname DataType
316339
#' @export
317340
date32 <- function() `arrow::Date32`$new()
318341

342+
#' @rdname DataType
319343
#' @export
320344
date64 <- function() `arrow::Date64`$new()
321345

346+
#' @rdname DataType
322347
#' @export
323348
time32 <- function(unit) {
324349
`arrow::Time32`$new(unit)
325350
}
326351

352+
#' @rdname DataType
327353
#' @export
328354
time64 <- function(unit) `arrow::Time64`$new(unit)
329355

356+
#' @rdname DataType
330357
#' @export
331358
null <- function() `arrow::Null`$new()
332359

360+
#' @rdname DataType
333361
#' @export
334362
timestamp <- function(...) `arrow::Timestamp`$new(...)
335363

364+
#' @rdname DataType
336365
#' @export
337366
decimal <- function(precision, scale) `arrow::Decimal128Type`$new(precision, scale)
338367

@@ -415,9 +444,11 @@ field <- function(name, type) `arrow::Field`$new(name, type)
415444
)
416445
)
417446

447+
#' @rdname DataType
418448
#' @export
419449
struct <- function(...) `arrow::StructType`$new(...)
420450

451+
#' @rdname DataType
421452
#' @export
422453
schema <- function(...) `arrow::Schema`$new(...)
423454

@@ -439,6 +470,7 @@ schema <- function(...) `arrow::Schema`$new(...)
439470
)
440471
)
441472

473+
#' @rdname DataType
442474
#' @export
443-
list_of <- function(x) `arrow::ListType`$new(x)
475+
list_of <- function(type) `arrow::ListType`$new(type)
444476

r/R/RcppExports.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Array_data <- function(array) {
6565
.Call(`_arrow_Array_data`, array)
6666
}
6767

68-
#' @export
6968
Field_initialize <- function(name, type, nullable = TRUE) {
7069
.Call(`_arrow_Field_initialize`, name, type, nullable)
7170
}

r/R/array.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
)
3434
)
3535

36-
#' @export
3736
array_data <- function(...){
3837
`arrow::ArrayData`$new(...)
3938
}
@@ -66,7 +65,6 @@ array_data <- function(...){
6665
#' @export
6766
`!=.arrow::Array` <- function(x, y) !x$Equals(y)
6867

69-
#' @export
7068
MakeArray <- function(data){
7169
assert_that(inherits(data, "arrow::ArrayData"))
7270
`arrow::Array`$new(data)

r/R/enums.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,13 @@ enum <- function(class, ...){
3838
}
3939

4040

41-
#' @export
4241
TimeUnit <- enum("arrow::TimeUnit::type", SECOND, MILLI, MICRO, NANO)
43-
44-
#' @export
4542
DateUnit <- enum("arrow::DateUnit", DAY, MILLI)
46-
47-
#' @export
4843
Type <- enum("arrow::Type::type",
4944
NA, BOOL, UINT8, INT8, UINT16, INT16, UINT32, INT32, UINT64, INT64,
5045
HALF_FLOAT, FLOAT, DOUBLE, STRING, BINARY, DATE32, DATE64, TIMESTAMP,
5146
INTERVAL, DECIMAL, LIST, STRUCT, UNION, DICTIONARY, MAP
5247
)
53-
54-
#' @export
5548
StatusCode <- enum("arrow::StatusCode",
5649
OK, OutOfMemory, KeyError, TypeError, Invalid, IOError,
5750
CapacityError, UnknownError, NotImplemented, SerializationError,

r/man/DataType.Rd

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

r/src/field.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
using namespace Rcpp;
2424

25-
//' @export
2625
// [[Rcpp::export]]
2726
std::shared_ptr<arrow::Field> Field_initialize(const std::string& name, const std::shared_ptr<arrow::DataType>& type, bool nullable = true) {
2827
return arrow::field(name, type, nullable);

0 commit comments

Comments
 (0)