View source: R/plot_file_distribution.R
plot_file_distribution | R Documentation |
Plot Distributions of Files in Folder Depths and Name Summaries
plot_file_distribution(file_data, start_path, n_root_parts, ..., to_pdf = TRUE)
file_data |
data frame with columns |
start_path |
only paths from |
n_root_parts |
number of first path segments to be considered as "root" |
... |
further arguments passed to
|
to_pdf |
if |
# Set a seed for the random number generator set.seed(20190625) # Create random paths paths <- kwb.pathdict::random_paths() # Number of paths n <- length(paths) # Create artificial file data (invent sizes) file_data <- kwb.utils::noFactorDataFrame( path = paths, type = "file", size = abs(rnorm(n)) * kwb.fakin:::bytes_to_mib( 2^sample(30, n, replace = TRUE) ) ) kwb.fakin::plot_file_distribution( file_data, start_path = "reason", n_root_parts = 1, to_pdf = FALSE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.