Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rsetienne committed Mar 12, 2020
1 parent d3066cf commit 62e1d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/DAISIE_sim_core.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ DAISIE_sim_update_state <- function(possible_event,maxspecID,mainland_spec,islan
if(mostrecentspl == "A")
{
#change the splitting date of the sister species so that it inherits the early splitting that used to belong to A.
# Bug fiux here thanks to Nadiah Kristensen: max -> min
# Bug fix here thanks to Nadiah Kristensen: max -> min
tochange = possiblesister[which(island_spec[possiblesister,6] == min(as.numeric(island_spec[possiblesister,6])))]
island_spec[tochange,6] = island_spec[extinct,6]
}
Expand Down

1 comment on commit 62e1d1c

@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/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:12:34: style: Trailing whitespace is superfluous.

#' the following elements.\cr \cr 
                                 ^

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 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 cases where both island and non-island populations of the species have been sampled) \cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

#' * Non_endemic_MaxAge: for cases where island population of the species has not
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_data.R:124: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:125:27: style: Trailing whitespace is superfluous.

#' for the Galapagos data. 
                          ^

R/DAISIE_data.R:127: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:158: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:161: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:165:42: style: Trailing whitespace is superfluous.

#' \code{$island_age} - the island age\cr 
                                         ^

R/DAISIE_data.R:197: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:247: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:256: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:270: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:277:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:2:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:7:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:10:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:86:3: style: Trailing whitespace is superfluous.

#'  
  ^~

R/DAISIE_dataprep.R:87:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:88:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:89:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:90: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:91:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:98:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:100: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:100:82: style: Trailing whitespace is superfluous.

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

R/DAISIE_dataprep.R:101:79: style: Trailing whitespace is superfluous.

#' # except for Darwin's finches) and the other applies only to type 2 species 
                                                                              ^

R/DAISIE_dataprep.R:104:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:113:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:114:80: style: Trailing whitespace is superfluous.

#' ### Create Galapagos data object with a distinct macroevolutionary processes 
                                                                               ^

R/DAISIE_dataprep.R:115: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:116:79: style: Trailing whitespace is superfluous.

#' # except for Darwin's finches) and the other applies only to type 2 species 
                                                                              ^

R/DAISIE_dataprep.R:117: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:118:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_dataprep.R:128:3: style: Trailing whitespace is superfluous.

#' 
  ^

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

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:130: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:130: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:130: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:130: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:130: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:130: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:130: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:130: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:130: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:131: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:132:24: style: Use <-, not =, for assignment.

number_colonisations = nrow(datatable)
                       ^

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

datalist = list()
           ^

R/DAISIE_dataprep.R:134: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:134:28: style: Put spaces around all infix operators.

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

R/DAISIE_dataprep.R:135:1: style: Trailing whitespace is superfluous.

^~

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

if(number_clade_types == 1)
    ^

R/DAISIE_dataprep.R:137: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:138: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:138:19: style: Use <-, not =, for assignment.

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

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

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

R/DAISIE_dataprep.R:138: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:138:59: style: Put spaces around all infix operators.

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

R/DAISIE_dataprep.R:138: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:140:5: style: Place a space before left parenthesis, except in a function call.

if(number_clade_types == 2)
    ^

R/DAISIE_dataprep.R:141: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:142:32: style: Use <-, not =, for assignment.

number_type2_colonisations = length(list_type2_clades)
                               ^

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

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

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

number_type1_colonisations = number_colonisations - number_type2_colonisations
                               ^

R/DAISIE_dataprep.R:145: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:146: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:146:25: style: Use <-, not =, for assignment.

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

R/DAISIE_dataprep.R:146: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:147: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:147:25: style: Use <-, not =, for assignment.

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

R/DAISIE_dataprep.R:147: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:149: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:149:25: style: Use <-, not =, for assignment.

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

R/DAISIE_dataprep.R:150: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:150:25: style: Use <-, not =, for assignment.

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

R/DAISIE_dataprep.R:152: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:152: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:154:13: warning: Avoid 1:nrow(...) expressions, use seq_len.

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

R/DAISIE_dataprep.R:155: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:156:1: style: Lines should not be more than 80 characters.

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

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

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)
                      ^

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

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)
                                                                      ^

R/DAISIE_dataprep.R:156:86: style: Commas should always have a space after.

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)
                                                                                     ^

R/DAISIE_dataprep.R:156:107: style: Commas should always have a space after.

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)
                                                                                                          ^

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

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)
                                                                                                                    ^

