Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3342900

Browse files
author
Jonathan Chang
committed
Merge pull request #1 from doobwa/master
Fix warning related to namespace issues.
2 parents 60113d9 + 17d4d0f commit 3342900

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

pkg/DESCRIPTION

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ Maintainer: Jonathan Chang <[email protected]>
88
Description: This package implements the Fast Learning of Ising Models (FLIM) technique which aims to perform inference and learning for large-scale fully-connected pairwise Ising models.
99
License: LGPL
1010
LazyLoad: yes
11+
Depends: methods, Rcpp (>= 0.9.7)
12+
LinkingTo: Rcpp
13+
RcppModules: Rflim
14+

pkg/NAMESPACE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import(methods)
2-
importClassesFrom(Rcpp, "C++Object", "C++Class", "Module")
31
useDynLib(Rflim)
4-
export(Flim)
2+
import(Rcpp)
53
export(count.pairs)
4+
export(flim)

pkg/R/Flim.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flim <- function(singleton.counts,
1+
flim <- function(singleton.counts,
22
pairwise.counts,
33
document.count,
44
beta.1 = 0.1,
@@ -13,8 +13,7 @@ Flim <- function(singleton.counts,
1313
stop("Atrocity! Pairwise count indices must be between 1 and N.");
1414
}
1515

16-
flim.obj <- new(.module$Flim, N, beta.1, beta.2)
17-
16+
flim.obj <- new(Flim, N, beta.1, beta.2)
1817

1918
flim.obj$loadCorpus(singleton.counts,
2019
pairwise.counts[,1],

pkg/R/onload.R

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
NAMESPACE <- environment()
2-
.module <- new("Module")
3-
4-
.onLoad <- function(libname, pkgname) {
5-
require(methods)
6-
unlockBinding(".module", NAMESPACE)
7-
assign(".module", Rcpp:::Module("Rflim"), NAMESPACE)
8-
lockBinding(".module", NAMESPACE)
1+
.onLoad <- function(pkgname, libname){
2+
require("methods", character=TRUE, quietly=TRUE)
3+
loadRcppModules()
94
}
10-

tests/cora.test.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pairwise.counts <- subset(data.frame(
1818

1919
save(pairwise.counts, singleton.counts, file="counts.Rdata")
2020

21-
flim.instance <- Flim(singleton.counts,
21+
flim.instance <- flim(singleton.counts,
2222
pairwise.counts,
2323
length(documents),
2424
0.0, 0.0, 15)

0 commit comments

Comments
 (0)