From a716221cfb9cf024eb43dc8741aea5e5fe646d6f Mon Sep 17 00:00:00 2001 From: Sasha Soboliev Date: Mon, 31 Jul 2023 13:09:24 +0200 Subject: [PATCH] changed to naming convention in output_persons --- NAMESPACE | 2 + R/output_persons.R | 196 ++++++++++++++++++ R/personsOutput.R | 96 --------- man/matsimr-deprecated.Rd | 32 ++- ...ot_compare_count_by_spatialcat_barchart.Rd | 2 +- ...ences.Rd => plot_compare_score_boxplot.Rd} | 8 +- man/plot_distance_by_spatialcat_barchart.Rd | 4 +- man/plot_map_trips.Rd | 3 +- man/plot_map_trips_by_spatialcat.Rd | 2 +- man/plot_spatialtype_by_shape_piechart.Rd | 13 +- man/process_append_spatialcat.Rd | 4 +- man/process_convert_time.Rd | 8 +- man/process_filter_by_shape.Rd | 7 +- man/process_rename_mainmodes.Rd | 7 +- ...PersonsTable.Rd => read_output_persons.Rd} | 8 +- 15 files changed, 254 insertions(+), 138 deletions(-) create mode 100644 R/output_persons.R delete mode 100644 R/personsOutput.R rename man/{boxplotScoreDifferences.Rd => plot_compare_score_boxplot.Rd} (78%) rename man/{readPersonsTable.Rd => read_output_persons.Rd} (78%) diff --git a/NAMESPACE b/NAMESPACE index f584234..ec0ce8f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -34,6 +34,7 @@ export(plot_compare_count_by_spatialcat_barchart) export(plot_compare_distcat_by_mainmode_barchart) export(plot_compare_mainmode_barchart) export(plot_compare_mainmode_sankey) +export(plot_compare_score_boxplot) export(plot_compare_travelwaittime_by_mainmode) export(plot_compare_travelwaittime_by_mainmode_barchart) export(plot_deptime_by_act) @@ -70,6 +71,7 @@ export(readPersonsTable) export(readTripsTable) export(read_config) export(read_network) +export(read_output_persons) export(read_output_trips) export(symlog_trans) export(transformToSf) diff --git a/R/output_persons.R b/R/output_persons.R new file mode 100644 index 0000000..56677c7 --- /dev/null +++ b/R/output_persons.R @@ -0,0 +1,196 @@ +matsimDumpOutputDirectory <- "./matsim_r_output" +dashboard_file <- "/dashboard-1-trips.yaml" + + +#' Deprecated Function +#' +#' \strong{readPersonsTable} - Loads a MATSim CSV output_persons from file or archive, +#' creating a tibble with columns as in csv file +#' copied + adopted code from readTripsTable in tripsOutput.R +#' +#' @rdname matsimr-deprecated +#' +#' @param input_path is a character string, path to the local MATSim output directory, to the persons csv directly, or a http link to the file. +#' @param n_max integer, maximum number of lines to read within output_persons + +#' @return \strong{readPersonsTable} - tibble of output_persons +#' +#' @export +readPersonsTable <- function(input_path = ".", n_max = Inf) { + .Deprecated("read_output_persons") + options(digits = 18) + + persons_file <- "" + + if(dir.exists(input_path)){ + files <- list.files(input_path, full.names = TRUE) + person_file_indicies <- grep("output_persons.csv.gz$", files) + + if(length(person_file_indicies) == 1){ + persons_file <- files[person_file_indicies] + } else { + stop('There is supposed to be a single "output_persons.csv.gz" found in directory') + } + } else { + persons_file <- input_path + } + + persons_output_table <- read_delim(persons_file, + delim = ";", + locale = locale(decimal_mark = "."), + n_max = n_max, + col_types = cols( + executed_score = col_character(), + first_act_x = col_character(), + first_act_y = col_character(), + first_act_type = col_character(), + ) + ) + + persons_output_table <- persons_output_table %>% + mutate( + executed_score = as.double(executed_score), + first_act_x = as.double(first_act_x), + first_act_y = as.double(first_act_y), + ) + + attr(persons_output_table,"table_name") <- input_path + + return(persons_output_table) +} + +#' Load MATSim output_persons table into memory +#' +#' Loads a MATSim CSV output_persons from file or archive, +#' creating a tibble with columns as in csv file +#' copied + adopted code from readTripsTable in tripsOutput.R +#' +#' @param input_path is a character string, path to the local MATSim output directory, to the persons csv directly, or a http link to the file. +#' @param n_max integer, maximum number of lines to read within output_persons + +#' @return tibble of output_persons +#' +#' @export +read_output_persons <- function(input_path = ".", n_max = Inf) { + options(digits = 18) + + persons_file <- "" + + if(dir.exists(input_path)){ + files <- list.files(input_path, full.names = TRUE) + person_file_indicies <- grep("output_persons.csv.gz$", files) + + if(length(person_file_indicies) == 1){ + persons_file <- files[person_file_indicies] + } else { + stop('There is supposed to be a single "output_persons.csv.gz" found in directory') + } + } else { + persons_file <- input_path + } + + persons_output_table <- read_delim(persons_file, + delim = ";", + locale = locale(decimal_mark = "."), + n_max = n_max, + col_types = cols( + executed_score = col_character(), + first_act_x = col_character(), + first_act_y = col_character(), + first_act_type = col_character(), + ) + ) + + persons_output_table <- persons_output_table %>% + mutate( + executed_score = as.double(executed_score), + first_act_x = as.double(first_act_x), + first_act_y = as.double(first_act_y), + ) + + attr(persons_output_table,"table_name") <- input_path + + return(persons_output_table) +} +#' Deprecated Function +#' +#' \strong{boxplotScoreDifferences} - function generates a boxplot to compare the score differences between two sets of data +#' represented by personTibble_base and personTibble_policy tibbles. +#' It provides insights into the distribution of score differences between the two sets of data. +#' +#' @rdname matsimr-deprecated +#' +#' @param personTibble_base persons tibble of the base case, can be loaded with readPersonsTable. +#' @param personTibble_policy persons tibble of the policy case, can be loaded with readPersonsTable. +#' +#' @return \strong{boxplotScoreDifferences} - ggplot boxplot of the distribution of the score differences +#' +#' @export +boxplotScoreDifferences <- function(personTibble_base, personTibble_policy){ + + joined <- inner_join(personTibble_base, personTibble_policy, by = "person", suffix = c("_base", "_policy")) %>% + select(person, + executed_score_base, + executed_score_policy) %>% + mutate(score_diff = executed_score_policy - executed_score_base) + + result <- ggplot(joined, aes(y = score_diff)) + + geom_boxplot(fill = "#0099f8") + + labs( + title = "Distribution of score differences", + subtitle = "score_delta = score(policy) - score(base)", + #caption = "Source: MTCars dataset", + y = "score_delta" + ) + + theme_classic() + + theme( + plot.title = element_text(color = "#0099f8", size = 16, face = "bold", hjust = 0.5), + plot.subtitle = element_text(face = "bold.italic", hjust = 0.5), + plot.caption = element_text(face = "italic"), + axis.ticks.x = element_blank(), + axis.title.x = element_blank(), + axis.text.x = element_blank() + ) + result +} + + +#' Boxplot of Score Differences +#' +#' The \code{boxplotScoreDifferences} function generates a boxplot to compare the score differences between two sets of data +#' represented by personTibble_base and personTibble_policy tibbles. +#' It provides insights into the distribution of score differences between the two sets of data. +#' +#' @param personTibble_base persons tibble of the base case, can be loaded with readPersonsTable. +#' @param personTibble_policy persons tibble of the policy case, can be loaded with readPersonsTable. +#' +#' @return ggplot boxplot of the distribution of the score differences +#' +#' @export +plot_compare_score_boxplot <- function(personTibble_base, personTibble_policy){ + + joined <- inner_join(personTibble_base, personTibble_policy, by = "person", suffix = c("_base", "_policy")) %>% + select(person, + executed_score_base, + executed_score_policy) %>% + mutate(score_diff = executed_score_policy - executed_score_base) + + result <- ggplot(joined, aes(y = score_diff)) + + geom_boxplot(fill = "#0099f8") + + labs( + title = "Distribution of score differences", + subtitle = "score_delta = score(policy) - score(base)", + #caption = "Source: MTCars dataset", + y = "score_delta" + ) + + theme_classic() + + theme( + plot.title = element_text(color = "#0099f8", size = 16, face = "bold", hjust = 0.5), + plot.subtitle = element_text(face = "bold.italic", hjust = 0.5), + plot.caption = element_text(face = "italic"), + axis.ticks.x = element_blank(), + axis.title.x = element_blank(), + axis.text.x = element_blank() + ) + result +} diff --git a/R/personsOutput.R b/R/personsOutput.R deleted file mode 100644 index cec2db4..0000000 --- a/R/personsOutput.R +++ /dev/null @@ -1,96 +0,0 @@ -matsimDumpOutputDirectory <- "./matsim_r_output" -dashboard_file <- "/dashboard-1-trips.yaml" - - -#' Load MATSim output_persons table into memory -#' -#' Loads a MATSim CSV output_persons from file or archive, -#' creating a tibble with columns as in csv file -#' copied + adopted code from readTripsTable in tripsOutput.R -#' -#' @param input_path is a character string, path to the local MATSim output directory, to the persons csv directly, or a http link to the file. -#' @param n_max integer, maximum number of lines to read within output_persons - -#' @return tibble of output_persons -#' -#' @export -readPersonsTable <- function(input_path = ".", n_max = Inf) { - options(digits = 18) - - persons_file <- "" - - if(dir.exists(input_path)){ - files <- list.files(input_path, full.names = TRUE) - person_file_indicies <- grep("output_persons.csv.gz$", files) - - if(length(person_file_indicies) == 1){ - persons_file <- files[person_file_indicies] - } else { - stop('There is supposed to be a single "output_persons.csv.gz" found in directory') - } - } else { - persons_file <- input_path - } - - persons_output_table <- read_delim(persons_file, - delim = ";", - locale = locale(decimal_mark = "."), - n_max = n_max, - col_types = cols( - executed_score = col_character(), - first_act_x = col_character(), - first_act_y = col_character(), - first_act_type = col_character(), - ) - ) - - persons_output_table <- persons_output_table %>% - mutate( - executed_score = as.double(executed_score), - first_act_x = as.double(first_act_x), - first_act_y = as.double(first_act_y), - ) - - attr(persons_output_table,"table_name") <- input_path - - return(persons_output_table) -} -#' Boxplot of Score Differences -#' -#' The \code{boxplotScoreDifferences} function generates a boxplot to compare the score differences between two sets of data -#' represented by personTibble_base and personTibble_policy tibbles. -#' It provides insights into the distribution of score differences between the two sets of data. -#' -#' @param personTibble_base persons tibble of the base case, can be loaded with readPersonsTable. -#' @param personTibble_policy persons tibble of the policy case, can be loaded with readPersonsTable. -#' -#' @return ggplot boxplot of the distribution of the score differences -#' -#' @export -boxplotScoreDifferences <- function(personTibble_base, personTibble_policy){ - - joined <- inner_join(personTibble_base, personTibble_policy, by = "person", suffix = c("_base", "_policy")) %>% - select(person, - executed_score_base, - executed_score_policy) %>% - mutate(score_diff = executed_score_policy - executed_score_base) - - result <- ggplot(joined, aes(y = score_diff)) + - geom_boxplot(fill = "#0099f8") + - labs( - title = "Distribution of score differences", - subtitle = "score_delta = score(policy) - score(base)", - #caption = "Source: MTCars dataset", - y = "score_delta" - ) + - theme_classic() + - theme( - plot.title = element_text(color = "#0099f8", size = 16, face = "bold", hjust = 0.5), - plot.subtitle = element_text(face = "bold.italic", hjust = 0.5), - plot.caption = element_text(face = "italic"), - axis.ticks.x = element_blank(), - axis.title.x = element_blank(), - axis.text.x = element_blank() - ) - result -} diff --git a/man/matsimr-deprecated.Rd b/man/matsimr-deprecated.Rd index fc02d4d..f03e278 100644 --- a/man/matsimr-deprecated.Rd +++ b/man/matsimr-deprecated.Rd @@ -1,8 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/network.R, R/output_trips.R +% Please edit documentation in R/network.R, R/output_persons.R, R/output_trips.R \docType{package} \name{loadNetwork} \alias{loadNetwork} +\alias{readPersonsTable} +\alias{boxplotScoreDifferences} \alias{matsimr-deprecated} \alias{plotModalSplitPieChart} \alias{plotModalSplitBarChart} @@ -35,6 +37,10 @@ \usage{ loadNetwork(filename) +readPersonsTable(input_path = ".", n_max = Inf) + +boxplotScoreDifferences(personTibble_base, personTibble_policy) + plotModalSplitPieChart( tripsTable, unite.columns = character(0), @@ -216,6 +222,14 @@ transformToSf(table, crs, geometry.type = st_multipoint()) \arguments{ \item{filename}{File to load. Can be XML or gzipped XML} +\item{input_path}{character string, path to MATSim output directory or http link to the file.} + +\item{n_max}{integer, maximum number of lines to read within output_trips} + +\item{personTibble_base}{persons tibble of the base case, can be loaded with readPersonsTable.} + +\item{personTibble_policy}{persons tibble of the policy case, can be loaded with readPersonsTable.} + \item{tripsTable}{table of output trips(from \link{read_output_trips}) or path to trips_output file} \item{unite.columns}{vector of character string, changes name of all transport modes in the tibble copy to united_name = "united" that matches PATTERNS given in unite.columns} @@ -226,10 +240,6 @@ transformToSf(table, crs, geometry.type = st_multipoint()) \item{only.files}{boolean, that represent if plotting inside project is needed, by default FALSE - means function gives out a plot by plot_ly} -\item{input_path}{character string, path to MATSim output directory or http link to the file.} - -\item{n_max}{integer, maximum number of lines to read within output_trips} - \item{tripsTable1}{tibble of trips_output (from \link{read_output_trips},f.e. base case)} \item{tripsTable2}{tibble of trips_output (from \link{read_output_trips},f.e. policy case)} @@ -272,6 +282,10 @@ transformToSf(table, crs, geometry.type = st_multipoint()) \value{ \strong{loadNetwork} - "nodes" and "links" tibbles in a list object. +\strong{readPersonsTable} - tibble of output_persons + +\strong{boxplotScoreDifferences} - ggplot boxplot of the distribution of the score differences + \strong{plotModalSplitPieChart} - Pie Chart plot of transport mode distribution, values given in percents \strong{plotModalSplitBarChart} - Bar Chart plot of transport mode distribution, values given in percents @@ -332,6 +346,14 @@ The links table is automatically joined with the nodes table so that node x/y coordinates (and any other node attributes) are available on the links table without additional processing. +\strong{readPersonsTable} - Loads a MATSim CSV output_persons from file or archive, +creating a tibble with columns as in csv file +copied + adopted code from readTripsTable in tripsOutput.R + +\strong{boxplotScoreDifferences} - function generates a boxplot to compare the score differences between two sets of data +represented by personTibble_base and personTibble_policy tibbles. +It provides insights into the distribution of score differences between the two sets of data. + These functions are provided for compatibility with older version of the matsimr package. They may eventually be completely removed.\cr\cr diff --git a/man/plot_compare_count_by_spatialcat_barchart.Rd b/man/plot_compare_count_by_spatialcat_barchart.Rd index 9311f48..ab6e7a5 100644 --- a/man/plot_compare_count_by_spatialcat_barchart.Rd +++ b/man/plot_compare_count_by_spatialcat_barchart.Rd @@ -16,7 +16,7 @@ plot_compare_count_by_spatialcat_barchart( \item{trips_table2}{tible of trips_output (from \link{read_output_trips})} -\item{shape_table}{A spatial shapefile or spatial polygons dataframe representing the spatial categories.} +\item{shape_table}{A spatial shapefile or spatial polygons data frame used to create the spatial categories.} \item{crs}{numeric representation of the EPSG code or proj4string for the corresponding coordinate system of the trip coordinates, can be found in network file from output directory of MATSim simulation} diff --git a/man/boxplotScoreDifferences.Rd b/man/plot_compare_score_boxplot.Rd similarity index 78% rename from man/boxplotScoreDifferences.Rd rename to man/plot_compare_score_boxplot.Rd index 16e7b58..f11652c 100644 --- a/man/boxplotScoreDifferences.Rd +++ b/man/plot_compare_score_boxplot.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/personsOutput.R -\name{boxplotScoreDifferences} -\alias{boxplotScoreDifferences} +% Please edit documentation in R/output_persons.R +\name{plot_compare_score_boxplot} +\alias{plot_compare_score_boxplot} \title{Boxplot of Score Differences} \usage{ -boxplotScoreDifferences(personTibble_base, personTibble_policy) +plot_compare_score_boxplot(personTibble_base, personTibble_policy) } \arguments{ \item{personTibble_base}{persons tibble of the base case, can be loaded with readPersonsTable.} diff --git a/man/plot_distance_by_spatialcat_barchart.Rd b/man/plot_distance_by_spatialcat_barchart.Rd index 8c2d81f..8a4204f 100644 --- a/man/plot_distance_by_spatialcat_barchart.Rd +++ b/man/plot_distance_by_spatialcat_barchart.Rd @@ -14,11 +14,11 @@ plot_distance_by_spatialcat_barchart( \arguments{ \item{trips_table}{tible of trips_output (from \link{read_output_trips})} -\item{shape_table}{sf object(data.frame with geometries), can be received by using st_read(path_to_geographical_file)} - \item{crs}{numeric of EPSG code or proj4string, can be found in network file from output directory of MATSim simulation} \item{euclidean}{Logical value indicating whether to calculate the average as euclidean distance or as travel distance. Default is FALSE, which calculates the average traveled distance.} + +\item{shape_Table}{sf object(data frame with geometries), can be created using st_read(), is used to categorize the trips.} } \value{ Bar Chart plot of distance traveled by spatial type diff --git a/man/plot_map_trips.Rd b/man/plot_map_trips.Rd index 0c0d6d8..71d0676 100644 --- a/man/plot_map_trips.Rd +++ b/man/plot_map_trips.Rd @@ -13,8 +13,7 @@ plot_map_trips(trips_table, crs, optimized = FALSE, shape_table = NULL) \item{optimized}{bool, by default FALSE and gives interactive plot using leaflet, if TRUE using image with ggplot} -\item{shape_table}{A spatial shapefile or spatial polygons dataframe representing the spatial categories. -By default NULL, means there are no specific shape map on the backgroung.} +\item{shape_table}{A spatial shapefile or spatial polygons data frame used as a background. By default NULL.} } \value{ leaflet/ggplot plot with trips start-, end- points diff --git a/man/plot_map_trips_by_spatialcat.Rd b/man/plot_map_trips_by_spatialcat.Rd index c005f31..d094e0c 100644 --- a/man/plot_map_trips_by_spatialcat.Rd +++ b/man/plot_map_trips_by_spatialcat.Rd @@ -18,7 +18,7 @@ of the trip coordinates, can be found in network file from output directory of M \item{table}{tibble of output_trips (from read_output_trips())} -\item{shapeTable}{sf object(data.frame with geometries), can be created using st_read()} +\item{shape_Table}{sf object(data frame with geometries), can be created using st_read(), is used to categorize the trips.} } \value{ plot that contains every trip with defined trip type diff --git a/man/plot_spatialtype_by_shape_piechart.Rd b/man/plot_spatialtype_by_shape_piechart.Rd index 8380dee..3395866 100644 --- a/man/plot_spatialtype_by_shape_piechart.Rd +++ b/man/plot_spatialtype_by_shape_piechart.Rd @@ -2,22 +2,21 @@ % Please edit documentation in R/output_trips.R \name{plot_spatialtype_by_shape_piechart} \alias{plot_spatialtype_by_shape_piechart} -\title{Plots distribution of every type of trips(inside, outside, origin and destinating) in Pie Chart -XXXX} +\title{Plots distribution of every type of trip(inside, outside, origin and destinating) as a pie chart} \usage{ plot_spatialtype_by_shape_piechart(trips_table, shape_table, crs) } \arguments{ \item{trips_table}{tibble of trips_output (from \link{read_output_trips})} -\item{shape_table}{sf object(data.frame with geometries), can be received by using st_read(path_to_geographical_file)} +\item{crs}{numeric representation of the EPSG code or proj4string for the corresponding coordinate system of the trip coordinates, +can be found in network file from output directory of MATSim simulation} -\item{crs}{numeric of EPSG code or proj4string, can be found in network file from output directory of MATSim simulation} +\item{shape_Table}{sf object(data frame with geometries), can be created using st_read(), is used to categorize the trips.} } \value{ -plot with percentage of each type of trips +Pie chart showing the percentage of each type of trip } \description{ -Plots distribution of every type of trips(inside, outside, origin and destinating) in Pie Chart -XXXX +Plots distribution of every type of trip(inside, outside, origin and destinating) as a pie chart } diff --git a/man/process_append_spatialcat.Rd b/man/process_append_spatialcat.Rd index 6ab2259..d814a9d 100644 --- a/man/process_append_spatialcat.Rd +++ b/man/process_append_spatialcat.Rd @@ -9,10 +9,10 @@ process_append_spatialcat(trips_table, shape_table, crs) \arguments{ \item{trips_table}{tibble of output_trips (from read_output_trips())} -\item{shape_table}{sf object(data.frame with geometries), can be created using st_read()} - \item{crs}{numeric representation of the EPSG code or proj4string for the corresponding coordinate system of the trip coordinates, can be found in network file from output directory of MATSim simulation} + +\item{shape_Table}{sf object(data frame with geometries), can be created using st_read(), is used to categorize the trips.} } \value{ tibble, with additional column containing the trip type diff --git a/man/process_convert_time.Rd b/man/process_convert_time.Rd index 1f764bf..2a5a02e 100644 --- a/man/process_convert_time.Rd +++ b/man/process_convert_time.Rd @@ -2,11 +2,7 @@ % Please edit documentation in R/output_trips.R \name{process_convert_time} \alias{process_convert_time} -\title{Converts time column specified in \strong{time_column} to numeric representation of minutes, hours or seconds -XXXX here minute, hour and second don't have an s? -Default output_trips table time columns(\strong{dep_time}, \strong{trav_time}, \strong{wait_time}) are in 'hms' format. -To convert this type to numeric, specify \strong{time_column} to be converted, -and the unit \strong{time_format}. Acceptable units are "hour", "minute" and "second".} +\title{Converts time column specified in \strong{time_column} to numeric representation of minutes, hours or seconds} \usage{ process_convert_time( trips_table, @@ -25,8 +21,6 @@ process_convert_time( tibble, containing column with specified time_format } \description{ -Converts time column specified in \strong{time_column} to numeric representation of minutes, hours or seconds -XXXX here minute, hour and second don't have an s? Default output_trips table time columns(\strong{dep_time}, \strong{trav_time}, \strong{wait_time}) are in 'hms' format. To convert this type to numeric, specify \strong{time_column} to be converted, and the unit \strong{time_format}. Acceptable units are "hour", "minute" and "second". diff --git a/man/process_filter_by_shape.Rd b/man/process_filter_by_shape.Rd index c353878..1f2f915 100644 --- a/man/process_filter_by_shape.Rd +++ b/man/process_filter_by_shape.Rd @@ -2,8 +2,7 @@ % Please edit documentation in R/output_trips.R \name{process_filter_by_shape} \alias{process_filter_by_shape} -\title{XXXX finish when code revision is done -Filters trips_table(from ,\link{read_output_trips}) depending by location using a shapefile} +\title{Filters trips_table(from ,\link{read_output_trips}) depending by location using a shapefile} \usage{ process_filter_by_shape(trips_table, shape_table, crs, spatial_type = "inside") } @@ -15,7 +14,7 @@ of the trip coordinates, can be found in network file from output directory of M \item{spatial_type}{bool, defines trips to conclude (see description)} -\item{shapeTable}{sf object(data.frame with geometries), can be created using st_read()} +\item{shape_Table}{sf object(data frame with geometries), can be created using st_read()} } \value{ tibble, with filtered trips depending on shapeTable and spatial types (see description) @@ -23,7 +22,7 @@ tibble, with filtered trips depending on shapeTable and spatial types (see descr \description{ Uses output_trips and an sf object (can be created using the function st_read()), transforms both objects to match a mutual coordinate system (crs) -and filters the trips from output_trips depending on their spatial type flags:\cr +and filters the trips from output_trips depending on their spatial type:\cr if spatial_type="inside" returns a table that contains trips inside given shape\cr if spatial_type="originating" returns a table that contains trips which start inside the shape and end outside of the shape\cr if spatial_type="destinating" returns a table that contains trips which end inside shape and start outside of the shape\cr diff --git a/man/process_rename_mainmodes.Rd b/man/process_rename_mainmodes.Rd index 9beecf6..e92d2e4 100644 --- a/man/process_rename_mainmodes.Rd +++ b/man/process_rename_mainmodes.Rd @@ -11,11 +11,12 @@ process_rename_mainmodes( ) } \arguments{ -\item{trips_table}{tible of output_trips (from \link{\code{read_output_trips}})} +\item{trips_table}{tibble of output_trips (from \link{\code{read_output_trips}})} -\item{unite_modes}{vector of character string, representing pattern to match categories} +\item{unite_modes}{vector of character strings, +changes names of chosen modes in the column main_mode to a new chosen name (i.e. drtNorth and drtSouth to drt)} -\item{united_name}{character string, to represent new category for all occurrences matched unite_modes} +\item{united_name}{character string, specifies the name of the united mode} } \value{ tibble with new main_mode representation diff --git a/man/readPersonsTable.Rd b/man/read_output_persons.Rd similarity index 78% rename from man/readPersonsTable.Rd rename to man/read_output_persons.Rd index e393acb..2ede03a 100644 --- a/man/readPersonsTable.Rd +++ b/man/read_output_persons.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/personsOutput.R -\name{readPersonsTable} -\alias{readPersonsTable} +% Please edit documentation in R/output_persons.R +\name{read_output_persons} +\alias{read_output_persons} \title{Load MATSim output_persons table into memory} \usage{ -readPersonsTable(input_path = ".", n_max = Inf) +read_output_persons(input_path = ".", n_max = Inf) } \arguments{ \item{input_path}{is a character string, path to the local MATSim output directory, to the persons csv directly, or a http link to the file.}