# NOT RUN {
x <- c(NA, '3', '-', -233456789, -2334567890, 10^(0:10))
f_data(x)
f_data(x, pad.char = NA)
f_data(x, mix.units = TRUE)
f_data(x, mix.units = TRUE, binary = TRUE)
f_data(x, mix.units = TRUE, binary = TRUE, digits = 2)
f_byte(100000000, from = 'GB', binary = TRUE)
f_giga(10000000000)
f_giga(10000000000, suffix = 'Gb')
library(tidyverse)
set.seed(15)
dat <- data_frame(
bytes = round(rnorm(7, 1e7, 7.95e6), 0),
days = constant_weekdays %>%
as_factor()
)
dat %>%
mutate(
data = f_data(bytes, less.than.replace = TRUE),
weekday = f_weekday(days, distinct = TRUE) %>%
as_factor()
)
dat %>%
mutate(days = days %>% as_factor()) %>%
ggplot(aes(days, bytes, group = 1)) +
geom_line() +
geom_point() +
scale_y_continuous(labels = f_data) +
scale_x_discrete(labels = ff_weekday(distinct = TRUE))
# }
Run the code above in your browser using DataLab