size = 1/{N∗⌈log_2(N)⌉∗[(1/70)/60]}
How can I plot this function with R?
(⌈⌉= ceil)
With label "size" for y-axis and "N" for x-axis.
N >= 2, N is natural Number (2,3,4,5,6,...)
size = 1/{N∗⌈log_2(N)⌉∗[(1/70)/60]}
How can I plot this function with R?
(⌈⌉= ceil)
With label "size" for y-axis and "N" for x-axis.
N >= 2, N is natural Number (2,3,4,5,6,...)
Let's define the function
f <- function(N) 1 / (N * ceiling(log2(N)) * 1/70/60)
Plot with base R in the range [1,20]
curve(f, from = 1, to = 20, n = 10^3, type = "p", cex = 0.1)
Plot with ggplot2
in the range [1,20]
library(ggplot2)
ggplot(data.frame(N = c(1, 20)), aes(N)) + stat_function(fun = f, geom = "point")