Skip to content

Commit

Permalink
Merge pull request #104 from rsetienne/luis
Browse files Browse the repository at this point in the history
Luis
  • Loading branch information
Neves-P authored May 14, 2020
2 parents 49c9643 + fbd1944 commit e7a41da
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 90 deletions.
46 changes: 28 additions & 18 deletions R/DAISIE_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#' \code{$colonist_name} - the name of the species or clade
#' that colonized the island \cr
#' \code{$branching_times} - island age and stem
#' age of the population/species in the case of Non-endemic, Non-endemic_MaxAge
#' and Endemic anagenetic species. For cladogenetic species these should be
#' age of the population/species in the case of Non_endemic, Non_endemic_MaxAge
#' and Endemic anagenetic species. For Endemic cladogenetic species these should be
#' island age and branching times of the radiation including the stem age of
#' the radiation.\cr
#' \code{$stac} - the status of the colonist \cr \cr
Expand Down Expand Up @@ -89,29 +89,39 @@ NULL


#' @name Galapagos_datatable
#' @title Colonization and branching times of 8 terrestrial avifaunal clades in table
#' @title Colonization and branching times of 8 terrestrial avifaunal Galápagos clades in table
#' format.
#' @docType data
#' @format A table with 8 rows and 4 columns.
#' @description A table containing the colonization and branching times of the terrestrial
#' avifauna in the Galapagos. Each row on the table represents and independent
#' avifauna in the Galápagos. Each row on the table represents and independent
#' colonisation event. The table has four columns. \cr \cr
#' \code{$Clade_name} -
#' name of independent colonization event \cr
#' \code{$Status} - One of the
#' following categories: \cr
#' * Non_endemic: for cases where both island and non-island populations of the species have been sampled) \cr
#' * Non_endemic_MaxAge: for cases where island population of the species has not
#' been sampled and only the age of the species is available) \cr
#' * Endemic: applicable for both cladogenetic or anagenetic species \cr
#' * Non_endemic: for non-endemic island species when an approximate time of colonisation is known \cr
#' * Non_endemic_MaxAge: for non-endemic island species when colonisation time is unknown \cr
#' * Endemic: for endemic species when an approximate colonisation time is known \cr
#' * "Endemic_MaxAge": applies to endemic species or endemic clades for cases where the
#' colonisation time is unknown, or when
#' the user wants to specify an upper bound for colonisation.
#' This could for example apply to endemic species that have recently gone extinct because
#' of anthropogenic causes, and which are not included
#' in the phylogeny ("NA" should be given in the branching times column). It
#' could also apply to insular radiations with long stem branches, for which the
#' time of the first cladogenetic event is known, but the precise time of colonisation
#' is not.\cr
#' * Endemic&Non_Endemic: when endemic clade and mainland ancestor has
#' re-colonized \cr
#'
#' \code{$Missing_species} - Number of island species that
#' were not sampled for particular clade (only applicable for endemic clades)\cr
#' \code{$Branching_times} - Stem age of the population/species in the case
#' of Non-endemic, Non-endemic_MaxAge and Endemic anagenetic species. For
#' cladogenetic species these should be branching times of the radiation
#' including the stem age of the radiation.\cr
#' \code{$Branching_times} - Stem age of the population/species in the case of "Non_endemic",
#' "Non_endemic_MaxAge" and "Endemic" species with no extant close relatives on the island.
#' Set "NA" if colonisation time unknown and no upper bound is known.
#' For "Endemic" cladogenetic species these should be branching times of the
#' radiation, including the stem age of the radiation (colonisation time estimate).\cr
#' @seealso \code{\link{DAISIE_dataprep}}, \code{\link{DAISIE_ML}}
#' @source Valente, L.M., A.B. Phillimore and R.S. Etienne (2015). Equilibrium
#' and non-equilibrium dynamics simultaneously operate in the Galapagos
Expand Down Expand Up @@ -275,8 +285,7 @@ NULL
#' @seealso \code{\link{DAISIE_dataprep}}, \code{\link{DAISIE_ML}}
#' @source
#' Valente L., Illera J.C, Havenstein K., Pallien T., Etienne R.S., Tiedemann
#' R. Macroevolutionary dynamics in Atlantic island avifaunas: were MacArthur &
#' Wilson right about equilibrium? Under review.
#' R. Equilibrium bird species diversity in Atlantic islands. 2017 Current Biology, 27, 1660-1666.
#' @keywords datasets
NULL

