R: round() can find object, sprintf() cannot, why? - r

I have a function that takes a dataframe and plots a number of columns from that data frame using ggplot2. The aes() function in ggplot2 takes a label argument and I want to use sprintf to format that argument - and this is something I have done many times before in other code. When I pass the format string to sprintf (in this case "%1.1f") it says "object not found". If I use the round() function and pass an argument to that function it can find it without problems. Same goes for format(). Apparently only sprintf() is unable to see the object.
At first I thought this was a lazy evaluation issue caused by calling the function rather than using the code inline, but using force() on the format string I pass to sprintf does not resolve the issue. I can work around this, but I would like to know why it happens. Of course, it may be something trivial that I have overlooked.
Q. Why does sprintf() not find the string object?
Code follows (edited and pruned for more minimal example)
require(gdata)
require(ggplot2)
require(scales)
require(gridExtra)
require(lubridate)
require(plyr)
require(reshape)
set.seed(12345)
# Create dummy time series data with year and month
monthsback <- 64
startdate <- as.Date(paste(year(now()),month(now()),"1",sep = "-")) - months(monthsback)
mydf <- data.frame(mydate = seq(as.Date(startdate), by = "month", length.out = monthsback), myvalue5 = runif(monthsback, min = 200, max = 300))
mydf$year <- as.numeric(format(as.Date(mydf$mydate), format="%Y"))
mydf$month <- as.numeric(format(as.Date(mydf$mydate), format="%m"))
getchart_highlight_value <- function(
plotdf,
digits_used = 1
)
{
force(digits_used)
#p <- ggplot(data = plotdf, aes(x = month(mydate, label = TRUE), y = year(mydate), fill = myvalue5, label = round(myvalue5, digits_used))) +
# note that the line below using sprintf() does not work, whereas the line above using round() is fine
p <- ggplot(data = plotdf, aes(x = month(mydate, label = TRUE), y = year(mydate), fill = myvalue5, label = sprintf(paste("%1.",digits_used,"f", sep = ""), myvalue5))) +
scale_x_date(labels = date_format("%Y"), breaks = date_breaks("years")) +
scale_y_reverse(breaks = 2007:2012, labels = 2007:2012, expand = c(0,0)) +
geom_tile() + geom_text(size = 4, colour = "black") +
scale_fill_gradient2(low = "blue", high = "red", limits = c(min(plotdf$myvalue5), max(plotdf$myvalue5)), midpoint = median(plotdf$myvalue5)) +
scale_x_discrete(expand = c(0,0)) +
opts(panel.grid.major = theme_blank()) +
opts(panel.background = theme_rect(fill = "transparent", colour = NA)) +
png(filename = "c:/sprintf_test.png", width = 700, height = 300, units = "px", res = NA)
print(p)
dev.off()
}
getchart_highlight_value (plotdf <- mydf,
digits_used <- 1)

Using the minimal example of Martin (that is a minimal example, see also this question), you can make the code work by specifying the environment ggplot() should use. For that, specify the argument environment in the ggplot() function, eg like this:
require(ggplot2)
getchart_highlight_value <- function(df)
{
fmt <- "%1.1f"
ggplot(df, aes(x, x, label=sprintf(fmt, lbl)),
environment = environment()) +
geom_tile(bg="white") +
geom_text(size = 4, colour = "black")
}
df <- data.frame(x = 1:5, lbl = runif(5))
getchart_highlight_value (df)
The function environment() returns the current (local) environment, which is the environment created by the function getchart_highlight_value(). If you don't specify this, ggplot() will look in the global environment, and there the variable fmt is not defined.
Nothing to do with lazy evaluation, everything to do with selecting the right environment.
The code above produces following plot:

Here's a minimal-er example
require(ggplot2)
getchart_highlight_value <- function(df)
{
fmt <- "%1.1f"
ggplot(df, aes(x, x, label=sprintf(fmt, lbl))) + geom_tile()
}
df <- data.frame(x = 1:5, lbl = runif(5))
getchart_highlight_value (df)
It fails with
> getchart_highlight_value (df)
Error in sprintf(fmt, lbl) : object 'fmt' not found
If I create fmt in the global environment then everything is fine; maybe this explains the 'sometimes it works' / 'it works for me' comments above.
> sessionInfo()
R version 2.15.0 Patched (2012-05-01 r59304)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_0.9.1
loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 grid_2.15.0
[5] labeling_0.1 MASS_7.3-18 memoise_0.1 munsell_0.3
[9] plyr_1.7.1 proto_0.3-9.2 RColorBrewer_1.0-5 reshape2_1.2.1
[13] scales_0.2.1 stringr_0.6

