Skip to content

Commit

Permalink
small correction, accidental error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antaldaniel committed Dec 20, 2024
1 parent 607b3a6 commit e86351d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/dataset_to_triples.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dataset_to_triples <- function(x, idcol=NULL) {
is_dataset <- inherits(x, "dataset_df")

if (is_dataset) {
new_title < paste0(dataset_title(x), " [triple form]")
new_title <- paste0(dataset_title(x), " [triple form]")
DataBibentry <- get_bibentry(x)
new_Subject <- subject(x)
}
Expand Down
2 changes: 1 addition & 1 deletion R/defined.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ defined <- function(x,
#' @rdname defined
#' @export
is.defined <- function(x) {
any( inherits(x, "haven_labelled_defined"), inherits(x, "datetime_defined"))
any(inherits(x, "haven_labelled_defined"), inherits(x, "datetime_defined"))
}

#' From haven
Expand Down
2 changes: 1 addition & 1 deletion R/subject.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ subject_create <- function(term,
#}

if (length(term)>1) {
dataset_subject <- lapply (1:length(term), function(x) new_Subject(term[x],
dataset_subject <- lapply (1:seq_along(term), function(x) new_Subject(term[x],
subjectScheme = subjectScheme[x],
schemeURI = schemeURI[x],
classificationCode = classificationCode[x],
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-var_namespace.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ test_that("set_namespace_attribute() works", {


test_that("`var_namespace<-` works", {
var_namespace(qid) <- "https://www.wikibase.se/"
qid <- defined(c("Q275912", "Q116196078"), namespace = "https://www.wikidata.org/wiki/")
var_namespace(qid) <- "https://www.wikibase.se/"
expect_equal(get_namespace_attribute(qid), "https://www.wikibase.se/")
expect_error(var_namespace(qid) <- c("https://www.wikidata.org/wiki/", "https://www.wikiba.se/"))
})
Expand Down

0 comments on commit e86351d

Please sign in to comment.