Expand Down Expand Up @@ -312,16 +321,16 @@ NULL
#' * Non_endemic_MaxAge: 1 \cr
#' * Endemic: 2 \cr
#' * Endemic&Non_Endemic: 3 \cr
#' * Non_endemic: 4 \cr \cr
#' * Non_endemic: 4 \cr
#' * Endemic_MaxAge: 5 or 6 \cr \cr
#' \code{$missing_species} - number of island species
#' that were not sampled for particular clade (only applicable for endemic
#' clades) \cr
#' \code{$type1or2} - whether the colonist belongs to type 1 or
#' type 2. In this dataset all are equal to 1. \cr
#' @seealso \code{\link{DAISIE_dataprep}}, \code{\link{DAISIE_ML}}, \code{\link{DAISIE_SR_ML}}
#' @source Hauffe, T., D. Delicado, R.S. Etienne and L. Valente (submitted).
#' Lake expansion increases equilibrium diversity via the target effect of
#' island biogeography
#' @source Hauffe, T., D. Delicado, R.S. Etienne and L. Valente. Lake expansion
#' elevates equilibrium diversity via increasing colonisation. (2020) Journal of Biogeography \cr
#' @keywords datasets
NULL

Expand All @@ -331,5 +340,6 @@ NULL
#' @format A dataframe containing information on archipelago name, area, age and distance from the mainland
#' @description A dataframe with in subsequent columns the name of the archipelago (Archipelago)
#' the area of the archipelago (Area), the age (Age) and the distance from the mainland (Distance)
#' @source Valente et al A simple dynamic model explain the diversty of island birds worldwide. \cr
#' @keywords datasets
NULL
95 changes: 62 additions & 33 deletions R/DAISIE_dataprep.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,27 @@
#' table represents and independent colonisation event. Table has the following
#' four columns. \cr \cr \code{$Clade_name} - name of independent colonization
#' event \cr \code{$Status} - One of the following categories: \cr *
#' "Non_endemic": applies to non-endemic species for cases where both island
#' and non-island populations of the species have been sampled) \cr *
#' "Non_endemic_MaxAge": applies to non-endemic species for cases where island
#' individuals of the species have not been sampled and only the age of the
#' species is available) \cr * "Endemic": applies to endemic species and is
#' applicable for both cladogenetic and anagenetic species \cr *
#' "Endemic_MaxAge": applies to endemic species for cases where island
#' individuals of the species have not been sampled and only the age of the
#' species is available. This could apply to endemic species that have recently
#' gone extinct because of antropogenic causes that are (evidently) not
#' modelled, and for which no DNA data is available.\cr *
#' "Endemic&Non_Endemic": when endemic clade is present and its mainland
#' "Non_endemic": applies to non-endemic species when an approximate colonisation time is known \cr *
#' "Non_endemic_MaxAge": applies to non-endemic species for cases where
#' colonisation time is unknown \cr * "Endemic": applies to endemic species or endemic
#' clades when an approximate colonisation time is known \cr * "Endemic_MaxAge": applies to endemic
#' species or endemic clades for cases where the colonisation time is unknown, or when
#' the user wants to specify an upper bound for colonisation.
#' This could for example apply to endemic species that have recently gone extinct because
#' of anthropogenic causes, and which are not included
#' in the phylogeny ("NA" should be given in the branching times column). It
#' could also apply to insular radiations with long stem branches, for which the
#' time of the first cladogenetic event is known, but the precise time of colonisation
#' is not. \cr * "Endemic&Non_Endemic": when endemic clade is present and its mainland
#' ancestor has re-colonized \cr \code{$Missing_species} - Number of island
#' species that were not sampled for particular clade (only applicable for
#' "Endemic" clades) \cr \code{$Branching_times} - Stem age of the
#' population/species in the case of "Non-endemic", "Non-endemic_MaxAge" and
#' "Endemic" anagenetic species. For "Endemic" cladogenetic species these
#' should be branching times of the radiation including the stem age of the
#' radiation.\cr
#' "Endemic" clades). If NA is given in branching times column, this should
#' be equal to the number of species in the clade minus 1 \cr \code{$Branching_times}
#' - Stem age of the population/species in the case of "Non_endemic", "Non_endemic_MaxAge"
#' and "Endemic" species with no extant close relatives on the island. Set "NA" if
#' colonisation time unknown and no upper bound is known.
#' For "Endemic" cladogenetic species these should be branching times of the
#' radiation, including the stem age of the radiation (colonisation time estimate).\cr
#' @param island_age Age of island in appropriate units
#' @param M The size of the mainland pool, i.e the number of species that can
#' potentially colonize the island
Expand Down Expand Up @@ -73,10 +75,11 @@
#' are island age and branching times of the radiation including the stem age
#' of the radiation.\cr \code{$stac} - the status of the colonist \cr *
#' Non_endemic_MaxAge: 1 \cr * Endemic: 2 \cr * Endemic&Non_Endemic: 3 \cr *
#' Non_endemic: 4 \cr * Endemic_MaxAge: 5 \cr \code{$missing_species} - number
#' of island species that were not sampled for particular clade (only
#' applicable for endemic clades) \cr \code{$type_1or2} - whether the colonist
#' belongs to type 1 or type 2 \cr }
#' Non_endemic: 4 \cr * Endemic_MaxAge: 5 (if only colonisation time was given)
#' \cr * Endemic_MaxAge: 6 (if colonisation time and cladogenesis times were given)
#' \cr\code{$missing_species} - number of island species that were not sampled
#' for particular clade (only applicable for endemic clades) \cr \code{$type_1or2}
#' - whether the colonist belongs to type 1 or type 2 \cr }
#' @author Luis M Valente
#' @references Valente, L.M., A.B. Phillimore and R.S. Etienne (2015).
#' Equilibrium and non-equilibrium dynamics simultaneously operate in the
Expand Down Expand Up @@ -153,10 +156,30 @@ DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_ty
}
for (i in 1:nrow(datatable))
{
datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
datalist[[i + 1]] = list(colonist_name = as.character(datatable[i,"Clade_name"]),
branching_times = NA,stac = NA,missing_species = datatable[i,"Missing_species"], type1or2 = 1)
the_brts = rev(sort(as.numeric(unlist(strsplit(as.character(datatable[i,"Branching_times"]),split = ",")))))

if(max(the_brts)>island_age){print(paste('Colonisation time of ',max(the_brts),' for ',as.character(datatable[i,"Clade_name"]),' is older than island age, changed to island age as upper bound',sep=''))}
if(is.na(the_brts[1])){
the_brts<-island_age
if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
datatable[i,"Status"] <-"Endemic_MaxAge"}
if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
datatable[i,"Status"] <-"Non_endemic_MaxAge"}
}

