Skip to content

Commit

Permalink
native routines registration and CRAN preparations
Browse files Browse the repository at this point in the history
  • Loading branch information
dselivanov committed Jun 25, 2017
1 parent f00bbb0 commit 6bd8cbd
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 10 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^cran-comments\.md$
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@

.*.sw[po]
.Rproj.user

.DS_Store
.DS_Store?
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Package: sparsio
Type: Package
Title: I/O opeations with sparse matrices
Version: 2.0
Date: 2017-04-13
Title: I/O Operations with Sparse Matrices
Version: 1.0
Date: 2017-06-25
Authors@R: c(person("Dmitriy", "Selivanov", role = c("aut", "cre"),
email = "selivanov.dmitriy@gmail.com"),
person("Felix", "Riedel", role = c("aut"),
email = "felix.riedel@gmail.com"))
Maintainer: Dmitriy Selivanov <selivanov.dmitriy@gmail.com>
Encoding: UTF-8
Description: Fast SVMlight reader and writer.
License: BSD_3_clause + file LICENSE
License: GPL (>= 2) | file LICENSE
Depends:
R (>= 3.1.0),
methods
Expand All @@ -22,4 +22,4 @@ Suggests:
testthat
URL: https://github.com/dselivanov/sparsio
BugReports: https://github.com/dselivanov/sparsio/issues
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
2 changes: 1 addition & 1 deletion R/sparsio.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' and then coerced with \code{as()} to target type.
#' This is because \code{smvlight} format is essentially equal to \code{CSR} sparse matrix format.
#' @param zero_based \code{logical}, whether column indices in file are 0-based (\code{TRUE}) or 1-based (\code{FALSE}).
#' @param ncol number of columns in target matrix. \code{NULL} means that number of coluns will be determined
#' @param ncol number of columns in target matrix. \code{NULL} means that number of columns will be determined
#' from file (as a maximum index). However it is possible that user expects matrix with a predefined number of columns,
#' so function can override inherited from data value.
#' @examples
Expand Down
13 changes: 13 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Test environments
* local OS X install, R 3.4.0
* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.

## Reverse dependencies

This is a new release, so there are no reverse dependencies.
5 changes: 2 additions & 3 deletions man/svmlight.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ BEGIN_RCPP
return R_NilValue;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
{"sparsio_read_svmlight_cpp", (DL_FUNC) &sparsio_read_svmlight_cpp, 2},
{"sparsio_write_svmlight_cpp", (DL_FUNC) &sparsio_write_svmlight_cpp, 4},
{NULL, NULL, 0}
};

RcppExport void R_init_sparsio(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
2 changes: 1 addition & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
library(testthat)
library(sparsio)
test_package("sparsio")
test_check("sparsio")

0 comments on commit 6bd8cbd

Please sign in to comment.