Skip to content

Commit

Permalink
Tidy up printing and unneeded variables
Browse files Browse the repository at this point in the history
  • Loading branch information
chschan committed Jan 20, 2020
1 parent 8dd1a2e commit f4fdccb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: flipStartup
Type: Package
Title: Analytics for startups
Version: 1.2.2
Version: 1.2.3
Author: Displayr <opensource@displayr.com>
Maintainer: Displayr <opensource@displayr.com>
Description: Various analytics to assist in the analysis of the performance of startups.
Expand Down
6 changes: 0 additions & 6 deletions R/pricesensitivitymeter.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#' At what price would you consider this product/brand to be
#' 1) Very cheap, 2) Cheap, 3) Expensive, 4) Very expensive.
#' @param weights A numeric vector with length equal to the number of rows in \code{x}.
#' @param resolution Numeric; controls the intervals between which "Proportion of respondents"
#' is computed.
#' @param currency Character; Currency symbol to prepend to the intersection labels. These
#' will also be used to set the default prefix to the x tick labels and hovertext.
#' @param intersection.show Logical; Whether to show labels to the intersection points of the lines.
Expand Down Expand Up @@ -36,7 +34,6 @@ PriceSensitivityMeter <- function(x,
colors = c("#FF0000", "#FF0000", "#008000", "#008000"),
line.type = c("dot", "solid", "solid", "dot"),
line.thickness = c(1, 2, 2, 1),
resolution = NULL,
currency = "$",
global.font.family = "Arial",
global.font.color = rgb(44, 44, 44, maxColorValue = 255),
Expand Down Expand Up @@ -165,7 +162,6 @@ propLessorEqual <- function(vals, pts, wgts)
}
}
res <- cumsum(res)/denom
print(res)
}

# Calculates proportion more than or equal to
Expand All @@ -183,11 +179,9 @@ propGreatorEqual <- function(vals, pts, wgts)
{
while(j <= length(vals) && vals[ord[j]] >= pts[i])
{
#cat("Comparing", vals[ord[j]], "to", pts[i]
res[i] <- res[i] + wgts[ord[j]]
j <- j + 1
}
}
res <- rev(cumsum(res)/denom)
print(res)
}
1 change: 0 additions & 1 deletion man/PriceSensitivityMeter.Rd

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

0 comments on commit f4fdccb

Please sign in to comment.