Skip to content

Commit f3fdd8b

Browse files
author
Jordan S Read
authored
Merge pull request #466 from lindsaycarr/master
function camel case changes
2 parents 9f856e0 + 32dd801 commit f3fdd8b

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

R/legend.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ draw_legend <- function(gsplot) {
9090
if (legend$draw) {
9191
par(xpd=TRUE)
9292

93-
legend <- appendLegendColumnInfo(legend)
94-
legend <- appendLegendPositionConfiguration(legend)
93+
legend <- append_legend_column_info(legend)
94+
legend <- append_legend_position_config(legend)
9595
# set required legend argument to NA if not exists
9696
if (!"legend" %in% names(legend)) {
9797
legend$legend <- NA
@@ -115,7 +115,7 @@ draw_legend <- function(gsplot) {
115115
}
116116
}
117117

118-
appendLegendPositionConfiguration <- function(legend) {
118+
append_legend_position_config <- function(legend) {
119119
#TODO support explicit x/y coords
120120
legend_offset <- legend$legend_offset
121121
location <- legend$location
@@ -139,7 +139,7 @@ appendLegendPositionConfiguration <- function(legend) {
139139
#' Based on location set legend columns
140140
#'
141141
#' @param legend to set columns on
142-
appendLegendColumnInfo <- function(legend) {
142+
append_legend_column_info <- function(legend) {
143143
location <- legend[['location']]
144144
if (location == "below" || location == "above") {
145145
itemsPerCol <- 3 # TODO load this from config

R/utils-list.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ strip_pts <- function(list, param){
3737
if(is.list(v.vals)){
3838
v.vals <- strip_pts(v.vals, param)
3939
}
40-
out <- append_keepTZ(out, v.vals, tz=attr(v.vals, 'tzone'))
40+
out <- append_keep_tz(out, v.vals, tz=attr(v.vals, 'tzone'))
4141
all.na <- all(is.na(v.vals))
4242
out.class <- ifelse(!all.na, class(v.vals), out.class)
4343
if(all.na){
@@ -48,25 +48,25 @@ strip_pts <- function(list, param){
4848
u.list <- unname_c(list[sapply(list, is.list)])
4949
if(v %in% names(u.list) && !inherits(u.list[[v]], c('function','formula'))) {
5050
v.vals <- u.list[[v]]
51-
out <- append_keepTZ(out, v.vals, tz=attr(v.vals, 'tzone'))
51+
out <- append_keep_tz(out, v.vals, tz=attr(v.vals, 'tzone'))
5252
all.na <- all(is.na(v.vals))
5353
out.class <- ifelse(!all.na, class(v.vals), out.class)
5454
if(all.na){
5555
class(out) <- out.class
5656
}
5757
} else if (any(sapply(u.list, function(x) any(names(x) %in% v)))) {
5858
v.vals <- u.list[[which(sapply(u.list, function(x) any(names(x) %in% v)))]][[v]]
59-
out <- append_keepTZ(out, v.vals, tz=attr(v.vals, 'tzone'))
59+
out <- append_keep_tz(out, v.vals, tz=attr(v.vals, 'tzone'))
6060
all.na <- all(is.na(v.vals))
6161
out.class <- ifelse(!all.na, class(v.vals), out.class)
6262
if(all.na){
6363
class(out) <- out.class
6464
}
6565
} else {
66-
out <- append_keepTZ(out, NA, tz=attr(out, "tzone"))
66+
out <- append_keep_tz(out, NA, tz=attr(out, "tzone"))
6767
}
6868
} else
69-
out <- append_keepTZ(out, NA, tz=attr(out, "tzone"))
69+
out <- append_keep_tz(out, NA, tz=attr(out, "tzone"))
7070
}
7171

7272
}
@@ -94,7 +94,7 @@ strip_pts2 <- function(data, param) {
9494
# append without losing timezones for the case where
9595
# append.vals is POSIX and base.vals is NULL
9696
# also handles adding NA to POSIXct vals
97-
append_keepTZ <- function(base.vals, append.vals, tz=NULL){
97+
append_keep_tz <- function(base.vals, append.vals, tz=NULL){
9898
vals <- append(base.vals, append.vals)
9999
attr(vals,"tzone") <- tz
100100
return(vals)

R/utils-side.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ set_side_lim <- function(args, side, side.num){
208208
if(any(free.lim)){
209209
side.vals <- strip_pts(args, include)
210210
if (any(!is.na(side.vals))){
211-
data.range <- range(append_keepTZ(base.vals=side.vals[is.finite(side.vals)],
211+
data.range <- range(append_keep_tz(base.vals=side.vals[is.finite(side.vals)],
212212
append.vals=side$lim,
213213
tz=attr(side.vals, 'tzone')),
214214
na.rm = TRUE)
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)