Skip to content

Commit b9dc799

Browse files
committed
Merge branch 'r-1.1.0' into production
2 parents 5cbdbeb + 625f76b commit b9dc799

File tree

12 files changed

+104
-24
lines changed

12 files changed

+104
-24
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
^\.travis\.yml$
66
^codecov\.yml$
77
^cran-comments\.md$
8+
^API$

API

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# API for blob package
2+
3+
## Exported functions
4+
5+
as.blob(x, ...)
6+
blob(...)
7+
new_blob(x)
8+
9+
## S3 methods
10+
11+
as.blob.blob(x, ...)
12+
as.blob.character(x, ...)
13+
as.blob.integer(x, ...)
14+
as.blob.list(x, ...)
15+
as.blob.raw(x, ...)

DESCRIPTION

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Package: blob
22
Title: A Simple S3 Class for Representing Vectors of Binary Data ('BLOBS')
3-
Version: 1.0.0
3+
Version: 1.1.0
44
Authors@R: c(
5-
person("Hadley", "Wickham", , "[email protected]", role = c("aut", "cre")),
5+
person("Hadley", "Wickham", role = c("aut")),
6+
person("Kirill", "Müller", , "[email protected]", role = c("cre")),
67
person("RStudio", role = "cph")
78
)
89
Description: R's raw vector is useful for storing a single binary object.
@@ -19,4 +20,5 @@ BugReports: https://github.com/hadley/blob/issues
1920
Suggests:
2021
testthat,
2122
covr
22-
RoxygenNote: 5.0.1
23+
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd", "pkgapi::api_roclet"))
24+
RoxygenNote: 6.0.1

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ S3method("[",blob)
44
S3method("[<-",blob)
55
S3method("[[<-",blob)
66
S3method("is.na<-",blob)
7+
S3method(as.blob,blob)
78
S3method(as.blob,character)
89
S3method(as.blob,integer)
910
S3method(as.blob,list)
1011
S3method(as.blob,raw)
12+
S3method(as.data.frame,blob)
1113
S3method(format,blob)
1214
S3method(is.na,blob)
1315
S3method(is_vector_s3,blob)

NEWS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# blob 1.1.0 (2017-06-17)
2+
3+
- New maintainer: Kirill Müller.
4+
5+
- Added `as.blob.blob()`and `as.data.frame.blob()` methods (#3).
6+
7+
- Size of very large blobs is displayed correctly.
8+
9+
10+
# blob 1.0.0
11+
12+
- Initial release.

R/blob.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ as.blob <- function(x, ...) {
3434
UseMethod("as.blob")
3535
}
3636

37+
#' @export
38+
as.blob.blob <- function(x, ...) {
39+
x
40+
}
41+
3742
#' @export
3843
as.blob.list <- function(x, ...) {
3944
new_blob(x)
@@ -53,3 +58,6 @@ as.blob.character <- function(x, ...) {
5358
as.blob.integer <- function(x, ...) {
5459
new_blob(lapply(x, as.raw))
5560
}
61+
62+
#' @export
63+
as.data.frame.blob <- as.data.frame.difftime

R/format.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ obj_sum.blob <- function(x) {
3232
is_vector_s3.blob <- function(x) TRUE
3333

3434
blob_size <- function(x, digits = 3, trim = TRUE, ...) {
35-
x <- vapply(x, length, integer(1))
35+
x <- vapply(x, length, numeric(1))
3636

37-
power <- min(floor(log(abs(x), 1000)), 4)
37+
units <- c("kb", "Mb", "Gb", "Tb")
38+
power <- min(floor(log(abs(x), 1000)), length(units))
3839
if (power < 1) {
3940
unit <- "B"
4041
} else {
41-
unit <- c("kb", "Mb", "Gb", "Tb")[[power]]
42+
unit <- units[[power]]
4243
x <- x / (1024 ^ power)
4344
}
4445

README.Rmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
output: github_document
2+
output:
3+
github_document:
4+
html_preview: false
35
---
46

5-
[![Travis-CI Build Status](https://travis-ci.org/rstats-db/blob.svg?branch=master)](https://travis-ci.org/rstats-db/blob)
7+
[![Travis-CI Build Status](https://travis-ci.org/tidyverse/blob.svg?branch=master)](https://travis-ci.org/tidyverse/blob)
68
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/blob)](https://cran.r-project.org/package=blob)
7-
[![Coverage Status](https://img.shields.io/codecov/c/github/rstats-db/blob/master.svg)](https://codecov.io/github/rstats-db/blob?branch=master)
9+
[![Coverage Status](https://codecov.io/gh/tidyverse/blob/branch/master/graph/badge.svg)](https://codecov.io/github/tidyverse/blob?branch=master)
810

911
<!-- README.md is generated from README.Rmd. Please edit that file -->
1012

@@ -29,7 +31,7 @@ You can install blob from github with:
2931

3032
```{r gh-installation, eval = FALSE}
3133
# install.packages("devtools")
32-
devtools::install_github("rstats-db/blob")
34+
devtools::install_github("tidyverse/blob")
3335
```
3436

3537
## Example

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
[![Travis-CI Build Status](https://travis-ci.org/rstats-db/blob.svg?branch=master)](https://travis-ci.org/rstats-db/blob) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/blob)](https://cran.r-project.org/package=blob) [![Coverage Status](https://img.shields.io/codecov/c/github/rstats-db/blob/master.svg)](https://codecov.io/github/rstats-db/blob?branch=master)
2+
[![Travis-CI Build Status](https://travis-ci.org/tidyverse/blob.svg?branch=master)](https://travis-ci.org/tidyverse/blob) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/blob)](https://cran.r-project.org/package=blob) [![Coverage Status](https://codecov.io/gh/tidyverse/blob/branch/master/graph/badge.svg)](https://codecov.io/github/tidyverse/blob?branch=master)
33

44
<!-- README.md is generated from README.Rmd. Please edit that file -->
55
blob
@@ -16,7 +16,7 @@ You can install blob from github with:
1616

1717
``` r
1818
# install.packages("devtools")
19-
devtools::install_github("rstats-db/blob")
19+
devtools::install_github("tidyverse/blob")
2020
```
2121

2222
Example

cran-comments.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
## Test environments
2-
* local OS X install, R 3.3.2
3-
* ubuntu 12.04 (on travis-ci), R 3.3.2
2+
* local Ubuntu 17.04 install, R 3.4.0
3+
* ubuntu 12.04 (on travis-ci), R 3.4.0
44
* win-builder (devel and release)
55

66
## R CMD check results
77

88
0 errors | 0 warnings | 1 note
99

10-
* This is a new release.
11-
12-
* Found the following (possibly) invalid URLs:
13-
URL: https://cran.r-project.org/package=blob
14-
From: README.md
15-
16-
This will work if this package is accepted :)
10+
* Change of package maintainer, see https://github.com/tidyverse/blob/pull/6
11+
for consent of previous maintainer.
1712

1813
## Reverse dependencies
1914

20-
This is a new release, so there are no reverse dependencies.
15+
Checked the only dependency 'odbc'.

0 commit comments

Comments
 (0)