Related

Is there a way to subset data in ggrepel with data inherited from the pipe? [duplicate]

I am trying to subset a layer of a plot where I am passing the data to ggplot through a pipe.
Here is an example:
library(dplyr)
library(ggplot2)
library(scales)
set.seed(12345)
df_example = data_frame(Month = rep(seq.Date(as.Date("2015-01-01"),
as.Date("2015-12-31"), by = "month"), 2),
Value = sample(seq.int(30, 150), size = 24, replace = TRUE),
Indicator = as.factor(rep(c(1, 2), each = 12)))
df_example %>%
group_by(Month) %>%
mutate(`Relative Value` = Value/sum(Value)) %>%
ungroup() %>%
ggplot(aes(x = Month, y = Value, fill = Indicator, group = Indicator)) +
geom_bar(position = "fill", stat = "identity") +
theme_bw()+
scale_y_continuous(labels = percent_format()) +
geom_line(aes(x = Month, y = `Relative Value`))
This gives:
I would like only one of those lines to appear, which I would be able to do if something like this worked in the geom_line layer:
geom_line(subset = .(Indicator == 1), aes(x = Month, y = `Relative Value`))
Edit:
Session info:
R version 3.2.1 (2015-06-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Server 2012 x64
(build 9200)
locale: 2 LC_COLLATE=English_United States.1252
LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United
States.1252 LC_NUMERIC=C [5]
LC_TIME=English_United States.1252
attached base packages: 2 stats graphics grDevices utils
datasets methods base
other attached packages: 2 scales_0.3.0 lubridate_1.3.3
ggplot2_1.0.1 lazyeval_0.1.10 dplyr_0.4.3 RSQLite_1.0.0
readr_0.2.2 [8] RJDBC_0.2-5 DBI_0.3.1 rJava_0.9-7
loaded via a namespace (and not attached): 2 Rcpp_0.12.2
knitr_1.11 magrittr_1.5 MASS_7.3-40 munsell_0.4.2
lattice_0.20-31 [7] colorspace_1.2-6 R6_2.1.1 stringr_1.0.0
plyr_1.8.3 tools_3.2.1 parallel_3.2.1 [13] grid_3.2.1
gtable_0.1.2 htmltools_0.2.6 yaml_2.1.13 assertthat_0.1
digest_0.6.8 [19] reshape2_1.4.1 memoise_0.2.1
rmarkdown_0.8.1 labeling_0.3 stringi_1.0-1 zoo_1.7-12
[25] proto_0.3-10
tl;dr: Pass the data to that layer as a function that subsets the plot's data according to your criteria.
According to ggplots documentation on layers, you have 3 options when passing the data to a new layer:
If NULL, the default, the data is inherited from the plot data as specified in the call to ggplot().
A data.frame, or other object, will override the plot data. All objects will be fortified to produce a data frame. See fortify() for
which variables will be created.
A function will be called with a single argument, the plot data. The return value must be a data.frame, and will be used as the
layer data.
The first two options are the most usual ones, but the 3rd is perfect for our needs when the data has been modified through pyps.
In your example, adding data = function(x) subset(x,Indicator == 1) to the geom_line does the trick:
library(dplyr)
library(ggplot2)
library(scales)
set.seed(12345)
df_example = data_frame(Month = rep(seq.Date(as.Date("2015-01-01"),
as.Date("2015-12-31"), by = "month"), 2),
Value = sample(seq.int(30, 150), size = 24, replace = TRUE),
Indicator = as.factor(rep(c(1, 2), each = 12)))
df_example %>%
group_by(Month) %>%
mutate(`Relative Value` = Value/sum(Value)) %>%
ungroup() %>%
ggplot(aes(x = Month, y = Value, fill = Indicator, group = Indicator)) +
geom_bar(position = "fill", stat = "identity") +
theme_bw()+
scale_y_continuous(labels = percent_format()) +
geom_line(data = function(x) subset(x,Indicator == 1), aes(x = Month, y = `Relative Value`))
This is the resulting plot
library(dplyr)
library(ggplot2)
library(scales)
set.seed(12345)
df_example = data_frame(Month = rep(seq.Date(as.Date("2015-01-01"),
as.Date("2015-12-31"), by = "month"), 2),
Value = sample(seq.int(30, 150), size = 24, replace = TRUE),
Indicator = as.factor(rep(c(1, 2), each = 12)))
df_example %>%
group_by(Month) %>%
mutate(`Relative Value` = Value/sum(Value)) %>%
ungroup() %>%
ggplot(aes(x = Month, y = Value, fill = Indicator, group = Indicator)) +
geom_bar(position = "fill", stat = "identity") +
theme_bw()+
scale_y_continuous(labels = percent_format()) +
geom_line(aes(x = Month, y = `Relative Value`,linetype=Indicator)) +
scale_linetype_manual(values=c("1"="solid","2"="blank"))
yields:
You might benefit from stat_subset(), a stat I made for my personal use that is available in metR: https://eliocamp.github.io/metR/articles/Visualization-tools.html#stat_subset
It has an aesthetic called subset that takes a logical expression and subsets the data accordingly.
library(dplyr)
library(ggplot2)
library(scales)
set.seed(12345)
df_example = data_frame(Month = rep(seq.Date(as.Date("2015-01-01"),
as.Date("2015-12-31"), by = "month"), 2),
Value = sample(seq.int(30, 150), size = 24, replace = TRUE),
Indicator = as.factor(rep(c(1, 2), each = 12)))
df_example %>%
group_by(Month) %>%
mutate(`Relative Value` = Value/sum(Value)) %>%
ungroup() %>%
ggplot(aes(x = Month, y = Value, fill = Indicator, group = Indicator)) +
geom_bar(position = "fill", stat = "identity") +
theme_bw()+
scale_y_continuous(labels = percent_format()) +
metR::stat_subset(aes(x = Month, y = `Relative Value`, subset = Indicator == 1),
geom = "line")

geom_col is not using stat_identify when values are rounded to whole numbers

I'm trying to use geom_col to chart columns for values in time series (annual and quarterly).
When I use Zoo package's YearQtr datatype for the x-axis values and I round the y-axis values to a whole number, geom_col appears to not use the default postion = 'identity' for determining the column bar heights based on the y-value of each occurrence. Instead it appears to switch to position = 'count' and treats the rounded y-values as factors, counting the number of occurrences for each factor value (e.g., 3 occurrences have a rounded y-value = 11)
If I switch to geom_line, the graph is fine with quarterly x-axis values and rounded y-axis values.
library(zoo)
library(ggplot2)
Annual.Periods <- seq(to = 2020, by = 1, length.out = 8) # 8 years
Quarter.Periods <- as.yearqtr(seq(to = 2020, by = 0.25, length.out = 8)) # 8 Quarters
Values <- seq(to = 11, by = 0.25, length.out = 8)
Data.Annual.Real <- data.frame(X = Annual.Periods, Y = round(Values, 1))
Data.Annual.Whole <- data.frame(X = Annual.Periods, Y = round(Values, 0))
Data.Quarter.Real <- data.frame(X = Quarter.Periods, Y = round(Values, 1))
Data.Quarter.Whole <- data.frame(X = Quarter.Periods, Y = round(Values, 0))
ggplot(data = Data.Annual.Real, aes(X, Y)) + geom_col()
ggplot(data = Data.Annual.Whole, aes(X, Y)) + geom_col()
ggplot(data = Data.Quarter.Real, aes(X, Y)) + geom_col()
ggplot(data = Data.Quarter.Whole, aes(X, Y)) + geom_col() # appears to treat y-values as factors and uses position = 'count' to count occurrences (e.g., 3 occurrences have a rounded Value = 11)
ggplot(data = Data.Quarter.Whole, aes(X, Y)) + geom_line()
rstudioapi::versionInfo()
# $mode
# [1] "desktop"
#
# $version
# [1] ‘1.3.959’
#
# $release_name
# [1] "Middlemist Red"
sessionInfo()
# R version 4.0.0 (2020-04-24)
# Platform: x86_64-apple-darwin17.0 (64-bit)
# Running under: macOS Mojave 10.14.6
#
# Matrix products: default
# BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
# LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
#
# locale:
# [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] ggplot2_3.3.1 zoo_1.8-8
ggplot tries to guess the orientation of its geom_col()-function, meaning which variable serves as the base of the bars and which as the values to represent. Apparently without any decimal numbers in your Y- variable it choses it as it's base (it stays numeric though, no conversion to factor), and sums up your quarters.
For cases like this you can provide geom_col() with the information what variable to use as the base of the bars via the orientation=argument:
ggplot(data = Data.Quarter.Whole, aes(X, Y)) + geom_col(orientation = "x")
EDIT: I have just seen that Roman answered it in the comments.

Blank Plot Output when using "geom_xspline" in ggalt package

When trying to use geom_xspline from ggalt in conjunction with ggarrange from ggpubr, the output is blank and no other plot can be made before clearing with dev.off().
In my use-case I wanted the geom_xspline to replace some exisitng geom_line in my ggplot object. Is anyone aware of issues using geoms added from other R packages?
Here is some code to compare, nothing of interest really, just to give a reproducible example:
Initial Working Code w/o geom_xspline
library(ggplot2)
library(ggpubr)
myplot = ggplot(data = mtcars, aes(x = wt, y = mpg)) +
geom_line()
ggarrange(myplot, myplot) # Works and outputs fine
Code that fails with ggalt package
library(ggalt)
library(ggplot2)
library(ggpubr)
myplot = ggplot(data = mtcars, aes(x = wt, y = mpg)) +
geom_xspline()
ggarrange(myplot, myplot) # Output becomes blank and freezes the plot panel
Alternative Method
Instead of using ggarrange I tried the function grid_arrange_shared_legend from this link, which uses grid and gridExtra. However, I am still curious as to why ggarrange does not work.
Here is my session info:
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggpubr_0.1.8 magrittr_1.5 ggplot2_3.0.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.18 pillar_1.3.0 compiler_3.5.1 RColorBrewer_1.1-2 plyr_1.8.4 bindr_0.1.1
[7] tools_3.5.1 extrafont_0.17 tibble_1.4.2 gtable_0.2.0 pkgconfig_2.0.1 rlang_0.2.1
[13] rstudioapi_0.7 yaml_2.2.0 bindrcpp_0.2.2 Rttf2pt1_1.3.7 withr_2.1.2 dplyr_0.7.6
[19] maps_3.3.0 grid_3.5.1 ggalt_0.4.0 tidyselect_0.2.4 cowplot_0.9.3 glue_1.3.0
[25] R6_2.2.2 purrr_0.2.5 extrafontdb_1.0 scales_1.0.0 MASS_7.3-50 assertthat_0.2.0
[31] proj4_1.0-8 colorspace_1.3-2 labeling_0.3 KernSmooth_2.23-15 ash_1.0-15 lazyeval_0.2.1
[37] munsell_0.5.0 crayon_1.3.4
Quick addition, if I convert the object to a ggplotGrob(), it will work with ggarrange, but it will fail when I attempt to use common.legend = T.
Well I am not sure why ggpubr::ggarrange causes failure of Plots pannel when used with ggalt::geom_xspline but I can tell you that plots are still getting created but just now shown on the plot pannel.
So it seems that using those together causes failure in the graphing device and it is only happening for ggalt::geom_xspline and not all the geoms in ggalt. That is a bug so you are on the right track posting to GitHub.
You can check that by running the code below:
library(ggalt)
library(ggplot2)
library(ggpubr)
myplot = ggplot(data = mtcars, aes(x = wt, y = mpg)) +
geom_xspline()
myplot
g <- ggarrange(myplot, myplot) # Output becomes blank and freezes the plot panel
g
jpeg('rplot.jpg')
g
dev.off()
#> pdf
#> 3
Created on 2019-05-30 by the reprex package (v0.3.0)
And this is the saved plot:
The xspline function, upon whichgeom_xspline is based, typically automatically plots using graphics. This led the ggalt package authors to find a few work-arounds to ensure it would play nicely with ggplot. My rough solutions both involve creating or adjusting a geom or stat from ggplot without using xspline. This makes it easier to use without a lot of pre-processing the data prior to ingesting with ggplot.
(1) New stat using splines
Using spline for interpolation of points instead of xspline.
# Create a new stat (adjusted from ggalt GitHub page)
stat_spline <- function(mapping = NULL, data = NULL, geom = "line",
position = "identity", na.rm = TRUE, show.legend = NA, inherit.aes = TRUE,
n=200, method = "fmm", ...) { # Just picking a rough default for n
layer(
stat = StatSpline,
data = data,
mapping = mapping,
geom = geom,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(n=n,
method=method,
na.rm = na.rm,
...
)
)
}
StatSpline <- ggproto("StatSpline", Stat,
required_aes = c("x", "y"),
compute_group = function(self, data, scales, params,
n=200, method = "fmm") {
tmp <- spline(data$x, data$y, n = n, method = method, ties = mean)
data.frame(x=tmp$x, y=tmp$y)
}
)
# Plot with ggarrange
myplot = ggplot(data = mtcars, aes(x = wt, y = mpg)) +
stat_spline(mapping = aes(x = wt, y = mpg)) +
geom_point()
ggpubr::ggarrange(myplot, myplot)
This method isn't ideal if you want splines similar to Catmull-Rom instead of Cubic; you can see some large bends between control points.
(2) New geom using xsplineGrob
This is a slightly adjusted version of geom_xspline2 from ggalt
# Create new geom based upon code from ggalt GitHub page
GeomXSpline3 <- ggproto("GeomXSpline3", Geom,
required_aes = c("x", "y"),
default_aes = aes(colour = "black", shape=-1, open=T),
draw_key = draw_key_point,
draw_panel = function(data, panel_params, coord) {
coords <- coord$transform(data, panel_params)
grid::xsplineGrob(
coords$x, coords$y,
shape = coords$shape,
open = coords$open[1],
gp = grid::gpar(col = coords$colour)
)
}
)
geom_xspline3 <- function(mapping = NULL, data = NULL, stat = "identity",
position = "identity", na.rm = FALSE, show.legend = NA,
inherit.aes = TRUE, ...) {
layer(
geom = GeomXSpline3, mapping = mapping, data = data, stat = stat,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, ...)
)
}
# Plot with ggarrange
myplot = ggplot(data = mtcars, aes(x = wt, y = mpg)) +
geom_xspline3(shape = -.25) + geom_point()
ggpubr::ggarrange(myplot, myplot)
There were a couple issues with ensuring the shape parameter still accepted inputs between -1 and 1, however, this seems to be working okay now with ggarrange.
I used the following resources while writing this solution:
A blog post from an author from ggalt
The GitHub page for geom_xspline and geom_xspline2
ggplot vignette on extending ggplot

