Skip to content

Commit

Permalink
Merge pull request #73 from koheiw/add-concatenator
Browse files Browse the repository at this point in the history
Save concatenator
  • Loading branch information
koheiw authored Feb 21, 2024
2 parents b96c498 + 6617718 commit c97e024
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/textmodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ textmodel_newsmap.dfm <- function(x, y, label = c("all", "max"), smooth = 1.0, d
data = x,
weight = NULL,
feature = colnames(model),
concatenator = meta(x, field = "concatenator", type = "object"),
call = match.call(sys.function(-1), call = sys.call(-1)),
version = utils::packageVersion("newsmap"))
if (entropy != "none")
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-textmodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ test_that("methods for textmodel_newsmap works correctly", {

expect_equal(
names(map),
c("model", "entropy", "data", "weight", "feature", "call", "version")
c("model", "entropy", "data", "weight", "feature",
"concatenator", "call", "version")
)

# class association is calculated correctly
Expand Down

0 comments on commit c97e024

Please sign in to comment.