Skip to content

Commit 7578bb1

Browse files
committed
Merge pull request #66 from dselivanov/master
small fixes to pass "R CMD check --as-cran"
2 parents b53e0b4 + 92955c4 commit 7578bb1

9 files changed

Lines changed: 24 additions & 19 deletions

R/bson_convert.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ mongo.bson.to.Robject <- function(b)
141141
#' # not simplify
142142
#' print(mongo.bson.to.list(b, simplify = FALSE))
143143
#' # heterogeneous types of array values
144-
#' print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = T))
144+
#' print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = TRUE))
145145
#' # identical to call with simplify = F
146-
#' print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = F))
146+
#' print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = FALSE))
147147
#' @export mongo.bson.to.list
148148
mongo.bson.to.list <- function(b, simplify = TRUE) {
149149
stopifnot(is.logical(simplify), (length(simplify) == 1))

R/mongo_high_level.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ mongo.get.values <- mongo.distinct
7777
#' Alternately, \code{pipeline} may be a \link{list} of valid JSON \link{character} strings which will be converted to a
7878
#' mongo.bson object by \code{\link{mongo.bson.from.JSON}()}.
7979
#' @param explain (\link{logical}) Optional, MongoDB 2.6+. Specifies to return the information on the processing of the pipeline. References above.
80-
#' @param (\link{logical}) Optional, MongoDB 2.6+. Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory.
80+
#' @param allowDiskUse (\link{logical}) Optional, MongoDB 2.6+. Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory.
8181
#' @param cursor (\link{mongo.bson}) Optional, MongoDB 2.6+. Specify a document that contains options that control the creation of the cursor object.
82+
#' @param ... Arguments to be passed to methods, such as \link{mongo.bson.to.list}, \link{fromJSON}
8283
#' Unfortunately, current underlying mongo-c-driver can return BSON from aggreagation camand. Cursors are not supported.
8384
#'
8485
#' Alternately, \code{cursor} may be a list which will be converted to a

R/mongo_index.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ mongo.index.create <- function(mongo, ns, key, options=0L) {
155155
#' mongo <- mongo.create()
156156
#' if (mongo.is.connected(mongo)) {
157157
#' for (i in 1:10) mongo.insert(mongo, ns = 'test.testTTL', b = list(a = i, last_updated = i))
158-
#' res_bson <- mongo.index.TTLcreate (mongo, ns = 'test.testTTL', key = list(last_updated = 1), expireAfterSeconds = 3600, index_name = 'last_updated_1')
158+
#' res_bson <- mongo.index.TTLcreate (mongo, ns = 'test.testTTL', key = list(last_updated = 1),
159+
#' expireAfterSeconds = 3600, index_name = 'last_updated_1')
159160
#' print(res_bson);
160161
#' mongo.drop(mongo, ns = 'test.testTTL')
161162
#' }

R/onAttach.R

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

R/zzz.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.onAttach <- function(libname, pkgname) {
2+
# Runs when attached to search() path such as by library() or require()
3+
if (interactive()) {
4+
packageStartupMessage('WARNING!\nThere are some quite big changes in this version of rmongodb.
5+
mongo.bson.to.list, mongo.bson.from.list (which are workhorses of many other rmongofb high-level functions) are rewritten.
6+
Please, \nTEST IT BEFORE PRODUCTION USAGE.\nAlso there are some other important changes, please see NEWS file and release notes at
7+
https://github.com/mongosoup/rmongodb/releases/')
8+
}
9+
}

man/mongo.aggregation.Rd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ mongo.bson object by \code{\link{mongo.bson.from.JSON}()}.}
2121

2222
\item{explain}{(\link{logical}) Optional, MongoDB 2.6+. Specifies to return the information on the processing of the pipeline. References above.}
2323

24-
\item{cursor}{(\link{mongo.bson}) Optional, MongoDB 2.6+. Specify a document that contains options that control the creation of the cursor object.
24+
\item{allowDiskUse}{(\link{logical}) Optional, MongoDB 2.6+. Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory.}
25+
26+
\item{cursor}{(\link{mongo.bson}) Optional, MongoDB 2.6+. Specify a document that contains options that control the creation of the cursor object.}
27+
28+
\item{...}{Arguments to be passed to methods, such as \link{mongo.bson.to.list}, \link{fromJSON}
2529
Unfortunately, current underlying mongo-c-driver can return BSON from aggreagation camand. Cursors are not supported.
2630

2731
Alternately, \code{cursor} may be a list which will be converted to a
2832
mongo.bson object by \code{\link{mongo.bson.from.list}()}.
2933

3034
Alternately, \code{cursor} may be a valid JSON character string which will be converted to mongo.bson object by \code{\link{mongo.bson.from.JSON}()}.}
31-
32-
\item{(\link{logical})}{Optional, MongoDB 2.6+. Enables writing to temporary files. When set to true, aggregation stages can write data to the _tmp subdirectory in the dbPath directory.}
3335
}
3436
\value{
3537
NULL if the command failed. \code{\link{mongo.get.err}()} may be

man/mongo.bson.to.list.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ print(mongo.bson.to.list(b, simplify = TRUE))
3232
# not simplify
3333
print(mongo.bson.to.list(b, simplify = FALSE))
3434
# heterogeneous types of array values
35-
print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = T))
35+
print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = TRUE))
3636
# identical to call with simplify = F
37-
print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = F))
37+
print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = FALSE))
3838
}
3939
\seealso{
4040
\code{\link{mongo.bson.from.list}}, \code{\link{mongo.bson.to.Robject}},\cr \link{mongo.bson}.

man/mongo.index.TTLcreate.Rd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ See \url{http://docs.mongodb.org/manual/tutorial/expire-data}.
3838
mongo <- mongo.create()
3939
if (mongo.is.connected(mongo)) {
4040
for (i in 1:10) mongo.insert(mongo, ns = 'test.testTTL', b = list(a = i, last_updated = i))
41-
res_bson <- mongo.index.TTLcreate (mongo, ns = 'test.testTTL', key = list(last_updated = 1), expireAfterSeconds = 3600, index_name = 'last_updated_1')
41+
res_bson <- mongo.index.TTLcreate (mongo, ns = 'test.testTTL', key = list(last_updated = 1),
42+
expireAfterSeconds = 3600, index_name = 'last_updated_1')
4243
print(res_bson);
4344
mongo.drop(mongo, ns = 'test.testTTL')
4445
}
File renamed without changes.

0 commit comments

Comments
 (0)