if(max(the_brts)>island_age){
print(paste('Colonisation time of ',max(the_brts),' for ',
as.character(datatable[i,"Clade_name"]),'is older than island age, changed to island age as upper bound',sep=''))
if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" ){
levels(datatable$Status) = append(levels(datatable$Status),"Endemic_MaxAge")
datatable[i,"Status"] <-"Endemic_MaxAge"}
if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic"){
levels(datatable$Status) = append(levels(datatable$Status),"Non_endemic_MaxAge")
datatable[i,"Status"] <-"Non_endemic_MaxAge"}
}

if(length(the_brts) == 1)
{
Expand All @@ -166,33 +189,39 @@ DAISIE_dataprep = function(datatable,island_age,M,number_clade_types = 1,list_ty
{
the_brts[1] = min(the_brts[1],island_age - epss)
datalist[[i + 1]]$branching_times = c(island_age,the_brts)
if(the_brts[2]>=the_brts[1]){stop(paste('Cladogenetic event in ',
as.character(datatable[i,"Clade_name"]),'is older than the island, or of the same age as the island',sep=''))}
}

if(datatable[i,"Status"] == "Non_endemic_MaxAge")
if(datatable[i,"Status"] == "Non_endemic_MaxAge" | datatable[i,"Status"] == "Non_Endemic_MaxAge" |
datatable[i,"Status"] == "Non_Endemic_Max_Age" | datatable[i,"Status"] == "Non_endemic_maxage"
| datatable[i,"Status"] == "Non_Endemic_Maxage" | datatable[i,"Status"] == "Non_Endemic_maxage"
| datatable[i,"Status"] == "Non_endemic_Maxage")
{
datalist[[i + 1]]$stac = 1
}
if(datatable[i,"Status"] == "Endemic")
if(datatable[i,"Status"] == "Endemic" | datatable[i,"Status"] == "endemic" )
{
datalist[[i + 1]]$stac = 2
if(max(the_brts)>island_age){
if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
if(length(the_brts) == 1){datalist[[i + 1]]$stac = 5}
}
}
if(datatable[i,"Status"] == "Endemic&Non_endemic")
if(datatable[i,"Status"] == "Endemic&Non_endemic" | datatable[i,"Status"] == "Endemic&Non_Endemic")
{
datalist[[i + 1]]$stac = 3
}
if(datatable[i,"Status"] == "Non_endemic")
if(datatable[i,"Status"] == "Non_endemic" | datatable[i,"Status"] == "Non_Endemic")
{
datalist[[i + 1]]$stac = 4
if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
}
if(datatable[i,"Status"] == "Endemic_MaxAge")
if(datatable[i,"Status"] == "Endemic_MaxAge" | datatable[i,"Status"] == "Endemic_maxage" | datatable[i,"Status"] == "Endemic_Max_Age"
| datatable[i,"Status"] == "Endemic_Maxage")
{
if(length(the_brts) == 1){ datalist[[i + 1]]$stac = 5}
if(length(the_brts) > 1) { datalist[[i + 1]]$stac = 6}
if(max(the_brts)>island_age){
if(length(the_brts) > 1){

stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
}
}
if(number_clade_types == 2)
{
Expand Down
8 changes: 4 additions & 4 deletions man/Biwa_datalist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 24 additions & 21 deletions man/DAISIE_dataprep.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/Galapagos_datalist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

3 comments on commit e7a41da

@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")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@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.