Bar chart in plotly *flies* when deselecting variables

Im facing some issues with ggplot2 and plotly. When creating a bar chart with ggplot2 and pass it into the function ggplotly the bars are mid air when deselecting variables. The graph is not behaving as the examples here
.
Example:
library(ggplot2)
library(reshape2)
library(plotly)
df1 <- data.frame("Price" = rnorm(3, mean = 100, sd = 4),
"Type" = paste("Type", 1:3))
df2 <- data.frame("Price" = rnorm(3, mean = 500, sd = 4),
"Type" = paste("Type", 1:3))
df <- rbind(df1, df2)
df$Dates <- rep(c("2017-01-01", "2017-06-30"), 3)
df <- melt(df, measure.vars = 3)
p <- ggplot(df, aes(fill=Type, y=Price, x=value)) +
geom_bar(stat="identity", position = "stack")
ggplotly(p)
Im running on following:
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252 LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C
[5] LC_TIME=Swedish_Sweden.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zoo_1.8-0 dygraphs_1.1.1.4 plotly_4.7.0.9000 reshape2_1.4.2 ggplot2_2.2.1.9000 lubridate_1.6.0 readxl_1.0.0
Thanks!
I think the problem is in the interaction between ggplot2 and plotly.
Use plot_ly function directly
p <- plot_ly(df, x = ~value, y = ~Price, type = 'bar',split=~Type) %>%
layout(yaxis = list(title = 'Count'), barmode = 'stack')
p

