From 8a80417342dae0e8cc6a5864942114e0e5516d6d Mon Sep 17 00:00:00 2001 From: Billy Charlton Date: Mon, 25 Mar 2024 18:16:25 +0100 Subject: [PATCH] rebuild vignettes - devtools::build_vignettes() --- .Rbuildignore | 2 + .gitignore | 2 + DESCRIPTION | 2 +- doc/Exampleproject.R | 6 +- doc/Exampleproject.Rmd | 2 +- doc/Exampleproject.html | 2 +- doc/Introduction.R | 2 +- doc/Namings.R | 2 +- doc/Namings.Rmd | 8 +- doc/Namings.html | 18 +- vignettes/Introduction.html | 394 ------------------------------------ 11 files changed, 25 insertions(+), 415 deletions(-) delete mode 100644 vignettes/Introduction.html diff --git a/.Rbuildignore b/.Rbuildignore index 02bf38a..eb5d9c8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,5 @@ Makefile ^_pkgdown\.yml$ ^docs$ ^pkgdown$ +^doc$ +^Meta$ diff --git a/.gitignore b/.gitignore index 2fc2883..39abdc0 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ test/ dashboard_test/ .sentinel* inst/doc +/doc/ +/Meta/ diff --git a/DESCRIPTION b/DESCRIPTION index 68da867..be93832 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: matsim Type: Package Title: R library for interfacing with MATSim agent-based microsimulation model -Version: 0.2.0 +Version: 0.2.1 Authors@R: c( person("Billy", "Charlton", email = "charlton@vsp.tu-berlin.de", role=c("aut","cre")), person("Oleksandr", "Soboliev", role="aut"), diff --git a/doc/Exampleproject.R b/doc/Exampleproject.R index 5f28a15..918e567 100644 --- a/doc/Exampleproject.R +++ b/doc/Exampleproject.R @@ -1,4 +1,4 @@ -## ---- include=FALSE----------------------------------------------------------- +## ----include=FALSE------------------------------------------------------------ knitr::opts_chunk$set( collapse = TRUE, comment = "#>" @@ -20,10 +20,10 @@ knitr::opts_chunk$set( ## ----eval=FALSE--------------------------------------------------------------- # plot_mainmode_barchart(output_trips) -## ---- eval = FALSE------------------------------------------------------------ +## ----eval = FALSE------------------------------------------------------------- # trips_originating <- process_filter_by_shape(output_trips, leipzig_shp, crs = 25832, spatial_type = "originating" ) -## ---- eval = FALSE------------------------------------------------------------ +## ----eval = FALSE------------------------------------------------------------- # #loading the scenario data # output_trips_scenario <- read_output_trips(trips_file_scenario_path, n_max = 5000) # diff --git a/doc/Exampleproject.Rmd b/doc/Exampleproject.Rmd index 5f609a9..bcd2f7f 100644 --- a/doc/Exampleproject.Rmd +++ b/doc/Exampleproject.Rmd @@ -115,4 +115,4 @@ plot_map_trips(trips_originating, crs = 25832) The result is an interactive map using leaflet, showing the places of origin in blue and the destinations in red. (The following image is a screenshot) -![Leipzig - originating trips](../inst/extdata/Leipzig_map.png) +![Leipzig - originating trips](./Leipzig_map.png) diff --git a/doc/Exampleproject.html b/doc/Exampleproject.html index 0e4b18c..c75a218 100644 --- a/doc/Exampleproject.html +++ b/doc/Exampleproject.html @@ -443,7 +443,7 @@

Maps

origin in blue and the destinations in red. (The following image is a screenshot)

-Leipzig - originating trips +Leipzig - originating trips
Leipzig - originating trips
diff --git a/doc/Introduction.R b/doc/Introduction.R index 32bb24d..929a4e7 100644 --- a/doc/Introduction.R +++ b/doc/Introduction.R @@ -1,4 +1,4 @@ -## ---- include = FALSE--------------------------------------------------------- +## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" diff --git a/doc/Namings.R b/doc/Namings.R index 40d0738..6e0db64 100644 --- a/doc/Namings.R +++ b/doc/Namings.R @@ -1,4 +1,4 @@ -## ---- include = FALSE--------------------------------------------------------- +## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" diff --git a/doc/Namings.Rmd b/doc/Namings.Rmd index e8c08d0..1420b9f 100644 --- a/doc/Namings.Rmd +++ b/doc/Namings.Rmd @@ -17,9 +17,9 @@ knitr::opts_chunk$set( #### Overview -All function names are built using the same naming template. Functions start with a specific verb (e.g. read, plot, process) that describes their main usage. They are sorted into [function types] according to this usage. +All function names are created following the same pattern. They start with a specific verb (e.g. read, plot, process) that describes their main function. They are sorted into [function types] according to this usage. This, and all following naming elements are followed by an underscore. -This, and all following naming elements are followed by an underscore. The second element is optional. It further specifies the type of action that is performed and can be used to distinguish similar functions. In the following guide this element is called [clarification]. An example for this element is [compare], which is used in all functions that compare two data sets. +The second element is optional. It further specifies the type of action that is performed and can be used to distinguish similar functions. In the following guide this element is called [clarification]. An example for this element is [compare], which is used in all functions that compare two data sets. The next element specifies the data or the columns used. For example the column [mainmode] or the MATSim file [output_trips]. @@ -29,7 +29,7 @@ The last element can be used to specify the output type. This is important for t #### Template -So to summarize every naming template looks similar to: +So to summarize, every naming template looks similar to: **[function_type]\_{clarification}\_[data]\_{by}\_{category}\_{and}\_...\_{output_type}** @@ -54,7 +54,7 @@ For processing functions: - filter - convert -**[data]**: Refers to the file or column that the function is handling or manipulating. Examples include "arrtime" (arrival time), "distance" (distance traveled), "mainmode" (main transportation mode). Can be read with the function `str()` +**[data]**: Refers to the file or column that the function is handling or manipulating. Examples include "arrtime" (arrival time), "distance" (distance traveled), "mainmode" (main transportation mode). Can be read with the function `str()`. **{by}**: This part is optional and indicates that the data is filtered or grouped by a specific category or factor. It serves as a connector between the [data] and [category] components. diff --git a/doc/Namings.html b/doc/Namings.html index fcdac54..7ffed66 100644 --- a/doc/Namings.html +++ b/doc/Namings.html @@ -241,13 +241,13 @@

Namings

Overview

-

All function names are built using the same naming template. -Functions start with a specific verb (e.g. read, plot, process) that -describes their main usage. They are sorted into [function types] -according to this usage.

-

This, and all following naming elements are followed by an -underscore. The second element is optional. It further specifies the -type of action that is performed and can be used to distinguish similar +

All function names are created following the same pattern. They start +with a specific verb (e.g. read, plot, process) that describes their +main function. They are sorted into [function types] according to this +usage. This, and all following naming elements are followed by an +underscore.

+

The second element is optional. It further specifies the type of +action that is performed and can be used to distinguish similar functions. In the following guide this element is called [clarification]. An example for this element is [compare], which is used in all functions that compare two data sets.

@@ -264,7 +264,7 @@

Overview

Template

-

So to summarize every naming template looks similar to:

+

So to summarize, every naming template looks similar to:

[function_type]_{clarification}_[data]_{by}_{category}_{and}_…_{output_type}

[function_type]: Describes the type of the function, indicating its primary purpose or operation. For example, “plot” to plot @@ -298,7 +298,7 @@

Template

function is handling or manipulating. Examples include “arrtime” (arrival time), “distance” (distance traveled), “mainmode” (main transportation mode). Can be read with the function -str()

+str().

{by}: This part is optional and indicates that the data is filtered or grouped by a specific category or factor. It serves as a connector between the [data] and [category] components.

diff --git a/vignettes/Introduction.html b/vignettes/Introduction.html deleted file mode 100644 index e9d1278..0000000 --- a/vignettes/Introduction.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - - - - - - - - -Introduction for Matsim R Library - - - - - - - - - - - - - - - - - - - - - - - - - - -

Introduction for Matsim R Library

- - - -
library(matsim)
-#> Warning: vorhergehender Import 'ggplot2::last_plot' durch 'plotly::last_plot'
-#> während des Ladens von 'matsim' ersetzt
-#> Warning: vorhergehender Import 'lubridate::stamp' durch 'reshape::stamp'
-#> während des Ladens von 'matsim' ersetzt
-#> Warning: vorhergehender Import 'plotly::rename' durch 'reshape::rename' während
-#> des Ladens von 'matsim' ersetzt
-#> Warning: vorhergehender Import 'purrr::discard' durch 'scales::discard' während
-#> des Ladens von 'matsim' ersetzt
-#> Warning: vorhergehender Import 'readr::col_factor' durch 'scales::col_factor'
-#> während des Ladens von 'matsim' ersetzt
-#> Warning: vorhergehender Import 'reshape::expand' durch 'tidyr::expand' während
-#> des Ladens von 'matsim' ersetzt
-

#Introduction Welcome to the matsim package! This -vignette will guide you through the process of creating plots using the -functions provided by our library. matsim is a powerful R package -designed for data process and visualization, with providing a wide range -of functions to create high-quality and adjustable plots from processed -data.

-

##Overall concept

-
- -

Data flow and concept of matsim r package

-
-

##Installation Matsim is not still available at -CRAN, so to install matsim we use github, you can use the following -code:

-
devtools::install_github("matsim-vsp/matsim-r")
-

However if you want to have some specific branch in your Rstudio you -can specify this branch in the code:

-
devtools::install_github("matsim-vsp/matsim-r", ref = "{name of the branch}")
-

##Loading the package Once installed, you can load -the matsim package using the library() function:

-
library(matsim)
- - - - - - - - - - -