Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Fix #207
Browse files Browse the repository at this point in the history
  • Loading branch information
randyzwitch committed Mar 3, 2017
1 parent 565e2d5 commit f8141e0
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RSiteCatalyst
Type: Package
Title: R Client for Adobe Analytics API V1.4
Version: 1.4.10.20170301
Date: 2017-03-01
Version: 1.4.10.20170303
Date: 2017-03-03
Author: Willem Paling, Randy Zwitch & Jowanza Joseph
Maintainer: Randy Zwitch <rzwitch+rsitecatalyst@gmail.com>
Depends:
Expand Down
11 changes: 11 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
RSiteCatalyst 1.4.11
=================

* Fixed issue with QueueDatawarehouse not returning the proper number of results when enqueueOnly = FALSE, fixed encoding for UTF-8-BOM (#198)

* Added GetClickMapReporting, GetPreviousServerCalls (work towards #179)

* Fixed parser for GetFeeds, to unnest `activity` data frame into discrete columns

* Fixed issue where message 'Error in if (!is.null(elements[i, ]$classification) && nchar(elements[i, : missing value where TRUE/FALSE needed' displayed when using multiple elements (#207)

RSiteCatalyst 1.4.10
=================

Expand Down
3 changes: 2 additions & 1 deletion R/BuildInnerBreakdownsRecursively.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ BuildInnerBreakdownsRecursively <- function(parent.element,elements,metrics,
names(outer.elements) <- "name"

# build named elements, with classifications if they exist
#RZ: Have no idea why is.na and is.null and nchar is here, with is.na fixing GitHub #207
elements.named <- elements$id
for(i in 1:nrow(elements)) {
if(!is.null(elements[i,]$classification) && !is.na(elements[i,]$classification)) {
if(!is.na(elements[i,]$classification) && !is.null(elements[i,]$classification) && nchar(elements[i,]$classification) > 0) {
elements.named[i] <- paste0(elements[i,]$id,": ",elements[i,]$classification)
}
}
Expand Down
4 changes: 2 additions & 2 deletions R/RSiteCatalyst.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Package: RSiteCatalyst \cr
#' Type: Package \cr
#' Version: 1.4.10.20170301 \cr
#' Date: 2017-03-01 \cr
#' Version: 1.4.10.20170303 \cr
#' Date: 2017-03-03 \cr
#' License: MIT + file LICENSE \cr
#'
#'
Expand Down
4 changes: 2 additions & 2 deletions man/RSiteCatalyst.Rd

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

24 changes: 24 additions & 0 deletions tests/testthat/test-queuetrended.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,28 @@ test_that("Validate QueueTrended using legacy credentials", {

#Validate returned value is a numeric
expect_is(ss, "numeric")

#GitHub issue 207, fixes Error in if (!is.null(elements[i, ]$classification) && nchar(elements[i, :
#missing value where TRUE/FALSE needed
issue207 <- QueueTrended(
reportsuite.id = "zwitchdev",
date.from = "2016-02-01",
date.to = "2016-02-01",
top ="1000",
metrics = c("visits"),
elements = c("page", "mobiledevicetype"),
classification = "JuliaPages",
date.granularity = "week",
segment.id = "",
data.current = TRUE,
expedite = FALSE,
interval.seconds = 5,
max.attempts = 10000,
validate = TRUE,
enqueueOnly = FALSE
)

#Validate returned value is a data.frame
expect_is(issue207, "data.frame")

})

0 comments on commit f8141e0

Please sign in to comment.