rolling median in ggplot2

I would like to add rolling medians to my data in ggplot2. Calculating the rolling median in the ggplot aes and in the data.frame itself do not produce similar results (see plots).
I am looking for a solution within ggplot2 that produces the same results as in the data.frame calculation. I know this can be done with ggseas::stat_rollapplyr, but would prefer a solution in base ggplot2.
code;
library(ggplot2)
library(data.table)
library(zoo)
library(gridExtra)
# set up dummy data
set.seed(123)
x = data.table(
date = rep( seq(from = as.Date("2016-01-01"), to = as.Date("2016-04-01"), by = "day"), 2),
y = c(5 + runif(92), 6 + runif(92)),
label = c(rep("A", 92), rep("B", 92))
)
x[, `:=` (
roll = rollmedian(y, k = 15, fill = NA, align = "center")
), by = label]
# plots
theme_set(theme_bw())
p = ggplot(x) +
geom_line(aes(date, y), col = "lightgrey") +
facet_wrap(~label)
# within aes
p1 = p +
geom_line(aes(date, rollmedian(y, k = 15, fill = NA, align = "center"))) +
labs(title = "within aes")
# calculated in data.frame
p2 = p +
geom_line(aes(date, roll)) +
labs(title = "within data.frame")
grid.arrange(p1, p2)
sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=nl_NL.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=nl_NL.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=nl_NL.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zoo_1.7-13 magrittr_1.5 data.table_1.9.7 ggplot2_2.1.0.9000
loaded via a namespace (and not attached):
[1] labeling_0.3 colorspace_1.2-6 scales_0.4.0 assertthat_0.1 plyr_1.8.4 rsconnect_0.4.3 tools_3.2.3 gtable_0.2.0 tibble_1.2 Rcpp_0.12.
7 grid_3.2.3 munsell_0.4.3
[13] lattice_0.20-33

Resources