R/DAISIE_dataprep.R:156:147: style: Commas should always have a space after.

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)
                                                                                                                                                  ^

R/DAISIE_dataprep.R:157: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:157: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:157: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:157: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:158:1: style: Trailing whitespace is superfluous.

^~~~

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

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',sep=''))}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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',sep=''))}
      ^

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

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',sep=''))}
                   ~^~

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

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',sep=''))}
                               ^~

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

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',sep=''))}
                                ^

R/DAISIE_dataprep.R:159:46: style: Only use double-quotes.

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',sep=''))}
                                             ^~~~~~~~~~~~~~~~~~~~~~~

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

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',sep=''))}
                                                                     ^

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

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',sep=''))}
                                                                                   ^

R/DAISIE_dataprep.R:159:84: style: Only use double-quotes.

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',sep=''))}
                                                                                   ^~~~~~~

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

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',sep=''))}
                                                                                           ^

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

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',sep=''))}
                                                                                                                    ^

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

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',sep=''))}
                                                                                                                                   ^

R/DAISIE_dataprep.R:159:132: style: Only use double-quotes.

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',sep=''))}
                                                                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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',sep=''))}
                                                                                                                                                               ^

R/DAISIE_dataprep.R:159:163: style: Put spaces around all infix operators.

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',sep=''))}
                                                                                                                                                                 ~^~

R/DAISIE_dataprep.R:159:164: style: Only use double-quotes.

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',sep=''))}
                                                                                                                                                                   ^~

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

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',sep=''))}
                                                                                                                                                                       ^

R/DAISIE_dataprep.R:160:1: style: Trailing whitespace is superfluous.

^~~~

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

if(length(the_brts) == 1) 
      ^

R/DAISIE_dataprep.R:161:30: style: Trailing whitespace is superfluous.

if(length(the_brts) == 1) 
                             ^

R/DAISIE_dataprep.R:162: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:163:1: style: Lines should not be more than 80 characters.

datalist[[i + 1]]$branching_times = c(island_age,min(the_brts,island_age - epss))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:163:41: style: Use <-, not =, for assignment.

datalist[[i + 1]]$branching_times = c(island_age,min(the_brts,island_age - epss))
                                        ^

R/DAISIE_dataprep.R:163:56: style: Commas should always have a space after.

datalist[[i + 1]]$branching_times = c(island_age,min(the_brts,island_age - epss))
                                                       ^

R/DAISIE_dataprep.R:163:69: style: Commas should always have a space after.

datalist[[i + 1]]$branching_times = c(island_age,min(the_brts,island_age - epss))
                                                                    ^

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

if(length(the_brts) > 1)  
      ^

R/DAISIE_dataprep.R:165:29: style: Trailing whitespace is superfluous.

if(length(the_brts) > 1)  
                            ^~

R/DAISIE_dataprep.R:166: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:167:41: style: Use <-, not =, for assignment.

datalist[[i + 1]]$branching_times = c(island_age,the_brts)
                                        ^

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

datalist[[i + 1]]$branching_times = c(island_age,the_brts)
                                                       ^

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

if(datatable[i,"Status"] == "Non_endemic_MaxAge")
      ^

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

if(datatable[i,"Status"] == "Non_endemic_MaxAge")
                   ^

R/DAISIE_dataprep.R:170: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:171:30: style: Use <-, not =, for assignment.

datalist[[i + 1]]$stac = 1
                             ^

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

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

R/DAISIE_dataprep.R:173:20: style: Commas should always have a space after.

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

R/DAISIE_dataprep.R:174: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:175:30: style: Use <-, not =, for assignment.

datalist[[i + 1]]$stac = 2
                             ^

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

