Skip to content

Commit

Permalink
New version number for release
Browse files Browse the repository at this point in the history
  • Loading branch information
rsetienne committed Jun 18, 2020
1 parent 60c5092 commit f948015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: DAISIE
Type: Package
Title: Dynamical Assembly of Islands by Speciation, Immigration and
Extinction
Version: 2.0
Date: 2020-03-23
Version: 2.0.1
Date: 2020-06-18
Depends: R (>= 3.5.0)
Imports: assertive, deSolve, grDevices, graphics, stats, utils, DDD (> 3.0),
subplex, Matrix, tensor, pracma, testit,
Expand Down

2 comments on commit f948015

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/create_CS_version.R:15:1: style: Variable and function name style should be snake_case.

create_CS_version <- function(model = 1,
^~~~~~~~~~~~~~~~~

R/create_CS_version.R:19:3: style: Variable and function name style should be snake_case.

CS_version <- list(model = model,
  ^~~~~~~~~~

R/create_test_simulation_output.R:4:1: style: Lines should not be more than 80 characters.

#' @param island_ontogeny Boolean indicating if an ontogeny or no ontogeny scenario
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/create_test_simulation_output.R:30:20: warning: no visible global function definition for ‘is_island_ontogeny_input’

testit::assert(is_island_ontogeny_input(island_ontogeny))
                   ^~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_area_params.R:16:1: style: functions should have cyclomatic complexity of less than 15, this has 23.

are_area_params <- function(area_params) {
^

R/DAISIE_area_params.R:34:1: style: Lines should not be more than 80 characters.

#' @param proportional_peak_t value from 0 to 1 indicating where in the island's history the
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_area_params.R:39:1: style: Lines should not be more than 80 characters.

#' @return list of numerical values containing area parameters for island ontogeny
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:6:1: style: functions should have cyclomatic complexity of less than 15, this has 35.

are_rates <- function(x) {
^

R/DAISIE_check_format.R:33:1: style: Lines should not be more than 80 characters.

if (island_ontogeny != "const" && island_ontogeny != "linear" && island_ontogeny != "beta") return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:46:1: style: Lines should not be more than 80 characters.

if (island_ontogeny != 0 && island_ontogeny != 1 && island_ontogeny != 2) return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:68:1: style: Lines should not be more than 80 characters.

if (!"island_age" %in% names(simulation_outputs[[n_replicate]][[1]])) return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:70:1: style: Lines should not be more than 80 characters.

!"not_present_type1" %in% names(simulation_outputs[[n_replicate]][[1]]))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:73:1: style: Lines should not be more than 80 characters.

if (!"stt_all" %in% names(simulation_outputs[[n_replicate]][[1]])) return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:75:7: style: Commented code should be removed.

# if (!"branching_times" %in% names(simulation_outputs)) return(FALSE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:76:7: style: Commented code should be removed.

# if (!"stac" %in% names(simulation_outputs)) return(FALSE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:77:7: style: Commented code should be removed.

# if (!"missing_species" %in% names(simulation_outputs)) return(FALSE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:5:1: style: Lines should not be more than 80 characters.

#' @param island_spec matrix with species on island (state of system at each time point)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:10:1: style: Lines should not be more than 80 characters.

#' @return list with the island information, composed stt table, branching times of extant
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:12:1: style: Variable and function name style should be snake_case.

DAISIE_create_island <- function(stt_table,
^~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:18:1: style: Lines should not be more than 80 characters.

### if there are no species on the island branching_times = island_age, stac = 0, missing_species = 0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:19:27: style: Commas should always have a space after.

if (length(island_spec[,1]) == 0) {
                          ^

R/DAISIE_create_island.R:45:1: style: Lines should not be more than 80 characters.

island_spec[, "branching time (BP)"] <- totaltime - as.numeric(island_spec[, "branching time (BP)"])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:46:1: style: Lines should not be more than 80 characters.

island_spec[, "Colonisation time (BP)"] <- totaltime - as.numeric(island_spec[, "Colonisation time (BP)"])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:56:1: style: Lines should not be more than 80 characters.

colonists_present <- sort(as.numeric(unique(island_spec[, 'Mainland Ancestor'])))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:56:65: style: Only use double-quotes.

colonists_present <- sort(as.numeric(unique(island_spec[, 'Mainland Ancestor'])))
                                                                ^~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:61:1: style: Lines should not be more than 80 characters.

subset_island <- island_spec[which(island_spec[, 'Mainland Ancestor'] == colonists_present[i]),]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:61:58: style: Only use double-quotes.

subset_island <- island_spec[which(island_spec[, 'Mainland Ancestor'] == colonists_present[i]),]
                                                         ^~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:61:104: style: Commas should always have a space after.

subset_island <- island_spec[which(island_spec[, 'Mainland Ancestor'] == colonists_present[i]),]
                                                                                                       ^

R/DAISIE_create_island.R:69:1: style: Lines should not be more than 80 characters.

island_spec = subset_island,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:71:1: style: Lines should not be more than 80 characters.

keep_final_state = keep_final_state)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:80:1: style: Lines should not be more than 80 characters.

taxon_list = island_clades_info, island_spec = island_spec)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:2:1: style: Lines should not be more than 80 characters.

#' @title Colonization and branching times of 8 terrestrial avifaunal clades in list
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:7:1: style: Lines should not be more than 80 characters.

#' #' @description A list containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:25:1: style: Lines should not be more than 80 characters.

#' and Endemic anagenetic species. For Endemic cladogenetic species these should be
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:47:1: style: Lines should not be more than 80 characters.

#' @title Colonization and branching times of 8 terrestrial avifaunal clades in list
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:52:1: style: Lines should not be more than 80 characters.

#' @description A list containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:92:1: style: Lines should not be more than 80 characters.

#' @title Colonization and branching times of 8 terrestrial avifaunal Galápagos clades in table
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:96:1: style: Lines should not be more than 80 characters.

#' @description A table containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:103:1: style: Lines should not be more than 80 characters.

#' * Non_endemic: for non-endemic island species when an approximate time of colonisation is known \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:104:1: style: Lines should not be more than 80 characters.

#' * Non_endemic_MaxAge: for non-endemic island species when colonisation time is unknown \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:105:1: style: Lines should not be more than 80 characters.

#' * Endemic: for endemic species when an approximate colonisation time is known \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:106:1: style: Lines should not be more than 80 characters.

#' * "Endemic_MaxAge": applies to endemic species or endemic clades for cases where the
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:109:1: style: Lines should not be more than 80 characters.

#' This could for example apply to endemic species that have recently gone extinct because
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:113:1: style: Lines should not be more than 80 characters.

#' time of the first cladogenetic event is known, but the precise time of colonisation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:120:1: style: Lines should not be more than 80 characters.

#' \code{$Branching_times} - Stem age of the population/species in the case of "Non_endemic",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:121:1: style: Lines should not be more than 80 characters.

#'  "Non_endemic_MaxAge" and "Endemic" species with no extant close relatives on the island.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:124:1: style: Lines should not be more than 80 characters.

#' radiation, including the stem age of the radiation (colonisation time estimate).\cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:134:1: style: Lines should not be more than 80 characters.

#' @title 1000 islands in RAW format simulated with the ML parameters of the CR model
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:137:1: style: Lines should not be more than 80 characters.

#' @description Each simulated dataset is an element of the list, which can be called using
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:168:1: style: Lines should not be more than 80 characters.

#' @title 1000 islands in DAISIE format simulated with the ML parameters of the CR
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:171:1: style: Lines should not be more than 80 characters.

#' @description Each simulated dataset is an element of the list, which can be called using
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:207:1: style: Lines should not be more than 80 characters.

#' @description Each simulated dataset is an element of the list, which can be called using
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:257:1: style: Lines should not be more than 80 characters.

#' @description A list containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:266:1: style: Lines should not be more than 80 characters.

#' The following elements of the list each contains information on a single colonist lineage
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:280:1: style: Lines should not be more than 80 characters.

#' #' \code{$missing_species} - number of island species that were not sampled for
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:288:1: style: Lines should not be more than 80 characters.

#' R. Equilibrium bird species diversity in Atlantic islands. 2017 Current Biology, 27, 1660-1666.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:295:1: style: Lines should not be more than 80 characters.

#' format, accepted by DAISIE_ML, DAISIE_SR_ML, DAISIE_loglik_all and DAISIE_SR_loglik_all
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:331:1: style: Lines should not be more than 80 characters.

#' @seealso \code{\link{DAISIE_dataprep}}, \code{\link{DAISIE_ML}}, \code{\link{DAISIE_SR_ML}}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:333:1: style: Lines should not be more than 80 characters.

#' elevates equilibrium diversity via increasing colonisation. (2020) Journal of Biogeography \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:340:1: style: Lines should not be more than 80 characters.

#' @format A dataframe containing information on archipelago name, area, age and distance from the mainland
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:341:1: style: Lines should not be more than 80 characters.

#' @description A dataframe with in subsequent columns the name of the archipelago (Archipelago)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:342:1: style: Lines should not be more than 80 characters.

#' the area of the archipelago (Area), the age (Age) and the distance from the mainland (Distance)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:343:1: style: Lines should not be more than 80 characters.

#' @source Valente et al A simple dynamic model explain the diversty of island birds worldwide. \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:16:1: style: Lines should not be more than 80 characters.

#' "Non_endemic": applies to non-endemic species when an approximate colonisation time is known \cr *
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:18:1: style: Lines should not be more than 80 characters.

#' colonisation time is unknown \cr * "Endemic": applies to endemic species or endemic
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:19:1: style: Lines should not be more than 80 characters.

#' clades when an approximate colonisation time is known \cr * "Endemic_MaxAge": applies to endemic
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:20:1: style: Lines should not be more than 80 characters.

#' species or endemic clades for cases where the colonisation time is unknown, or when
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:22:1: style: Lines should not be more than 80 characters.

#' This could for example apply to endemic species that have recently gone extinct because
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:26:1: style: Lines should not be more than 80 characters.

#' time of the first cladogenetic event is known, but the precise time of colonisation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:27:1: style: Lines should not be more than 80 characters.

#' is not. \cr * "Endemic&Non_Endemic": when endemic clade is present and its mainland
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:31:1: style: Lines should not be more than 80 characters.

#'  be equal to the number of species in the clade minus 1 \cr \code{$Branching_times}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:32:1: style: Lines should not be more than 80 characters.

#'  - Stem age of the population/species in the case of "Non_endemic", "Non_endemic_MaxAge"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:33:1: style: Lines should not be more than 80 characters.

#'  and "Endemic" species with no extant close relatives on the island. Set "NA" if
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:36:1: style: Lines should not be more than 80 characters.

#' radiation, including the stem age of the radiation (colonisation time estimate).\cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:79:1: style: Lines should not be more than 80 characters.

#' \cr * Endemic_MaxAge: 6 (if colonisation time and cladogenesis times were given)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:81:1: style: Lines should not be more than 80 characters.

#' for particular clade (only applicable for endemic clades) \cr \code{$type_1or2}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:93:1: style: Lines should not be more than 80 characters.

#' ### Create Galapagos data object where all taxa have the same macroevolutionary process
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:103:1: style: Lines should not be more than 80 characters.

#' # for the Darwin's finches. One process applies to type 1 species (all species
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:118:1: style: Lines should not be more than 80 characters.

#' # for the Darwin's finches. One process applies to type 1 species (all species
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:120:1: style: Lines should not be more than 80 characters.

#' # (Darwin's finches). Set fraction of potential colonists of type 2 to be 0.163.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:133:1: style: functions should have cyclomatic complexity of less than 15, this has 28.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
^

R/DAISIE_dataprep.R:133:1: style: Lines should not be more than 80 characters.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:133:1: style: Variable and function name style should be snake_case.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
^~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:133:17: style: Use <-, not =, for assignment.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                ^

R/DAISIE_dataprep.R:133:38: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                     ^

R/DAISIE_dataprep.R:133:49: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                ^

R/DAISIE_dataprep.R:133:49: style: Variable and function name style should be snake_case.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                ^

R/DAISIE_dataprep.R:133:51: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                  ^

R/DAISIE_dataprep.R:133:74: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                                         ^

R/DAISIE_dataprep.R:133:131: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                                                                                                  ^

R/DAISIE_dataprep.R:134:1: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​{
^

R/DAISIE_dataprep.R:135:24: style: Use <-, not =, for assignment.

number_colonisations = nrow(datatable)
                       ^

R/DAISIE_dataprep.R:136:12: style: Use <-, not =, for assignment.

datalist = list()
           ^

R/DAISIE_dataprep.R:137:13: style: Variable and function name style should be snake_case.

datatable$Missing_species<-as.numeric(as.character(datatable$Missing_species))
            ^~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:137:28: style: Put spaces around all infix operators.

datatable$Missing_species<-as.numeric(as.character(datatable$Missing_species))
                          ~^~~

R/DAISIE_dataprep.R:139:5: style: Place a space before left parenthesis, except in a function call.

if(number_clade_types == 1)
    ^

R/DAISIE_dataprep.R:140:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^

R/DAISIE_dataprep.R:141:1: style: Lines should not be more than 80 characters.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:141:19: style: Use <-, not =, for assignment.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                  ^

R/DAISIE_dataprep.R:141:36: style: Put spaces around all infix operators.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                  ~^~

R/DAISIE_dataprep.R:141:48: style: Commas should always have a space after.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                               ^

R/DAISIE_dataprep.R:141:59: style: Put spaces around all infix operators.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                                         ~^~

R/DAISIE_dataprep.R:141:60: style: Place a space before left parenthesis, except in a function call.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                                           ^

R/DAISIE_dataprep.R:143:5: style: Place a space before left parenthesis, except in a function call.

if(number_clade_types == 2)
    ^

R/DAISIE_dataprep.R:144:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^

R/DAISIE_dataprep.R:145:32: style: Use <-, not =, for assignment.

number_type2_colonisations = length(list_type2_clades)
                               ^

R/DAISIE_dataprep.R:146:1: style: Lines should not be more than 80 characters.

number_type1_colonisations = number_colonisations - number_type2_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:146:32: style: Use <-, not =, for assignment.

number_type1_colonisations = number_colonisations - number_type2_colonisations
                               ^

R/DAISIE_dataprep.R:148:5: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​    {
    ^

R/DAISIE_dataprep.R:149:1: style: Lines should not be more than 80 characters.

not_present_type1 = DDD::roundn((M/number_colonisations) * number_type1_colonisations) - number_type1_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:149:25: style: Use <-, not =, for assignment.

not_present_type1 = DDD::roundn((M/number_colonisations) * number_type1_colonisations) - number_type1_colonisations
                        ^

R/DAISIE_dataprep.R:149:41: style: Put spaces around all infix operators.

not_present_type1 = DDD::roundn((M/number_colonisations) * number_type1_colonisations) - number_type1_colonisations
                                       ~^~

R/DAISIE_dataprep.R:150:1: style: Lines should not be more than 80 characters.

not_present_type2 = DDD::roundn((M/number_colonisations) * number_type2_colonisations) - number_type2_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:150:25: style: Use <-, not =, for assignment.

not_present_type2 = DDD::roundn((M/number_colonisations) * number_type2_colonisations) - number_type2_colonisations
                        ^

R/DAISIE_dataprep.R:150:41: style: Put spaces around all infix operators.

not_present_type2 = DDD::roundn((M/number_colonisations) * number_type2_colonisations) - number_type2_colonisations
                                       ~^~

R/DAISIE_dataprep.R:152:1: style: Lines should not be more than 80 characters.

not_present_type1 = DDD::roundn(M * (1 - prop_type2_pool)) - number_type1_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:152:25: style: Use <-, not =, for assignment.

not_present_type1 = DDD::roundn(M * (1 - prop_type2_pool)) - number_type1_colonisations
                        ^

R/DAISIE_dataprep.R:153:1: style: Lines should not be more than 80 characters.

not_present_type2 = DDD::roundn(M * prop_type2_pool) - number_type2_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:153:25: style: Use <-, not =, for assignment.

not_present_type2 = DDD::roundn(M * prop_type2_pool) - number_type2_colonisations
                        ^

R/DAISIE_dataprep.R:155:1: style: Lines should not be more than 80 characters.

datalist[[1]] = list(island_age = island_age, not_present_type1 = not_present_type1, not_present_type2 = not_present_type2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:155:19: style: Use <-, not =, for assignment.

datalist[[1]] = list(island_age = island_age, not_present_type1 = not_present_type1, not_present_type2 = not_present_type2)
                  ^

R/DAISIE_dataprep.R:157:13: warning: Avoid 1:nrow(...) expressions, use seq_len.

for (i in 1:nrow(datatable))
            ^

R/DAISIE_dataprep.R:158:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^

R/DAISIE_dataprep.R:159:1: style: Lines should not be more than 80 characters.

datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:159:23: style: Use <-, not =, for assignment.

datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
                      ^

R/DAISIE_dataprep.R:159:71: style: Commas should always have a space after.

datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
                                                                      ^

R/DAISIE_dataprep.R:160:1: style: Lines should not be more than 80 characters.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:160:51: style: Commas should always have a space after.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
                                                  ^

R/DAISIE_dataprep.R:160:61: style: Commas should always have a space after.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
                                                            ^

R/DAISIE_dataprep.R:160:91: style: Commas should always have a space after.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
                                                                                          ^

R/DAISIE_dataprep.R:161:1: style: Lines should not be more than 80 characters.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:161:14: style: Use <-, not =, for assignment.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
             ^

R/DAISIE_dataprep.R:161:77: style: Commas should always have a space after.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
                                                                            ^

R/DAISIE_dataprep.R:161:97: style: Commas should always have a space after.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
                                                                                                ^

R/DAISIE_dataprep.R:163:7: style: Place a space before left parenthesis, except in a function call.

if(is.na(the_brts[1])){
      ^

R/DAISIE_dataprep.R:163:26: style: There should be a space between right parenthesis and an opening curly brace.

if(is.na(the_brts[1])){
                         ^~

R/DAISIE_dataprep.R:164:15: style: Put spaces around all infix operators.

the_brts<-island_age
             ~^~~

R/DAISIE_dataprep.R:165:1: style: Lines should not be more than 80 characters.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:165:9: style: Place a space before left parenthesis, except in a function call.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
        ^

R/DAISIE_dataprep.R:165:22: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                     ^

R/DAISIE_dataprep.R:165:59: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                          ^

R/DAISIE_dataprep.R:165:81: style: Do not place spaces around code in parentheses or square brackets.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                ^

R/DAISIE_dataprep.R:165:82: style: There should be a space between right parenthesis and an opening curly brace.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                 ^~

R/DAISIE_dataprep.R:166:1: style: Lines should not be more than 80 characters.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:166:34: style: Use <-, not =, for assignment.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
                                 ^

R/DAISIE_dataprep.R:166:68: style: Commas should always have a space after.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
                                                                   ^

R/DAISIE_dataprep.R:167:21: style: Commas should always have a space after.

datatable[i,"Status"] <-"Endemic_MaxAge"}
                    ^

R/DAISIE_dataprep.R:167:31: style: Put spaces around all infix operators.

datatable[i,"Status"] <-"Endemic_MaxAge"}
                              ^~~

R/DAISIE_dataprep.R:167:49: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

datatable[i,"Status"] <-"Endemic_MaxAge"}
                                                ^

R/DAISIE_dataprep.R:168:1: style: Lines should not be more than 80 characters.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:168:9: style: Place a space before left parenthesis, except in a function call.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
        ^

R/DAISIE_dataprep.R:168:22: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
                     ^

R/DAISIE_dataprep.R:168:63: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
                                                              ^

R/DAISIE_dataprep.R:168:89: style: There should be a space between right parenthesis and an opening curly brace.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
                                                                                        ^~

R/DAISIE_dataprep.R:169:1: style: Lines should not be more than 80 characters.

​        levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:169:34: style: Use <-, not =, for assignment.

​        levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
                                 ^

R/DAISIE_dataprep.R:169:68: style: Commas should always have a space after.

​        levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
                                                                   ^

R/DAISIE_dataprep.R:170:21: style: Commas should always have a space after.

datatable[i,"Status"] <-"Non_endemic_MaxAge"}
                    ^

R/DAISIE_dataprep.R:170:31: style: Put spaces around all infix operators.

datatable[i,"Status"] <-"Non_endemic_MaxAge"}
                              ^~~

R/DAISIE_dataprep.R:170:53: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

datatable[i,"Status"] <-"Non_endemic_MaxAge"}
                                                    ^

R/DAISIE_dataprep.R:173:7: style: Place a space before left parenthesis, except in a function call.

if(max(the_brts)>island_age){
      ^

R/DAISIE_dataprep.R:173:21: style: Put spaces around all infix operators.

if(max(the_brts)>island_age){
                   ~^~

R/DAISIE_dataprep.R:173:32: style: There should be a space between right parenthesis and an opening curly brace.

if(max(the_brts)>island_age){
                               ^~

R/DAISIE_dataprep.R:174:19: style: Only use double-quotes.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                  ^~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:174:43: style: Commas should always have a space after.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                                          ^

R/DAISIE_dataprep.R:174:57: style: Commas should always have a space after.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                                                        ^

R/DAISIE_dataprep.R:174:57: style: Only use double-quotes.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                                                        ^~~~~~~

R/DAISIE_dataprep.R:175:1: style: Lines should not be more than 80 characters.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:175:37: style: Commas should always have a space after.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                    ^

R/DAISIE_dataprep.R:175:52: style: Commas should always have a space after.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                   ^

R/DAISIE_dataprep.R:175:52: style: Only use double-quotes.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:175:117: style: Commas should always have a space after.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                                                                                    ^

R/DAISIE_dataprep.R:175:120: style: Put spaces around all infix operators.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                                                                                      ~^~

R/DAISIE_dataprep.R:175:121: style: Only use double-quotes.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                                                                                        ^~

R/DAISIE_dataprep.R:176:1: style: Lines should not be more than 80 characters.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:176:9: style: Place a space before left parenthesis, except in a function call.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
        ^

R/DAISIE_dataprep.R:176:22: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                     ^

R/DAISIE_dataprep.R:176:59: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                          ^

R/DAISIE_dataprep.R:176:81: style: Do not place spaces around code in parentheses or square brackets.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                ^

R/DAISIE_dataprep.R:176:82: style: There should be a space between right parenthesis and an opening curly brace.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                 ^~

R/DAISIE_dataprep.R:177:1: style: Lines should not be more than 80 characters.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/create_CS_version.R:15:1: style: Variable and function name style should be snake_case.

create_CS_version <- function(model = 1,
^~~~~~~~~~~~~~~~~

R/create_CS_version.R:19:3: style: Variable and function name style should be snake_case.

CS_version <- list(model = model,
  ^~~~~~~~~~

R/create_test_simulation_output.R:4:1: style: Lines should not be more than 80 characters.

#' @param island_ontogeny Boolean indicating if an ontogeny or no ontogeny scenario
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/create_test_simulation_output.R:30:20: warning: no visible global function definition for ‘is_island_ontogeny_input’

testit::assert(is_island_ontogeny_input(island_ontogeny))
                   ^~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_area_params.R:16:1: style: functions should have cyclomatic complexity of less than 15, this has 23.

are_area_params <- function(area_params) {
^

R/DAISIE_area_params.R:34:1: style: Lines should not be more than 80 characters.

#' @param proportional_peak_t value from 0 to 1 indicating where in the island's history the
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_area_params.R:39:1: style: Lines should not be more than 80 characters.

#' @return list of numerical values containing area parameters for island ontogeny
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:6:1: style: functions should have cyclomatic complexity of less than 15, this has 35.

are_rates <- function(x) {
^

R/DAISIE_check_format.R:33:1: style: Lines should not be more than 80 characters.

if (island_ontogeny != "const" && island_ontogeny != "linear" && island_ontogeny != "beta") return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:46:1: style: Lines should not be more than 80 characters.

if (island_ontogeny != 0 && island_ontogeny != 1 && island_ontogeny != 2) return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:68:1: style: Lines should not be more than 80 characters.

if (!"island_age" %in% names(simulation_outputs[[n_replicate]][[1]])) return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:70:1: style: Lines should not be more than 80 characters.

!"not_present_type1" %in% names(simulation_outputs[[n_replicate]][[1]]))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:73:1: style: Lines should not be more than 80 characters.

if (!"stt_all" %in% names(simulation_outputs[[n_replicate]][[1]])) return(FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:75:7: style: Commented code should be removed.

# if (!"branching_times" %in% names(simulation_outputs)) return(FALSE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:76:7: style: Commented code should be removed.

# if (!"stac" %in% names(simulation_outputs)) return(FALSE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_check_format.R:77:7: style: Commented code should be removed.

# if (!"missing_species" %in% names(simulation_outputs)) return(FALSE)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:5:1: style: Lines should not be more than 80 characters.

#' @param island_spec matrix with species on island (state of system at each time point)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:10:1: style: Lines should not be more than 80 characters.

#' @return list with the island information, composed stt table, branching times of extant
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:12:1: style: Variable and function name style should be snake_case.

DAISIE_create_island <- function(stt_table,
^~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:18:1: style: Lines should not be more than 80 characters.

### if there are no species on the island branching_times = island_age, stac = 0, missing_species = 0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:19:27: style: Commas should always have a space after.

if (length(island_spec[,1]) == 0) {
                          ^

R/DAISIE_create_island.R:45:1: style: Lines should not be more than 80 characters.

island_spec[, "branching time (BP)"] <- totaltime - as.numeric(island_spec[, "branching time (BP)"])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:46:1: style: Lines should not be more than 80 characters.

island_spec[, "Colonisation time (BP)"] <- totaltime - as.numeric(island_spec[, "Colonisation time (BP)"])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:56:1: style: Lines should not be more than 80 characters.

colonists_present <- sort(as.numeric(unique(island_spec[, 'Mainland Ancestor'])))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:56:65: style: Only use double-quotes.

colonists_present <- sort(as.numeric(unique(island_spec[, 'Mainland Ancestor'])))
                                                                ^~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:61:1: style: Lines should not be more than 80 characters.

subset_island <- island_spec[which(island_spec[, 'Mainland Ancestor'] == colonists_present[i]),]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:61:58: style: Only use double-quotes.

subset_island <- island_spec[which(island_spec[, 'Mainland Ancestor'] == colonists_present[i]),]
                                                         ^~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:61:104: style: Commas should always have a space after.

subset_island <- island_spec[which(island_spec[, 'Mainland Ancestor'] == colonists_present[i]),]
                                                                                                       ^

R/DAISIE_create_island.R:69:1: style: Lines should not be more than 80 characters.

island_spec = subset_island,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:71:1: style: Lines should not be more than 80 characters.

keep_final_state = keep_final_state)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_create_island.R:80:1: style: Lines should not be more than 80 characters.

taxon_list = island_clades_info, island_spec = island_spec)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:2:1: style: Lines should not be more than 80 characters.

#' @title Colonization and branching times of 8 terrestrial avifaunal clades in list
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:7:1: style: Lines should not be more than 80 characters.

#' #' @description A list containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:25:1: style: Lines should not be more than 80 characters.

#' and Endemic anagenetic species. For Endemic cladogenetic species these should be
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:47:1: style: Lines should not be more than 80 characters.

#' @title Colonization and branching times of 8 terrestrial avifaunal clades in list
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:52:1: style: Lines should not be more than 80 characters.

#' @description A list containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:92:1: style: Lines should not be more than 80 characters.

#' @title Colonization and branching times of 8 terrestrial avifaunal Galápagos clades in table
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:96:1: style: Lines should not be more than 80 characters.

#' @description A table containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:103:1: style: Lines should not be more than 80 characters.

#' * Non_endemic: for non-endemic island species when an approximate time of colonisation is known \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:104:1: style: Lines should not be more than 80 characters.

#' * Non_endemic_MaxAge: for non-endemic island species when colonisation time is unknown \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:105:1: style: Lines should not be more than 80 characters.

#' * Endemic: for endemic species when an approximate colonisation time is known \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:106:1: style: Lines should not be more than 80 characters.

#' * "Endemic_MaxAge": applies to endemic species or endemic clades for cases where the
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:109:1: style: Lines should not be more than 80 characters.

#' This could for example apply to endemic species that have recently gone extinct because
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:113:1: style: Lines should not be more than 80 characters.

#' time of the first cladogenetic event is known, but the precise time of colonisation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:120:1: style: Lines should not be more than 80 characters.

#' \code{$Branching_times} - Stem age of the population/species in the case of "Non_endemic",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:121:1: style: Lines should not be more than 80 characters.

#'  "Non_endemic_MaxAge" and "Endemic" species with no extant close relatives on the island.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:124:1: style: Lines should not be more than 80 characters.

#' radiation, including the stem age of the radiation (colonisation time estimate).\cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:134:1: style: Lines should not be more than 80 characters.

#' @title 1000 islands in RAW format simulated with the ML parameters of the CR model
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:137:1: style: Lines should not be more than 80 characters.

#' @description Each simulated dataset is an element of the list, which can be called using
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:168:1: style: Lines should not be more than 80 characters.

#' @title 1000 islands in DAISIE format simulated with the ML parameters of the CR
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:171:1: style: Lines should not be more than 80 characters.

#' @description Each simulated dataset is an element of the list, which can be called using
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:207:1: style: Lines should not be more than 80 characters.

#' @description Each simulated dataset is an element of the list, which can be called using
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:257:1: style: Lines should not be more than 80 characters.

#' @description A list containing the colonization and branching times of the terrestrial
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:266:1: style: Lines should not be more than 80 characters.

#' The following elements of the list each contains information on a single colonist lineage
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:280:1: style: Lines should not be more than 80 characters.

#' #' \code{$missing_species} - number of island species that were not sampled for
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:288:1: style: Lines should not be more than 80 characters.

#' R. Equilibrium bird species diversity in Atlantic islands. 2017 Current Biology, 27, 1660-1666.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:295:1: style: Lines should not be more than 80 characters.

#' format, accepted by DAISIE_ML, DAISIE_SR_ML, DAISIE_loglik_all and DAISIE_SR_loglik_all
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:331:1: style: Lines should not be more than 80 characters.

#' @seealso \code{\link{DAISIE_dataprep}}, \code{\link{DAISIE_ML}}, \code{\link{DAISIE_SR_ML}}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:333:1: style: Lines should not be more than 80 characters.

#' elevates equilibrium diversity via increasing colonisation. (2020) Journal of Biogeography \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:340:1: style: Lines should not be more than 80 characters.

#' @format A dataframe containing information on archipelago name, area, age and distance from the mainland
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:341:1: style: Lines should not be more than 80 characters.

#' @description A dataframe with in subsequent columns the name of the archipelago (Archipelago)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:342:1: style: Lines should not be more than 80 characters.

#' the area of the archipelago (Area), the age (Age) and the distance from the mainland (Distance)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:343:1: style: Lines should not be more than 80 characters.

#' @source Valente et al A simple dynamic model explain the diversty of island birds worldwide. \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:16:1: style: Lines should not be more than 80 characters.

#' "Non_endemic": applies to non-endemic species when an approximate colonisation time is known \cr *
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:18:1: style: Lines should not be more than 80 characters.

#' colonisation time is unknown \cr * "Endemic": applies to endemic species or endemic
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:19:1: style: Lines should not be more than 80 characters.

#' clades when an approximate colonisation time is known \cr * "Endemic_MaxAge": applies to endemic
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:20:1: style: Lines should not be more than 80 characters.

#' species or endemic clades for cases where the colonisation time is unknown, or when
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:22:1: style: Lines should not be more than 80 characters.

#' This could for example apply to endemic species that have recently gone extinct because
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:26:1: style: Lines should not be more than 80 characters.

#' time of the first cladogenetic event is known, but the precise time of colonisation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:27:1: style: Lines should not be more than 80 characters.

#' is not. \cr * "Endemic&Non_Endemic": when endemic clade is present and its mainland
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:31:1: style: Lines should not be more than 80 characters.

#'  be equal to the number of species in the clade minus 1 \cr \code{$Branching_times}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:32:1: style: Lines should not be more than 80 characters.

#'  - Stem age of the population/species in the case of "Non_endemic", "Non_endemic_MaxAge"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:33:1: style: Lines should not be more than 80 characters.

#'  and "Endemic" species with no extant close relatives on the island. Set "NA" if
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:36:1: style: Lines should not be more than 80 characters.

#' radiation, including the stem age of the radiation (colonisation time estimate).\cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:79:1: style: Lines should not be more than 80 characters.

#' \cr * Endemic_MaxAge: 6 (if colonisation time and cladogenesis times were given)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:81:1: style: Lines should not be more than 80 characters.

#' for particular clade (only applicable for endemic clades) \cr \code{$type_1or2}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:93:1: style: Lines should not be more than 80 characters.

#' ### Create Galapagos data object where all taxa have the same macroevolutionary process
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:103:1: style: Lines should not be more than 80 characters.

#' # for the Darwin's finches. One process applies to type 1 species (all species
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:118:1: style: Lines should not be more than 80 characters.

#' # for the Darwin's finches. One process applies to type 1 species (all species
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:120:1: style: Lines should not be more than 80 characters.

#' # (Darwin's finches). Set fraction of potential colonists of type 2 to be 0.163.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:133:1: style: functions should have cyclomatic complexity of less than 15, this has 28.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
^

R/DAISIE_dataprep.R:133:1: style: Lines should not be more than 80 characters.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:133:1: style: Variable and function name style should be snake_case.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
^~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:133:17: style: Use <-, not =, for assignment.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                ^

R/DAISIE_dataprep.R:133:38: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                     ^

R/DAISIE_dataprep.R:133:49: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                ^

R/DAISIE_dataprep.R:133:49: style: Variable and function name style should be snake_case.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                ^

R/DAISIE_dataprep.R:133:51: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                  ^

R/DAISIE_dataprep.R:133:74: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                                         ^

R/DAISIE_dataprep.R:133:131: style: Commas should always have a space after.

DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_type2_clades = NA, prop_type2_pool = "proportional",epss = 1E-5)
                                                                                                                                  ^

R/DAISIE_dataprep.R:134:1: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​{
^

R/DAISIE_dataprep.R:135:24: style: Use <-, not =, for assignment.

number_colonisations = nrow(datatable)
                       ^

R/DAISIE_dataprep.R:136:12: style: Use <-, not =, for assignment.

datalist = list()
           ^

R/DAISIE_dataprep.R:137:13: style: Variable and function name style should be snake_case.

datatable$Missing_species<-as.numeric(as.character(datatable$Missing_species))
            ^~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:137:28: style: Put spaces around all infix operators.

datatable$Missing_species<-as.numeric(as.character(datatable$Missing_species))
                          ~^~~

R/DAISIE_dataprep.R:139:5: style: Place a space before left parenthesis, except in a function call.

if(number_clade_types == 1)
    ^

R/DAISIE_dataprep.R:140:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^

R/DAISIE_dataprep.R:141:1: style: Lines should not be more than 80 characters.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:141:19: style: Use <-, not =, for assignment.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                  ^

R/DAISIE_dataprep.R:141:36: style: Put spaces around all infix operators.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                  ~^~

R/DAISIE_dataprep.R:141:48: style: Commas should always have a space after.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                               ^

R/DAISIE_dataprep.R:141:59: style: Put spaces around all infix operators.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                                         ~^~

R/DAISIE_dataprep.R:141:60: style: Place a space before left parenthesis, except in a function call.

datalist[[1]] = list(island_age=island_age,not_present=(M - number_colonisations))
                                                           ^

R/DAISIE_dataprep.R:143:5: style: Place a space before left parenthesis, except in a function call.

if(number_clade_types == 2)
    ^

R/DAISIE_dataprep.R:144:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^

R/DAISIE_dataprep.R:145:32: style: Use <-, not =, for assignment.

number_type2_colonisations = length(list_type2_clades)
                               ^

R/DAISIE_dataprep.R:146:1: style: Lines should not be more than 80 characters.

number_type1_colonisations = number_colonisations - number_type2_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:146:32: style: Use <-, not =, for assignment.

number_type1_colonisations = number_colonisations - number_type2_colonisations
                               ^

R/DAISIE_dataprep.R:148:5: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​    {
    ^

R/DAISIE_dataprep.R:149:1: style: Lines should not be more than 80 characters.

not_present_type1 = DDD::roundn((M/number_colonisations) * number_type1_colonisations) - number_type1_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:149:25: style: Use <-, not =, for assignment.

not_present_type1 = DDD::roundn((M/number_colonisations) * number_type1_colonisations) - number_type1_colonisations
                        ^

R/DAISIE_dataprep.R:149:41: style: Put spaces around all infix operators.

not_present_type1 = DDD::roundn((M/number_colonisations) * number_type1_colonisations) - number_type1_colonisations
                                       ~^~

R/DAISIE_dataprep.R:150:1: style: Lines should not be more than 80 characters.

not_present_type2 = DDD::roundn((M/number_colonisations) * number_type2_colonisations) - number_type2_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:150:25: style: Use <-, not =, for assignment.

not_present_type2 = DDD::roundn((M/number_colonisations) * number_type2_colonisations) - number_type2_colonisations
                        ^

R/DAISIE_dataprep.R:150:41: style: Put spaces around all infix operators.

not_present_type2 = DDD::roundn((M/number_colonisations) * number_type2_colonisations) - number_type2_colonisations
                                       ~^~

R/DAISIE_dataprep.R:152:1: style: Lines should not be more than 80 characters.

not_present_type1 = DDD::roundn(M * (1 - prop_type2_pool)) - number_type1_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:152:25: style: Use <-, not =, for assignment.

not_present_type1 = DDD::roundn(M * (1 - prop_type2_pool)) - number_type1_colonisations
                        ^

R/DAISIE_dataprep.R:153:1: style: Lines should not be more than 80 characters.

not_present_type2 = DDD::roundn(M * prop_type2_pool) - number_type2_colonisations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:153:25: style: Use <-, not =, for assignment.

not_present_type2 = DDD::roundn(M * prop_type2_pool) - number_type2_colonisations
                        ^

R/DAISIE_dataprep.R:155:1: style: Lines should not be more than 80 characters.

datalist[[1]] = list(island_age = island_age, not_present_type1 = not_present_type1, not_present_type2 = not_present_type2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:155:19: style: Use <-, not =, for assignment.

datalist[[1]] = list(island_age = island_age, not_present_type1 = not_present_type1, not_present_type2 = not_present_type2)
                  ^

R/DAISIE_dataprep.R:157:13: warning: Avoid 1:nrow(...) expressions, use seq_len.

for (i in 1:nrow(datatable))
            ^

R/DAISIE_dataprep.R:158:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^

R/DAISIE_dataprep.R:159:1: style: Lines should not be more than 80 characters.

datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:159:23: style: Use <-, not =, for assignment.

datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
                      ^

R/DAISIE_dataprep.R:159:71: style: Commas should always have a space after.

datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
                                                                      ^

R/DAISIE_dataprep.R:160:1: style: Lines should not be more than 80 characters.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:160:51: style: Commas should always have a space after.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
                                                  ^

R/DAISIE_dataprep.R:160:61: style: Commas should always have a space after.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
                                                            ^

R/DAISIE_dataprep.R:160:91: style: Commas should always have a space after.

branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
                                                                                          ^

R/DAISIE_dataprep.R:161:1: style: Lines should not be more than 80 characters.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:161:14: style: Use <-, not =, for assignment.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
             ^

R/DAISIE_dataprep.R:161:77: style: Commas should always have a space after.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
                                                                            ^

R/DAISIE_dataprep.R:161:97: style: Commas should always have a space after.

the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))
                                                                                                ^

R/DAISIE_dataprep.R:163:7: style: Place a space before left parenthesis, except in a function call.

if(is.na(the_brts[1])){
      ^

R/DAISIE_dataprep.R:163:26: style: There should be a space between right parenthesis and an opening curly brace.

if(is.na(the_brts[1])){
                         ^~

R/DAISIE_dataprep.R:164:15: style: Put spaces around all infix operators.

the_brts<-island_age
             ~^~~

R/DAISIE_dataprep.R:165:1: style: Lines should not be more than 80 characters.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:165:9: style: Place a space before left parenthesis, except in a function call.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
        ^

R/DAISIE_dataprep.R:165:22: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                     ^

R/DAISIE_dataprep.R:165:59: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                          ^

R/DAISIE_dataprep.R:165:81: style: Do not place spaces around code in parentheses or square brackets.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                ^

R/DAISIE_dataprep.R:165:82: style: There should be a space between right parenthesis and an opening curly brace.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                 ^~

R/DAISIE_dataprep.R:166:1: style: Lines should not be more than 80 characters.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:166:34: style: Use <-, not =, for assignment.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
                                 ^

R/DAISIE_dataprep.R:166:68: style: Commas should always have a space after.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
                                                                   ^

R/DAISIE_dataprep.R:167:21: style: Commas should always have a space after.

datatable[i,"Status"] <-"Endemic_MaxAge"}
                    ^

R/DAISIE_dataprep.R:167:31: style: Put spaces around all infix operators.

datatable[i,"Status"] <-"Endemic_MaxAge"}
                              ^~~

R/DAISIE_dataprep.R:167:49: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

datatable[i,"Status"] <-"Endemic_MaxAge"}
                                                ^

R/DAISIE_dataprep.R:168:1: style: Lines should not be more than 80 characters.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:168:9: style: Place a space before left parenthesis, except in a function call.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
        ^

R/DAISIE_dataprep.R:168:22: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
                     ^

R/DAISIE_dataprep.R:168:63: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
                                                              ^

R/DAISIE_dataprep.R:168:89: style: There should be a space between right parenthesis and an opening curly brace.

if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
                                                                                        ^~

R/DAISIE_dataprep.R:169:1: style: Lines should not be more than 80 characters.

​        levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:169:34: style: Use <-, not =, for assignment.

​        levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
                                 ^

R/DAISIE_dataprep.R:169:68: style: Commas should always have a space after.

​        levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
                                                                   ^

R/DAISIE_dataprep.R:170:21: style: Commas should always have a space after.

datatable[i,"Status"] <-"Non_endemic_MaxAge"}
                    ^

R/DAISIE_dataprep.R:170:31: style: Put spaces around all infix operators.

datatable[i,"Status"] <-"Non_endemic_MaxAge"}
                              ^~~

R/DAISIE_dataprep.R:170:53: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

datatable[i,"Status"] <-"Non_endemic_MaxAge"}
                                                    ^

R/DAISIE_dataprep.R:173:7: style: Place a space before left parenthesis, except in a function call.

if(max(the_brts)>island_age){
      ^

R/DAISIE_dataprep.R:173:21: style: Put spaces around all infix operators.

if(max(the_brts)>island_age){
                   ~^~

R/DAISIE_dataprep.R:173:32: style: There should be a space between right parenthesis and an opening curly brace.

if(max(the_brts)>island_age){
                               ^~

R/DAISIE_dataprep.R:174:19: style: Only use double-quotes.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                  ^~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:174:43: style: Commas should always have a space after.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                                          ^

R/DAISIE_dataprep.R:174:57: style: Commas should always have a space after.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                                                        ^

R/DAISIE_dataprep.R:174:57: style: Only use double-quotes.

​      print(paste('Colonisation time of ',max(the_brts),' for ',
                                                        ^~~~~~~

R/DAISIE_dataprep.R:175:1: style: Lines should not be more than 80 characters.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:175:37: style: Commas should always have a space after.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                    ^

R/DAISIE_dataprep.R:175:52: style: Commas should always have a space after.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                   ^

R/DAISIE_dataprep.R:175:52: style: Only use double-quotes.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:175:117: style: Commas should always have a space after.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                                                                                    ^

R/DAISIE_dataprep.R:175:120: style: Put spaces around all infix operators.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                                                                                      ~^~

R/DAISIE_dataprep.R:175:121: style: Only use double-quotes.

​           as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
                                                                                                                        ^~

R/DAISIE_dataprep.R:176:1: style: Lines should not be more than 80 characters.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:176:9: style: Place a space before left parenthesis, except in a function call.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
        ^

R/DAISIE_dataprep.R:176:22: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                     ^

R/DAISIE_dataprep.R:176:59: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                          ^

R/DAISIE_dataprep.R:176:81: style: Do not place spaces around code in parentheses or square brackets.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                ^

R/DAISIE_dataprep.R:176:82: style: There should be a space between right parenthesis and an opening curly brace.

if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
                                                                                 ^~

R/DAISIE_dataprep.R:177:1: style: Lines should not be more than 80 characters.

​        levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please sign in to comment.