max_dist_travelled: Calculate max distance travelled between two (lat, lon)...

Description Usage Arguments Value Examples

View source: R/shinyTaskMasterScript.R

Description

Function that calculates max distance travelled (b/w 2 consecutive points) from a given ship's travel history. Ship is selected using filter_ship_type and filter_ship_name filters),

Usage

1
2
3
4
5
max_dist_travelled(
  cleaned_data,
  filter_ship_type = "Tanker",
  filter_ship_name = "MARINUS"
)

Arguments

cleaned_data

this is the clean dataset (which is obtained as a result of cleaning the raw dataset that is read into R

filter_ship_type

type of ship with the default value "Tanker"

filter_ship_name

name of ship with the default value "MARINUS"

Value

returns a list containing 2 elements. First element returned is the max_dist: max distance. Second element returned is the max_tibble: a tibble that contains all data that correspond to the points b/w which the given ship in question travelled the maximum distance.

Examples

1
2
max_dist_travelled(cleaned_data = cleaned_dataset,
filter_ship_type = "Cargo", filter_ship_name = "MERI")

AarshBatra/appsilonRShinyTaskAarshBatra documentation built on Feb. 12, 2021, 2:05 p.m.