if(max(the_brts)>island_age){
        ^

R/DAISIE_dataprep.R:176:23: style: Put spaces around all infix operators.

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

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

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

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

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
          ^

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

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                               ^~

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

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                ^

R/DAISIE_dataprep.R:177:45: style: Only use double-quotes.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                            ^~~~~~~~~~~~~~~

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

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                            ^

R/DAISIE_dataprep.R:177:86: style: Commas should always have a space after.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                     ^

R/DAISIE_dataprep.R:177:101: style: Commas should always have a space after.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                                    ^

R/DAISIE_dataprep.R:177:101: style: Only use double-quotes.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_dataprep.R:177:129: style: Commas should always have a space after.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                                                                ^

R/DAISIE_dataprep.R:177:132: style: Put spaces around all infix operators.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                                                                  ~^~

R/DAISIE_dataprep.R:177:133: style: Only use double-quotes.

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                                                                    ^~

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

if(length(the_brts) > 1){stop(paste('Radiation of ',as.character(datatable[i,"Clade_name"]),' is older than the island',sep=''))}
                                                                                                                                        ^

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

if(length(the_brts) == 1){datalist[[i + 1]]$stac = 5}
          ^

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

if(length(the_brts) == 1){datalist[[i + 1]]$stac = 5}
                                ^~

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

if(length(the_brts) == 1){datalist[[i + 1]]$stac = 5}
                                 ^

R/DAISIE_dataprep.R:178:58: style: Use <-, not =, for assignment.

if(length(the_brts) == 1){datalist[[i + 1]]$stac = 5}
                                                         ^

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

if(length(the_brts) == 1){datalist[[i + 1]]$stac = 5}
                                                            ^

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

if(datatable[i,"Status"] == "Endemic&Non_endemic")
      ^

R/DAISIE_dataprep.R:181:20: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic&Non_endemic")
                   ^

R/DAISIE_dataprep.R:182: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:183:30: style: Use <-, not =, for assignment.

datalist[[i + 1]]$stac = 3
                             ^

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

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

R/DAISIE_dataprep.R:185:20: style: Commas should always have a space after.

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

R/DAISIE_dataprep.R:186: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:187:30: style: Use <-, not =, for assignment.

datalist[[i + 1]]$stac = 4
                             ^

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

if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
        ^

R/DAISIE_dataprep.R:188:23: style: Put spaces around all infix operators.

if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
                     ~^~

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

if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
                                 ^~

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

if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
                                  ^

R/DAISIE_dataprep.R:188:59: style: Use <-, not =, for assignment.

if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
                                                          ^

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

if(max(the_brts)>island_age){datalist[[i + 1]]$stac = 1}
                                                             ^

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

if(datatable[i,"Status"] == "Endemic_MaxAge")
      ^

R/DAISIE_dataprep.R:190:20: style: Commas should always have a space after.

if(datatable[i,"Status"] == "Endemic_MaxAge")
                   ^

R/DAISIE_dataprep.R:191: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:192:30: style: Use <-, not =, for assignment.

datalist[[i + 1]]$stac = 5
                             ^

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

if(number_clade_types == 2)
      ^

R/DAISIE_dataprep.R:195: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:196:9: style: Place a space before left parenthesis, except in a function call.

if(length(which(list_type2_clades == datatable[i,"Clade_name"])) > 0)
        ^

R/DAISIE_dataprep.R:196:56: style: Commas should always have a space after.

if(length(which(list_type2_clades == datatable[i,"Clade_name"])) > 0)
                                                       ^

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

​      {
      ^

R/DAISIE_dataprep.R:198:36: style: Use <-, not =, for assignment.

datalist[[i + 1]]$type1or2 = 2
                                   ^

R/DAISIE_ExpEIN.R:2:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_ExpEIN.R:6:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_ExpEIN.R:7:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_ExpEIN.R:27:3: style: Trailing whitespace is superfluous.

#' 
  ^

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

#' ### Compute the expected values at t = 4, for a mainland pool size of 1000 potential
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

#' # colonists and a vector of 5 parameters (cladogenesis, extinction, clade-level carrying
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DAISIE_ExpEIN.R:31:3: style: Trailing whitespace is superfluous.

#'  
  ^~

R/DAISIE_ExpEIN.R:37:3: style: Trailing whitespace is superfluous.

#' 
  ^

R/DAISIE_ExpEIN.R:39:1: style: Variable and function name style should be snake_case.

DAISIE_ExpEIN = function(t,pars,M,initEI = c(0,0))
^~~~~~~~~~~~~

R/DAISIE_ExpEIN.R:39:15: style: Use <-, not =, for assignment.

DAISIE_ExpEIN = function(t,pars,M,initEI = c(0,0))
              ^

R/DAISIE_ExpEIN.R:39:28: style: Commas should always have a space after.

DAISIE_ExpEIN = function(t,pars,M,initEI = c(0,0))
                           ^

R/DAISIE_ExpEIN.R:39:33: style: Commas should always have a space after.

DAISIE_ExpEIN = function(t,pars,M,initEI = c(0,0))
                                ^

R/DAISIE_ExpEIN.R:39:33: style: Variable and function name style should be snake_case.

DAISIE_ExpEIN = function(t,pars,M,initEI = c(0,0))
                                ^

Please sign in to comment.