statgenlmu / coala

A Framework for Coalescent Simulation in R
Other
22 stars 4 forks source link

test different r version on travis #159

Closed paulstaab closed 8 years ago

lintr-bot commented 8 years ago

R/cache.R:16:3: warning: no visible binding for global variable ‘cache_env’

​  cache_env[[model$id]][[name]]
  ^~~~~~~~~

R/feature_growth.R:44:3: warning: no visible binding for global variable ‘growth_class’

​  growth_class$new(rate, population, time)
  ^~~~~~~~~~~~

R/feature_ignore_singletons.R:28:3: warning: no visible binding for global variable ‘ign_singletons_class’

​  ign_singletons_class$new()
  ^~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:40:29: warning: no visible global function definition for ‘get_snps’

​    is_singleton <- colSums(get_snps(segsites)) == 1
                            ^~~~~~~~

R/feature_ignore_singletons.R:41:15: style: Commas should never have a space before.

​    segsites[ , !is_singleton]
             ~^

R/feature_ignore_singletons.R:52:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_msms_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:56:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_scrm_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:60:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_migration.R:72:12: warning: no visible binding for global variable ‘migration_class’

​    return(migration_class$new(rate, time = time, symmetric = TRUE))
           ^~~~~~~~~~~~~~~

R/feature_migration.R:74:12: warning: no visible binding for global variable ‘migration_class’

​    return(migration_class$new(rate, pop_from, pop_to, time))
           ^~~~~~~~~~~~~~~

R/feature_mutation.R:178:3: warning: no visible global function definition for ‘conv_to_ms_arg.mutation’

​  conv_to_ms_arg.mutation(feature, model)
  ^~~~~~~~~~~~~~~~~~~~~~~

R/feature_outgroup.R:31:3: warning: no visible binding for global variable ‘outgroup_class’

​  outgroup_class$new(population)
  ^~~~~~~~~~~~~~

R/feature_outgroup.R:40:34: warning: no visible binding for global variable ‘is_feat_outgroup’

​  mask <- vapply(model$features, is_feat_outgroup, logical(1))
                                 ^~~~~~~~~~~~~~~~

R/feature_outgroup.R:49:15: warning: no visible global function definition for ‘get_outgroup’

​  outgroup <- get_outgroup(model)
              ^~~~~~~~~~~~

R/feature_outgroup.R:51:20: warning: no visible global function definition for ‘get_sample_size’

​  outgroup_size <- get_sample_size(model, for_sim)[outgroup]
                   ^~~~~~~~~~~~~~~

R/feature_pop_merge.R:47:3: warning: no visible binding for global variable ‘pop_merge_class’

​  pop_merge_class$new(time, pop_source, pop_target)
  ^~~~~~~~~~~~~~~

R/feature_recombination.R:35:3: warning: no visible binding for global variable ‘recombination_class’

​  recombination_class$new(rate)
  ^~~~~~~~~~~~~~~~~~~

R/feature_recombination.R:54:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.recombination <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sample.R:44:3: warning: no visible binding for global variable ‘sample_class’

​  sample_class$new(individuals, ploidy, time)
  ^~~~~~~~~~~~

R/feature_sample.R:59:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.logical(for_sim))
  ^~~~~~~~~~~

R/feature_sample.R:60:18: warning: no visible global function definition for ‘read_cache’

​  sample_size <- read_cache(model, paste0("sample_size_", for_sim))
                 ^~~~~~~~~~

R/feature_sample.R:63:40: warning: no visible binding for global variable ‘is_feat_sample’

​    feat_mask <- sapply(model$feature, is_feat_sample)
                                       ^~~~~~~~~~~~~~

R/feature_sample.R:68:36: warning: no visible global function definition for ‘get_ploidy’

​      sample_size <- sample_size * get_ploidy(model)
                                   ^~~~~~~~~~

R/feature_sample.R:70:36: warning: no visible global function definition for ‘get_samples_per_ind’

​      sample_size <- sample_size * get_samples_per_ind(model)
                                   ^~~~~~~~~~~~~~~~~~~

R/feature_sample.R:72:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, paste0("sample_size_", for_sim), sample_size)
    ^~~~~

R/feature_sample.R:80:34: warning: no visible binding for global variable ‘is_feat_sample’

​  mask <- vapply(model$features, is_feat_sample, logical(1))
                                 ^~~~~~~~~~~~~~

R/feature_sample.R:91:18: warning: no visible global function definition for ‘get_sample_size’

​  sample_size <- get_sample_size(model, TRUE)
                 ^~~~~~~~~~~~~~~

R/feature_selection.R:176:21: warning: no visible global function definition for ‘get_populations’

​    n_pop <- length(get_populations(model))
                    ^~~~~~~~~~~~~~~

R/feature_selection.R:191:36: style: Commas should never have a space before.

​                        n_pop, " " , paste(start_freq, collapse = " "), " ",
                                  ~^

R/feature_size_change.R:47:3: warning: no visible binding for global variable ‘size_change_class’

​  size_change_class$new(new_size, population, time)
  ^~~~~~~~~~~~~~~~~

R/feature_sumstats.R:18:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_msms_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sumstats.R:22:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_scrm_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sumstats.R:26:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_unphased.R:52:3: warning: no visible binding for global variable ‘unphased_class’

​  unphased_class$new(samples_per_ind)
  ^~~~~~~~~~~~~~

R/feature_unphased.R:60:34: warning: no visible binding for global variable ‘is_feat_unphased’

​  mask <- vapply(model$features, is_feat_unphased, logical(1))
                                 ^~~~~~~~~~~~~~~~

R/feature_unphased.R:68:11: warning: no visible global function definition for ‘get_feature_unphased’

​  feat <- get_feature_unphased(model)
          ^~~~~~~~~~~~~~~~~~~~

R/feature_unphased.R:69:29: warning: no visible global function definition for ‘get_ploidy’

​  if (is.null(feat)) return(get_ploidy(model))
                            ^~~~~~~~~~

R/import_popgenome.R:19:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.GENOME <- function(data, only_synonymous = FALSE, ...) {
^~~~~~~~~~~~~~~~~~

R/import_popgenome.R:20:3: warning: no visible global function definition for ‘require_package’

​  require_package("PopGenome")
  ^~~~~~~~~~~~~~~

R/import_popgenome.R:43:43: style: Commas should never have a space before.

​      seg_sites <- bam[c(pops, outgroup), , drop = FALSE]
                                         ~^

R/import_popgenome.R:49:5: warning: no visible global function definition for ‘create_segsites’

​    create_segsites(seg_sites, pos)
    ^~~~~~~~~~~~~~~

R/import_popgenome.R:56:3: warning: no visible global function definition for ‘require_package’

​  require_package("PopGenome")
  ^~~~~~~~~~~~~~~

R/interface_abc.R:80:15: warning: no visible global function definition for ‘get_summary_statistics’

​  sumstats <- get_summary_statistics(model)
              ^~~~~~~~~~~~~~~~~~~~~~

R/interface_abc.R:84:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(is.numeric(value))
      ^~~~~~~~~~~

R/interface_abc.R:86:1: style: lines should not be more than 80 characters.

​        warning("Value of the ", stat$get_name(), " statistic is not a vector. ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/locus.R:84:3: warning: no visible binding for global variable ‘locus_class’

​  locus_class$new(length, 1)
  ^~~~~~~~~~~

R/locus.R:92:3: warning: no visible binding for global variable ‘locus_class’

​  locus_class$new(round(length), number)
  ^~~~~~~~~~~

R/locus.R:151:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/locus.R:152:12: warning: no visible global function definition for ‘get_locus_group’

​  group <- get_locus_group(model, locus)
           ^~~~~~~~~~~~~~~

R/model_build.R:10:7: warning: no visible global function definition for ‘is.model’

​  if (is.model(e1)) return(add_to_model(e2, e1, e2name))
      ^~~~~~~~

R/model_build.R:10:28: warning: no visible global function definition for ‘add_to_model’

​  if (is.model(e1)) return(add_to_model(e2, e1, e2name))
                           ^~~~~~~~~~~~

R/model_build.R:48:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:54:12: warning: no visible global function definition for ‘add_variation’

​  model <- add_variation(model)
           ^~~~~~~~~~~~~

R/model_build.R:56:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:79:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:86:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_check.R:18:16: warning: no visible global function definition for ‘get_simulator’

​    simprog <- get_simulator(simprog_name)
               ^~~~~~~~~~~~~

R/model_getters.R:15:13: warning: no visible global function definition for ‘is.model’

​  stopifnot(is.model(model))
            ^~~~~~~~

R/model_getters.R:17:16: warning: no visible global function definition for ‘read_cache’

​  par_table <- read_cache(model, "par_table")
               ^~~~~~~~~~

R/model_getters.R:35:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "par_table", par_table)
    ^~~~~

R/model_getters.R:45:13: warning: no visible global function definition for ‘is.model’

​  stopifnot(is.model(model))
            ^~~~~~~~

R/model_getters.R:59:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:71:14: warning: no visible global function definition for ‘get_locus_group’

​    group <- get_locus_group(model, locus)
             ^~~~~~~~~~~~~~~

R/model_getters.R:75:21: style: Commas should never have a space before.

​  if (sum(llm[group , c(1:2, 4:5)]) == 0) return(llm[group , 3])
                   ~^

R/model_getters.R:75:60: style: Commas should never have a space before.

​  if (sum(llm[group , c(1:2, 4:5)]) == 0) return(llm[group , 3])
                                                          ~^

R/model_getters.R:81:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:82:25: style: Commas should never have a space before.

​  min(which(cumsum(llm[ , "number"]) >= locus))
                       ~^

R/model_getters.R:87:8: warning: no visible global function definition for ‘get_locus_length_matrix’

​  nrow(get_locus_length_matrix(model))
       ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:94:49: warning: no visible binding for global variable ‘is_feat_sample’

​  feat <- model$features[vapply(model$features, is_feat_sample, logical(1))]
                                                ^~~~~~~~~~~~~~

R/model_getters.R:96:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(pop_number > 0)
  ^~~~~~~~~~~

R/model_getters.R:105:10: warning: no visible global function definition for ‘read_cache’

​  llm <- read_cache(model, "llm")
         ^~~~~~~~~~

R/model_getters.R:107:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(length(model$loci) >= 0)
    ^~~~~~~~~~~

R/model_getters.R:115:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "llm", llm)
    ^~~~~

R/model_getters.R:125:14: warning: no visible global function definition for ‘get_locus_length_matrix’

​  numbers <- get_locus_length_matrix(model)[ , "number"]
             ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:125:46: style: Commas should never have a space before.

​  numbers <- get_locus_length_matrix(model)[ , "number"]
                                            ~^

R/model_getters.R:127:7: warning: no visible global function definition for ‘has_variation’

​  if (has_variation(model) && !ignore_variation) return(1)
      ^~~~~~~~~~~~~

R/model_getters.R:144:18: warning: no visible global function definition for ‘get_sample_size’

​  sample_size <- get_sample_size(model)
                 ^~~~~~~~~~~~~~~

R/model_getters.R:145:15: warning: no visible global function definition for ‘get_outgroup’

​  outgroup <- get_outgroup(model)
              ^~~~~~~~~~~~

R/model_getters.R:152:47: warning: no visible global function definition for ‘get_ploidy’

​  if (!haploids) sample_size <- sample_size / get_ploidy(model)
                                              ^~~~~~~~~~

R/model_getters.R:155:17: warning: no visible global function definition for ‘get_populations’

​  if (!pop %in% get_populations(model)) stop("Invalid population")
                ^~~~~~~~~~~~~~~

R/model_getters.R:163:12: warning: no visible global function definition for ‘get_parameter’

​  param <- get_parameter(model)
           ^~~~~~~~~~~~~

R/model_getters.R:166:35: warning: no visible binding for global variable ‘is.prior_par’

​    param <- param[!vapply(param, is.prior_par, numeric(1))]
                                  ^~~~~~~~~~~~

R/model_getters.R:174:28: warning: no visible global function definition for ‘select_simprog’

​  suppressWarnings(prog <- select_simprog(model))
                           ^~~~~~~~~~~~~~

R/model_print.R:17:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "features", "Features")
  ^~~~~~~~~~~~~~~~

R/model_print.R:20:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "parameter", "Parameter")
  ^~~~~~~~~~~~~~~~

R/model_print.R:23:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "loci", "Loci")
  ^~~~~~~~~~~~~~~~

R/model_print.R:26:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "sum_stats", "Summary Statistics")
  ^~~~~~~~~~~~~~~~

R/model_print.R:29:31: warning: no visible global function definition for ‘select_simprog’

​  suppressWarnings(simprog <- select_simprog(x))
                              ^~~~~~~~~~~~~~

R/model_print.R:35:23: warning: no visible global function definition for ‘get_cmd’

​    cmd <- try(cmd <- get_cmd(x), silent = TRUE)
                      ^~~~~~~

R/model_scale.R:23:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/model_scale.R:23:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/model_scale.R:24:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.numeric(scaling_factor))
  ^~~~~~~~~~~

R/model_scale.R:25:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(scaling_factor) == 1)
  ^~~~~~~~~~~

R/model_scale.R:27:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_simulate.R:40:14: warning: no visible global function definition for ‘select_simprog’

​  simprog <- select_simprog(object)
             ^~~~~~~~~~~~~~

R/model_simulate.R:44:21: warning: no visible global function definition for ‘prepare_pars’

​    current_pars <- prepare_pars(pars, object)
                    ^~~~~~~~~~~~

R/model.R:72:20: warning: no visible global function definition for ‘feat_sample’

​  model <- model + feat_sample(sample_size, ploidy)
                   ^~~~~~~~~~~

R/model.R:76:22: warning: no visible global function definition for ‘locus_averaged’

​    model <- model + locus_averaged(loci_number, loci_length)
                     ^~~~~~~~~~~~~~

R/model.R:92:11: warning: no visible global function definition for ‘read_cache’

​  name <- read_cache(model, "simprog")
          ^~~~~~~~~~

R/model.R:98:18: warning: no visible global function definition for ‘get_simulator’

​      simprog <- get_simulator(simprog_name)
                 ^~~~~~~~~~~~~

R/model.R:109:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "simprog", name)
    ^~~~~

R/model.R:126:7: warning: no visible global function definition for ‘get_locus_length_matrix’

​  sum(get_locus_length_matrix(model)[ , c(1:2, 4:5)]) > 0
      ^~~~~~~~~~~~~~~~~~~~~~~

R/model.R:126:39: style: Commas should never have a space before.

​  sum(get_locus_length_matrix(model)[ , c(1:2, 4:5)]) > 0
                                     ~^

R/model.R:132:12: warning: no visible global function definition for ‘get_positions’

​    pos <- get_positions(seg_sites[[locus]])
           ^~~~~~~~~~~~~

R/model.R:133:21: warning: no visible global function definition for ‘get_locus_length’

​    locus_length <- get_locus_length(model, locus, total = FALSE)
                    ^~~~~~~~~~~~~~~~

R/model.R:142:19: warning: no visible global function definition for ‘get_trio_locus’

​    trio_locus <- get_trio_locus(seg_sites[[locus]])
                  ^~~~~~~~~~~~~~

R/onLoad.R:3:3: warning: no visible global function definition for ‘activate_scrm’

​  activate_scrm()
  ^~~~~~~~~~~~~

R/parameter_prior.R:30:3: warning: no visible binding for global variable ‘prior_par_class’

​  prior_par_class$new(name, as.expression(substitute(prior)))
  ^~~~~~~~~~~~~~~

R/parameter_prior.R:38:10: warning: no visible global function definition for ‘get_parameter’

​  par <- get_parameter(model)
         ^~~~~~~~~~~~~

R/parameter_prior.R:39:32: warning: no visible binding for global variable ‘is.prior_par’

​  prior_par <- par[vapply(par, is.prior_par, logical(1))]
                               ^~~~~~~~~~~~

R/parameter_variation.R:59:3: warning: no visible binding for global variable ‘variation_par_class’

​  variation_par_class$new(par, variance)
  ^~~~~~~~~~~~~~~~~~~

R/parameter.R:123:3: warning: no visible binding for global variable ‘parameter_class’

​  parameter_class$new(as.expression(substitute(expr)))
  ^~~~~~~~~~~~~~~

R/parameter.R:135:3: warning: no visible binding for global variable ‘parameter_class’

​  parameter_class$new(as.expression(constant))
  ^~~~~~~~~~~~~~~

R/parameter.R:144:3: warning: no visible binding for global variable ‘named_par_class’

​  named_par_class$new(name)
  ^~~~~~~~~~~~~~~

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

​      if ((!is.numeric(value)) || length(value) != 1) {
          ^

R/parameter.R:192:3: warning: no visible binding for global variable ‘range_par_class’

​  range_par_class$new(lower, upper, name)
  ^~~~~~~~~~~~~~~

R/parameter.R:203:25: warning: no visible binding for global variable ‘par_eval_func’

​    par_env[["par"]] <- par_eval_func
                        ^~~~~~~~~~~~~

R/parameter.R:209:25: warning: no visible binding for global variable ‘par_print_func’

​    par_env[["par"]] <- par_print_func
                        ^~~~~~~~~~~~~~

R/parameter.R:225:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.numeric(pars))
  ^~~~~~~~~~~

R/parameter.R:229:18: warning: no visible global function definition for ‘get_par_names’

​    par_names <- get_par_names(model, without_priors = TRUE)
                 ^~~~~~~~~~~~~

R/parameter.R:237:11: warning: no visible global function definition for ‘sample_par_priors’

​  c(pars, sample_par_priors(model))
          ^~~~~~~~~~~~~~~~~

R/segsites.R:47:11: warning: no visible global function definition for ‘get_snps’

​  snps <- get_snps(x)
          ^~~~~~~~

R/segsites.R:48:28: warning: no visible global function definition for ‘get_positions’

​  colnames(snps) <- format(get_positions(x), scientific = FALSE)
                           ^~~~~~~~~~~~~

R/segsites.R:62:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.matrix.segsites <- function(x, ...) get_snps(x)
^~~~~~~~~~~~~~~~~~

R/segsites.R:75:19: style: Place a space before left parenthesis, except in a function call.

​  create_segsites((matrix(c(1, 1, 0, 1, 1,
                  ^

R/segsites.R:83:3: warning: no visible global function definition for ‘create_segsites’

​  create_segsites(matrix(0, n_ind, 0), numeric(0))
  ^~~~~~~~~~~~~~~

R/segsites.R:103:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.list(left) && is.list(middle) && is.list(right))
  ^~~~~~~~~~~

R/segsites.R:104:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(left) == length(middle))
  ^~~~~~~~~~~

R/segsites.R:105:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(left) == length(right))
  ^~~~~~~~~~~

R/segsites.R:142:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.default <- function(data, ...) {
^~~~~~~~~~~~~~~~~~~

R/segsites.R:147:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.list <- function(data, ...) {
^~~~~~~~~~~~~~~~

R/segsites.R:148:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(all(vapply(data, is_segsites, logical(1))))
  ^~~~~~~~~~~

R/segsites.R:148:32: warning: no visible binding for global variable ‘is_segsites’

​  assert_that(all(vapply(data, is_segsites, logical(1))))
                               ^~~~~~~~~~~

R/simulator_class.R:28:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is_simulator(simulator))
  ^~~~~~~~~~~

R/simulator_class.R:28:15: warning: no visible global function definition for ‘is_simulator’

​  assert_that(is_simulator(simulator))
              ^~~~~~~~~~~~

R/simulator_class.R:33:3: warning: no visible binding for global variable ‘simulators’

​  simulators[[name]]
  ^~~~~~~~~~

R/simulator_class.R:40:19: warning: no visible global function definition for ‘get_locus_length’

​  locus_length <- get_locus_length(model, group = locus_group)
                  ^~~~~~~~~~~~~~~~

R/simulator_class.R:41:25: warning: no visible global function definition for ‘get_locus_number’

​  total_locus_number <- get_locus_number(model, locus_group, TRUE)
                        ^~~~~~~~~~~~~~~~

R/simulator_class.R:64:3: warning: no visible global function definition for ‘reduce_sim_commands’

​  reduce_sim_commands(sim_cmds)
  ^~~~~~~~~~~~~~~~~~~

R/simulator_class.R:70:44: style: Commas should never have a space before.

​  grouped_commands <- unique(sim_commands[ , 2])
                                          ~^

R/simulator_class.R:73:36: style: Commas should never have a space before.

​    sum(sim_commands[sim_commands[ , 2] == cmd, 1])
                                  ~^

R/simulator_class.R:90:13: warning: no visible global function definition for ‘get_simulator’

​    info <- get_simulator(simulator)$get_info()
            ^~~~~~~~~~~~~

R/simulator_ms.R:67:37: style: Do not place spaces around code in parentheses or square brackets.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                    ^

R/simulator_ms.R:87:39: style: Commas should never have a space before.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                     ~^

R/simulator_ms.R:87:50: style: Commas should never have a space before.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                                ~^

R/simulator_ms.R:136:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(ms_class$new(priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_ms.R:136:22: warning: no visible binding for global variable ‘ms_class’

​  register_simulator(ms_class$new(priority))
                     ^~~~~~~~

R/simulator_ms.R:137:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_msms.R:109:41: style: Commas should never have a space before.

​        paste("msms", sample_size, cmd[ , 1], cmd[ , 2])
                                       ~^

R/simulator_msms.R:109:52: style: Commas should never have a space before.

​        paste("msms", sample_size, cmd[ , 1], cmd[ , 2])
                                                  ~^

R/simulator_msms.R:158:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_scrm.R:11:10: warning: no visible global function definition for ‘read_cache’

​  cmd <- read_cache(model, "scrm_cmd")
         ^~~~~~~~~~

R/simulator_scrm.R:17:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "scrm_cmd", cmd)
    ^~~~~

R/simulator_scrm.R:83:41: style: Commas should never have a space before.

​        paste("scrm", sample_size, cmd[ , 1], cmd[ , 2])
                                       ~^

R/simulator_scrm.R:83:52: style: Commas should never have a space before.

​        paste("scrm", sample_size, cmd[ , 1], cmd[ , 2])
                                                  ~^

R/simulator_scrm.R:129:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(scrm_class$new(priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_scrm.R:129:22: warning: no visible binding for global variable ‘scrm_class’

​  register_simulator(scrm_class$new(priority))
                     ^~~~~~~~~~

R/simulator_scrm.R:130:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_seqgen.R:5:17: warning: no visible global function definition for ‘read_cache’

​  tree_model <- read_cache(model, "tree_model")
                ^~~~~~~~~~

R/simulator_seqgen.R:20:29: warning: no visible global function definition for ‘create_sumstat_container’

​    tree_model$sum_stats <- create_sumstat_container()
                            ^~~~~~~~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:21:32: warning: no visible global function definition for ‘sumstat_sg_trees’

​    tree_model <- tree_model + sumstat_sg_trees()
                               ^~~~~~~~~~~~~~~~

R/simulator_seqgen.R:23:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "tree_model", tree_model)
    ^~~~~

R/simulator_seqgen.R:41:20: warning: no visible global function definition for ‘get_locus_length’

​  locus_lengths <- get_locus_length(model, group = locus, total = FALSE)
                   ^~~~~~~~~~~~~~~~

R/simulator_seqgen.R:47:10: warning: no visible global function definition for ‘sg_generate_opt_cmd’

​  cmd <- sg_generate_opt_cmd(model)
         ^~~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:61:10: warning: no visible global function definition for ‘read_cache’

​  cmd <- read_cache(model, "seqgen_cmd")
         ^~~~~~~~~~

R/simulator_seqgen.R:74:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "seqgen_cmd", cmd)
    ^~~~~

R/simulator_seqgen.R:222:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(seqgen_class$new(binary, priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:222:22: warning: no visible binding for global variable ‘seqgen_class’

​  register_simulator(seqgen_class$new(binary, priority))
                     ^~~~~~~~~~~~

R/simulator_seqgen.R:223:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/sumstat_dna.R:40:3: warning: no visible binding for global variable ‘stat_dna_class’

​  stat_dna_class$new(name, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_file.R:46:3: warning: no visible binding for global variable ‘stat_file_class’

​  stat_file_class$new(folder)
  ^~~~~~~~~~~~~~~

R/sumstat_four_gamete.R:73:3: warning: no visible binding for global variable ‘stat_four_gamete_class’

​  stat_four_gamete_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat_ihh.R:53:45: style: Commas should never have a space before.

​                      iHS = data.frame(ihh[ , 1:2], iHS = rep(NA, n_snps))))
                                           ~^

R/sumstat_ihh.R:61:55: style: Commas should never have a space before.

​            data.frame(ihh2ihs(ihh, freqbin)$res.ihs[ , -4])
                                                     ~^

R/sumstat_ihh.R:148:3: warning: no visible binding for global variable ‘stat_ihh_class’

​  stat_ihh_class$new(name, population, max_snps, calc_ihs, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_jsfs.R:60:3: warning: no visible binding for global variable ‘stat_jsfs_class’

​  stat_jsfs_class$new(name, populations, per_locus, transformation)
  ^~~~~~~~~~~~~~~

R/sumstat_mcmf.R:44:3: warning: no visible binding for global variable ‘stat_mcmf_class’

​  stat_mcmf_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~

R/sumstat_nucleotide_div.R:46:3: warning: no visible binding for global variable ‘stat_pi_class’

​  stat_pi_class$new(name, population, transformation)
  ^~~~~~~~~~~~~

R/sumstat_omega.R:156:3: warning: no visible binding for global variable ‘stat_omega_class’

​  stat_omega_class$new(name, min_win, max_win, grid, binary, transformation)
  ^~~~~~~~~~~~~~~~

R/sumstat_omega.R:160:12: warning: no visible global function definition for ‘search_executable’

​  !is.null(search_executable("OmegaPlus", envir_var = "OMEGAPLUS"))
           ^~~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:30:3: warning: no visible binding for global variable ‘stat_segsites_class’

​  stat_segsites_class$new(name, transformation)
  ^~~~~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:36:21: warning: no visible global function definition for ‘get_locus_length’

​    locus_length <- get_locus_length(model, i, total = FALSE)
                    ^~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:42:12: warning: no visible global function definition for ‘get_positions’

​    pos <- get_positions(seg_sites[[i]])
           ^~~~~~~~~~~~~

R/sumstat_seg_sites.R:51:38: style: Commas should never have a space before.

​    trio_segsites <- seg_sites[[i]][ , left | middle | right]
                                    ~^

R/sumstat_seg_sites.R:60:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(nrow(seg_sites[[i]]) > 0)
    ^~~~~~~~~~~

R/sumstat_sfs.R:38:3: warning: no visible binding for global variable ‘stat_sfs_class’

​  stat_sfs_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_tajimas_d.R:62:3: warning: no visible binding for global variable ‘stat_tajimas_d_class’

​  stat_tajimas_d_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~~~~~~

R/sumstat_trees.R:28:3: warning: no visible binding for global variable ‘stat_trees_class’

​  stat_trees_class$new(name, identity)
  ^~~~~~~~~~~~~~~~

R/sumstat_trees.R:57:3: warning: no visible binding for global variable ‘stat_sg_trees_class’

​  stat_sg_trees_class$new("trees", identity)
  ^~~~~~~~~~~~~~~~~~~

R/sumstat.R:71:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/sumstat.R:87:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:87:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:89:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(!is.null(segsites_list))
    ^~~~~~~~~~~

R/sumstat.R:90:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(all(vapply(segsites_list, is_segsites, logical(1))))
    ^~~~~~~~~~~

R/sumstat.R:90:43: warning: no visible binding for global variable ‘is_segsites’

​    assert_that(all(vapply(segsites_list, is_segsites, logical(1))))
                                          ^~~~~~~~~~~

R/sumstat.R:93:24: warning: no visible global function definition for ‘remove_singletons’

​      segsites_list <- remove_singletons(segsites_list)
                       ^~~~~~~~~~~~~~~~~

R/sumstat.R:96:7: warning: no visible global function definition for ‘requires_trees’

​  if (requires_trees(model)) assert_that(!is.null(trees))
      ^~~~~~~~~~~~~~

R/sumstat.R:96:30: warning: no visible global function definition for ‘assert_that’

​  if (requires_trees(model)) assert_that(!is.null(trees))
                             ^~~~~~~~~~~

R/sumstat.R:97:7: warning: no visible global function definition for ‘requires_files’

​  if (requires_files(model)) assert_that(!is.null(files))
      ^~~~~~~~~~~~~~

R/sumstat.R:97:30: warning: no visible global function definition for ‘assert_that’

​  if (requires_files(model)) assert_that(!is.null(files))
                             ^~~~~~~~~~~

R/sumstat.R:111:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:111:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:120:20: warning: no visible global function definition for ‘conv_for_trios’

​      seg_sites <- conv_for_trios(seg_sites, model)
                   ^~~~~~~~~~~~~~

R/sumstat.R:176:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:176:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:179:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(is.list(trios))
    ^~~~~~~~~~~

R/sumstat.R:180:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(!is.null(segsites_list))
    ^~~~~~~~~~~

R/sumstat.R:186:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(is.numeric(trio))
      ^~~~~~~~~~~

R/sumstat.R:188:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(length(trio) == 3)
      ^~~~~~~~~~~

R/sumstat.R:196:22: warning: no visible global function definition for ‘as.segsites’

​    segsites_list <- as.segsites(segsites_list, ...)
                     ^~~~~~~~~~~

R/sumstat.R:200:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(length(segsites_list) == get_locus_number(model))
    ^~~~~~~~~~~

R/sumstat.R:200:42: warning: no visible global function definition for ‘get_locus_number’

​    assert_that(length(segsites_list) == get_locus_number(model))
                                         ^~~~~~~~~~~~~~~~

R/sumstat.R:209:3: warning: no visible global function definition for ‘calc_sumstats’

​  calc_sumstats(model, segsites_list, tree_list)
  ^~~~~~~~~~~~~

R/sumstat.R:214:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_segsites()))
             ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat.R:219:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_trees()))
             ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat.R:224:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_files()))
             ^~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-feature-ign-singletons.R:13:45: style: Commas should never have a space before.

​               list(create_test_segsites()[ , -c(1, 3)],
                                           ~^

tests/testthat/test-feature-ign-singletons.R:14:45: style: Commas should never have a space before.

​                    create_test_segsites()[ , -c(1, 3)]))
                                           ~^

tests/testthat/test-model-cache.R:47:1: style: Trailing blank lines are superfluous.

​
^

tests/testthat/test-model-class.R:241:44: style: Commas should always have a space after.

​               data.frame(name = c("theta","tau"),
                                           ^

tests/testthat/test-segsites-class.R:30:31: style: Place a space before left parenthesis, except in a function call.

​  segsites <- create_segsites((matrix(c(1, 1, 0, 1, 1,
                              ^

tests/testthat/test-segsites-class.R:36:26: style: Commas should never have a space before.

​  ss_subset <- segsites[ , 1:2]
                        ~^

tests/testthat/test-segsites-class.R:38:64: style: Commas should never have a space before.

​  expect_equivalent(as.matrix(ss_subset), as.matrix(segsites)[ , 1:2])
                                                              ~^

tests/testthat/test-segsites-class.R:41:30: style: Commas should never have a space before.

​  expect_equal(dim(segsites[ , 1]), c(3, 1))
                            ~^

tests/testthat/test-segsites-class.R:42:33: style: Commas should never have a space before.

​  expect_equal(dim(segsites[1:2 , ]), c(2, 3))
                               ~^
lintr-bot commented 8 years ago

R/cache.R:16:3: warning: no visible binding for global variable ‘cache_env’

​  cache_env[[model$id]][[name]]
  ^~~~~~~~~

R/feature_growth.R:44:3: warning: no visible binding for global variable ‘growth_class’

​  growth_class$new(rate, population, time)
  ^~~~~~~~~~~~

R/feature_ignore_singletons.R:28:3: warning: no visible binding for global variable ‘ign_singletons_class’

​  ign_singletons_class$new()
  ^~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:40:29: warning: no visible global function definition for ‘get_snps’

​    is_singleton <- colSums(get_snps(segsites)) == 1
                            ^~~~~~~~

R/feature_ignore_singletons.R:41:15: style: Commas should never have a space before.

​    segsites[ , !is_singleton]
             ~^

R/feature_ignore_singletons.R:52:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_msms_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:56:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_scrm_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:60:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_migration.R:72:12: warning: no visible binding for global variable ‘migration_class’

​    return(migration_class$new(rate, time = time, symmetric = TRUE))
           ^~~~~~~~~~~~~~~

R/feature_migration.R:74:12: warning: no visible binding for global variable ‘migration_class’

​    return(migration_class$new(rate, pop_from, pop_to, time))
           ^~~~~~~~~~~~~~~

R/feature_mutation.R:178:3: warning: no visible global function definition for ‘conv_to_ms_arg.mutation’

​  conv_to_ms_arg.mutation(feature, model)
  ^~~~~~~~~~~~~~~~~~~~~~~

R/feature_outgroup.R:31:3: warning: no visible binding for global variable ‘outgroup_class’

​  outgroup_class$new(population)
  ^~~~~~~~~~~~~~

R/feature_outgroup.R:40:34: warning: no visible binding for global variable ‘is_feat_outgroup’

​  mask <- vapply(model$features, is_feat_outgroup, logical(1))
                                 ^~~~~~~~~~~~~~~~

R/feature_outgroup.R:49:15: warning: no visible global function definition for ‘get_outgroup’

​  outgroup <- get_outgroup(model)
              ^~~~~~~~~~~~

R/feature_outgroup.R:51:20: warning: no visible global function definition for ‘get_sample_size’

​  outgroup_size <- get_sample_size(model, for_sim)[outgroup]
                   ^~~~~~~~~~~~~~~

R/feature_pop_merge.R:47:3: warning: no visible binding for global variable ‘pop_merge_class’

​  pop_merge_class$new(time, pop_source, pop_target)
  ^~~~~~~~~~~~~~~

R/feature_recombination.R:35:3: warning: no visible binding for global variable ‘recombination_class’

​  recombination_class$new(rate)
  ^~~~~~~~~~~~~~~~~~~

R/feature_recombination.R:54:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.recombination <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sample.R:44:3: warning: no visible binding for global variable ‘sample_class’

​  sample_class$new(individuals, ploidy, time)
  ^~~~~~~~~~~~

R/feature_sample.R:59:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.logical(for_sim))
  ^~~~~~~~~~~

R/feature_sample.R:60:18: warning: no visible global function definition for ‘read_cache’

​  sample_size <- read_cache(model, paste0("sample_size_", for_sim))
                 ^~~~~~~~~~

R/feature_sample.R:63:40: warning: no visible binding for global variable ‘is_feat_sample’

​    feat_mask <- sapply(model$feature, is_feat_sample)
                                       ^~~~~~~~~~~~~~

R/feature_sample.R:68:36: warning: no visible global function definition for ‘get_ploidy’

​      sample_size <- sample_size * get_ploidy(model)
                                   ^~~~~~~~~~

R/feature_sample.R:70:36: warning: no visible global function definition for ‘get_samples_per_ind’

​      sample_size <- sample_size * get_samples_per_ind(model)
                                   ^~~~~~~~~~~~~~~~~~~

R/feature_sample.R:72:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, paste0("sample_size_", for_sim), sample_size)
    ^~~~~

R/feature_sample.R:80:34: warning: no visible binding for global variable ‘is_feat_sample’

​  mask <- vapply(model$features, is_feat_sample, logical(1))
                                 ^~~~~~~~~~~~~~

R/feature_sample.R:91:18: warning: no visible global function definition for ‘get_sample_size’

​  sample_size <- get_sample_size(model, TRUE)
                 ^~~~~~~~~~~~~~~

R/feature_selection.R:176:21: warning: no visible global function definition for ‘get_populations’

​    n_pop <- length(get_populations(model))
                    ^~~~~~~~~~~~~~~

R/feature_selection.R:191:36: style: Commas should never have a space before.

​                        n_pop, " " , paste(start_freq, collapse = " "), " ",
                                  ~^

R/feature_size_change.R:47:3: warning: no visible binding for global variable ‘size_change_class’

​  size_change_class$new(new_size, population, time)
  ^~~~~~~~~~~~~~~~~

R/feature_sumstats.R:18:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_msms_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sumstats.R:22:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_scrm_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sumstats.R:26:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_unphased.R:52:3: warning: no visible binding for global variable ‘unphased_class’

​  unphased_class$new(samples_per_ind)
  ^~~~~~~~~~~~~~

R/feature_unphased.R:60:34: warning: no visible binding for global variable ‘is_feat_unphased’

​  mask <- vapply(model$features, is_feat_unphased, logical(1))
                                 ^~~~~~~~~~~~~~~~

R/feature_unphased.R:68:11: warning: no visible global function definition for ‘get_feature_unphased’

​  feat <- get_feature_unphased(model)
          ^~~~~~~~~~~~~~~~~~~~

R/feature_unphased.R:69:29: warning: no visible global function definition for ‘get_ploidy’

​  if (is.null(feat)) return(get_ploidy(model))
                            ^~~~~~~~~~

R/import_popgenome.R:19:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.GENOME <- function(data, only_synonymous = FALSE, ...) {
^~~~~~~~~~~~~~~~~~

R/import_popgenome.R:20:3: warning: no visible global function definition for ‘require_package’

​  require_package("PopGenome")
  ^~~~~~~~~~~~~~~

R/import_popgenome.R:43:43: style: Commas should never have a space before.

​      seg_sites <- bam[c(pops, outgroup), , drop = FALSE]
                                         ~^

R/import_popgenome.R:49:5: warning: no visible global function definition for ‘create_segsites’

​    create_segsites(seg_sites, pos)
    ^~~~~~~~~~~~~~~

R/import_popgenome.R:56:3: warning: no visible global function definition for ‘require_package’

​  require_package("PopGenome")
  ^~~~~~~~~~~~~~~

R/interface_abc.R:80:15: warning: no visible global function definition for ‘get_summary_statistics’

​  sumstats <- get_summary_statistics(model)
              ^~~~~~~~~~~~~~~~~~~~~~

R/interface_abc.R:84:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(is.numeric(value))
      ^~~~~~~~~~~

R/interface_abc.R:86:1: style: lines should not be more than 80 characters.

​        warning("Value of the ", stat$get_name(), " statistic is not a vector. ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/locus.R:84:3: warning: no visible binding for global variable ‘locus_class’

​  locus_class$new(length, 1)
  ^~~~~~~~~~~

R/locus.R:92:3: warning: no visible binding for global variable ‘locus_class’

​  locus_class$new(round(length), number)
  ^~~~~~~~~~~

R/locus.R:151:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/locus.R:152:12: warning: no visible global function definition for ‘get_locus_group’

​  group <- get_locus_group(model, locus)
           ^~~~~~~~~~~~~~~

R/model_build.R:10:7: warning: no visible global function definition for ‘is.model’

​  if (is.model(e1)) return(add_to_model(e2, e1, e2name))
      ^~~~~~~~

R/model_build.R:10:28: warning: no visible global function definition for ‘add_to_model’

​  if (is.model(e1)) return(add_to_model(e2, e1, e2name))
                           ^~~~~~~~~~~~

R/model_build.R:48:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:54:12: warning: no visible global function definition for ‘add_variation’

​  model <- add_variation(model)
           ^~~~~~~~~~~~~

R/model_build.R:56:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:79:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:86:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_check.R:18:16: warning: no visible global function definition for ‘get_simulator’

​    simprog <- get_simulator(simprog_name)
               ^~~~~~~~~~~~~

R/model_getters.R:15:13: warning: no visible global function definition for ‘is.model’

​  stopifnot(is.model(model))
            ^~~~~~~~

R/model_getters.R:17:16: warning: no visible global function definition for ‘read_cache’

​  par_table <- read_cache(model, "par_table")
               ^~~~~~~~~~

R/model_getters.R:35:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "par_table", par_table)
    ^~~~~

R/model_getters.R:45:13: warning: no visible global function definition for ‘is.model’

​  stopifnot(is.model(model))
            ^~~~~~~~

R/model_getters.R:59:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:71:14: warning: no visible global function definition for ‘get_locus_group’

​    group <- get_locus_group(model, locus)
             ^~~~~~~~~~~~~~~

R/model_getters.R:75:21: style: Commas should never have a space before.

​  if (sum(llm[group , c(1:2, 4:5)]) == 0) return(llm[group , 3])
                   ~^

R/model_getters.R:75:60: style: Commas should never have a space before.

​  if (sum(llm[group , c(1:2, 4:5)]) == 0) return(llm[group , 3])
                                                          ~^

R/model_getters.R:81:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:82:25: style: Commas should never have a space before.

​  min(which(cumsum(llm[ , "number"]) >= locus))
                       ~^

R/model_getters.R:87:8: warning: no visible global function definition for ‘get_locus_length_matrix’

​  nrow(get_locus_length_matrix(model))
       ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:94:49: warning: no visible binding for global variable ‘is_feat_sample’

​  feat <- model$features[vapply(model$features, is_feat_sample, logical(1))]
                                                ^~~~~~~~~~~~~~

R/model_getters.R:96:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(pop_number > 0)
  ^~~~~~~~~~~

R/model_getters.R:105:10: warning: no visible global function definition for ‘read_cache’

​  llm <- read_cache(model, "llm")
         ^~~~~~~~~~

R/model_getters.R:107:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(length(model$loci) >= 0)
    ^~~~~~~~~~~

R/model_getters.R:115:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "llm", llm)
    ^~~~~

R/model_getters.R:125:14: warning: no visible global function definition for ‘get_locus_length_matrix’

​  numbers <- get_locus_length_matrix(model)[ , "number"]
             ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:125:46: style: Commas should never have a space before.

​  numbers <- get_locus_length_matrix(model)[ , "number"]
                                            ~^

R/model_getters.R:127:7: warning: no visible global function definition for ‘has_variation’

​  if (has_variation(model) && !ignore_variation) return(1)
      ^~~~~~~~~~~~~

R/model_getters.R:144:18: warning: no visible global function definition for ‘get_sample_size’

​  sample_size <- get_sample_size(model)
                 ^~~~~~~~~~~~~~~

R/model_getters.R:145:15: warning: no visible global function definition for ‘get_outgroup’

​  outgroup <- get_outgroup(model)
              ^~~~~~~~~~~~

R/model_getters.R:152:47: warning: no visible global function definition for ‘get_ploidy’

​  if (!haploids) sample_size <- sample_size / get_ploidy(model)
                                              ^~~~~~~~~~

R/model_getters.R:155:17: warning: no visible global function definition for ‘get_populations’

​  if (!pop %in% get_populations(model)) stop("Invalid population")
                ^~~~~~~~~~~~~~~

R/model_getters.R:163:12: warning: no visible global function definition for ‘get_parameter’

​  param <- get_parameter(model)
           ^~~~~~~~~~~~~

R/model_getters.R:166:35: warning: no visible binding for global variable ‘is.prior_par’

​    param <- param[!vapply(param, is.prior_par, numeric(1))]
                                  ^~~~~~~~~~~~

R/model_getters.R:174:28: warning: no visible global function definition for ‘select_simprog’

​  suppressWarnings(prog <- select_simprog(model))
                           ^~~~~~~~~~~~~~

R/model_print.R:17:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "features", "Features")
  ^~~~~~~~~~~~~~~~

R/model_print.R:20:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "parameter", "Parameter")
  ^~~~~~~~~~~~~~~~

R/model_print.R:23:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "loci", "Loci")
  ^~~~~~~~~~~~~~~~

R/model_print.R:26:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "sum_stats", "Summary Statistics")
  ^~~~~~~~~~~~~~~~

R/model_print.R:29:31: warning: no visible global function definition for ‘select_simprog’

​  suppressWarnings(simprog <- select_simprog(x))
                              ^~~~~~~~~~~~~~

R/model_print.R:35:23: warning: no visible global function definition for ‘get_cmd’

​    cmd <- try(cmd <- get_cmd(x), silent = TRUE)
                      ^~~~~~~

R/model_scale.R:23:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/model_scale.R:23:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/model_scale.R:24:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.numeric(scaling_factor))
  ^~~~~~~~~~~

R/model_scale.R:25:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(scaling_factor) == 1)
  ^~~~~~~~~~~

R/model_scale.R:27:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_simulate.R:40:14: warning: no visible global function definition for ‘select_simprog’

​  simprog <- select_simprog(object)
             ^~~~~~~~~~~~~~

R/model_simulate.R:44:21: warning: no visible global function definition for ‘prepare_pars’

​    current_pars <- prepare_pars(pars, object)
                    ^~~~~~~~~~~~

R/model.R:72:20: warning: no visible global function definition for ‘feat_sample’

​  model <- model + feat_sample(sample_size, ploidy)
                   ^~~~~~~~~~~

R/model.R:76:22: warning: no visible global function definition for ‘locus_averaged’

​    model <- model + locus_averaged(loci_number, loci_length)
                     ^~~~~~~~~~~~~~

R/model.R:92:11: warning: no visible global function definition for ‘read_cache’

​  name <- read_cache(model, "simprog")
          ^~~~~~~~~~

R/model.R:98:18: warning: no visible global function definition for ‘get_simulator’

​      simprog <- get_simulator(simprog_name)
                 ^~~~~~~~~~~~~

R/model.R:109:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "simprog", name)
    ^~~~~

R/model.R:126:7: warning: no visible global function definition for ‘get_locus_length_matrix’

​  sum(get_locus_length_matrix(model)[ , c(1:2, 4:5)]) > 0
      ^~~~~~~~~~~~~~~~~~~~~~~

R/model.R:126:39: style: Commas should never have a space before.

​  sum(get_locus_length_matrix(model)[ , c(1:2, 4:5)]) > 0
                                     ~^

R/model.R:132:12: warning: no visible global function definition for ‘get_positions’

​    pos <- get_positions(seg_sites[[locus]])
           ^~~~~~~~~~~~~

R/model.R:133:21: warning: no visible global function definition for ‘get_locus_length’

​    locus_length <- get_locus_length(model, locus, total = FALSE)
                    ^~~~~~~~~~~~~~~~

R/model.R:142:19: warning: no visible global function definition for ‘get_trio_locus’

​    trio_locus <- get_trio_locus(seg_sites[[locus]])
                  ^~~~~~~~~~~~~~

R/onLoad.R:3:3: warning: no visible global function definition for ‘activate_scrm’

​  activate_scrm()
  ^~~~~~~~~~~~~

R/parameter_prior.R:30:3: warning: no visible binding for global variable ‘prior_par_class’

​  prior_par_class$new(name, as.expression(substitute(prior)))
  ^~~~~~~~~~~~~~~

R/parameter_prior.R:38:10: warning: no visible global function definition for ‘get_parameter’

​  par <- get_parameter(model)
         ^~~~~~~~~~~~~

R/parameter_prior.R:39:32: warning: no visible binding for global variable ‘is.prior_par’

​  prior_par <- par[vapply(par, is.prior_par, logical(1))]
                               ^~~~~~~~~~~~

R/parameter_variation.R:59:3: warning: no visible binding for global variable ‘variation_par_class’

​  variation_par_class$new(par, variance)
  ^~~~~~~~~~~~~~~~~~~

R/parameter.R:123:3: warning: no visible binding for global variable ‘parameter_class’

​  parameter_class$new(as.expression(substitute(expr)))
  ^~~~~~~~~~~~~~~

R/parameter.R:135:3: warning: no visible binding for global variable ‘parameter_class’

​  parameter_class$new(as.expression(constant))
  ^~~~~~~~~~~~~~~

R/parameter.R:144:3: warning: no visible binding for global variable ‘named_par_class’

​  named_par_class$new(name)
  ^~~~~~~~~~~~~~~

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

​      if ((!is.numeric(value)) || length(value) != 1) {
          ^

R/parameter.R:192:3: warning: no visible binding for global variable ‘range_par_class’

​  range_par_class$new(lower, upper, name)
  ^~~~~~~~~~~~~~~

R/parameter.R:203:25: warning: no visible binding for global variable ‘par_eval_func’

​    par_env[["par"]] <- par_eval_func
                        ^~~~~~~~~~~~~

R/parameter.R:209:25: warning: no visible binding for global variable ‘par_print_func’

​    par_env[["par"]] <- par_print_func
                        ^~~~~~~~~~~~~~

R/parameter.R:225:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.numeric(pars))
  ^~~~~~~~~~~

R/parameter.R:229:18: warning: no visible global function definition for ‘get_par_names’

​    par_names <- get_par_names(model, without_priors = TRUE)
                 ^~~~~~~~~~~~~

R/parameter.R:237:11: warning: no visible global function definition for ‘sample_par_priors’

​  c(pars, sample_par_priors(model))
          ^~~~~~~~~~~~~~~~~

R/segsites.R:47:11: warning: no visible global function definition for ‘get_snps’

​  snps <- get_snps(x)
          ^~~~~~~~

R/segsites.R:48:28: warning: no visible global function definition for ‘get_positions’

​  colnames(snps) <- format(get_positions(x), scientific = FALSE)
                           ^~~~~~~~~~~~~

R/segsites.R:62:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.matrix.segsites <- function(x, ...) get_snps(x)
^~~~~~~~~~~~~~~~~~

R/segsites.R:75:19: style: Place a space before left parenthesis, except in a function call.

​  create_segsites((matrix(c(1, 1, 0, 1, 1,
                  ^

R/segsites.R:83:3: warning: no visible global function definition for ‘create_segsites’

​  create_segsites(matrix(0, n_ind, 0), numeric(0))
  ^~~~~~~~~~~~~~~

R/segsites.R:103:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.list(left) && is.list(middle) && is.list(right))
  ^~~~~~~~~~~

R/segsites.R:104:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(left) == length(middle))
  ^~~~~~~~~~~

R/segsites.R:105:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(left) == length(right))
  ^~~~~~~~~~~

R/segsites.R:142:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.default <- function(data, ...) {
^~~~~~~~~~~~~~~~~~~

R/segsites.R:147:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.list <- function(data, ...) {
^~~~~~~~~~~~~~~~

R/segsites.R:148:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(all(vapply(data, is_segsites, logical(1))))
  ^~~~~~~~~~~

R/segsites.R:148:32: warning: no visible binding for global variable ‘is_segsites’

​  assert_that(all(vapply(data, is_segsites, logical(1))))
                               ^~~~~~~~~~~

R/simulator_class.R:28:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is_simulator(simulator))
  ^~~~~~~~~~~

R/simulator_class.R:28:15: warning: no visible global function definition for ‘is_simulator’

​  assert_that(is_simulator(simulator))
              ^~~~~~~~~~~~

R/simulator_class.R:33:3: warning: no visible binding for global variable ‘simulators’

​  simulators[[name]]
  ^~~~~~~~~~

R/simulator_class.R:40:19: warning: no visible global function definition for ‘get_locus_length’

​  locus_length <- get_locus_length(model, group = locus_group)
                  ^~~~~~~~~~~~~~~~

R/simulator_class.R:41:25: warning: no visible global function definition for ‘get_locus_number’

​  total_locus_number <- get_locus_number(model, locus_group, TRUE)
                        ^~~~~~~~~~~~~~~~

R/simulator_class.R:64:3: warning: no visible global function definition for ‘reduce_sim_commands’

​  reduce_sim_commands(sim_cmds)
  ^~~~~~~~~~~~~~~~~~~

R/simulator_class.R:70:44: style: Commas should never have a space before.

​  grouped_commands <- unique(sim_commands[ , 2])
                                          ~^

R/simulator_class.R:73:36: style: Commas should never have a space before.

​    sum(sim_commands[sim_commands[ , 2] == cmd, 1])
                                  ~^

R/simulator_class.R:90:13: warning: no visible global function definition for ‘get_simulator’

​    info <- get_simulator(simulator)$get_info()
            ^~~~~~~~~~~~~

R/simulator_ms.R:67:37: style: Do not place spaces around code in parentheses or square brackets.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                    ^

R/simulator_ms.R:87:39: style: Commas should never have a space before.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                     ~^

R/simulator_ms.R:87:50: style: Commas should never have a space before.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                                ~^

R/simulator_ms.R:136:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(ms_class$new(priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_ms.R:136:22: warning: no visible binding for global variable ‘ms_class’

​  register_simulator(ms_class$new(priority))
                     ^~~~~~~~

R/simulator_ms.R:137:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_msms.R:109:41: style: Commas should never have a space before.

​        paste("msms", sample_size, cmd[ , 1], cmd[ , 2])
                                       ~^

R/simulator_msms.R:109:52: style: Commas should never have a space before.

​        paste("msms", sample_size, cmd[ , 1], cmd[ , 2])
                                                  ~^

R/simulator_msms.R:158:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_scrm.R:11:10: warning: no visible global function definition for ‘read_cache’

​  cmd <- read_cache(model, "scrm_cmd")
         ^~~~~~~~~~

R/simulator_scrm.R:17:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "scrm_cmd", cmd)
    ^~~~~

R/simulator_scrm.R:83:41: style: Commas should never have a space before.

​        paste("scrm", sample_size, cmd[ , 1], cmd[ , 2])
                                       ~^

R/simulator_scrm.R:83:52: style: Commas should never have a space before.

​        paste("scrm", sample_size, cmd[ , 1], cmd[ , 2])
                                                  ~^

R/simulator_scrm.R:129:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(scrm_class$new(priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_scrm.R:129:22: warning: no visible binding for global variable ‘scrm_class’

​  register_simulator(scrm_class$new(priority))
                     ^~~~~~~~~~

R/simulator_scrm.R:130:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_seqgen.R:5:17: warning: no visible global function definition for ‘read_cache’

​  tree_model <- read_cache(model, "tree_model")
                ^~~~~~~~~~

R/simulator_seqgen.R:20:29: warning: no visible global function definition for ‘create_sumstat_container’

​    tree_model$sum_stats <- create_sumstat_container()
                            ^~~~~~~~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:21:32: warning: no visible global function definition for ‘sumstat_sg_trees’

​    tree_model <- tree_model + sumstat_sg_trees()
                               ^~~~~~~~~~~~~~~~

R/simulator_seqgen.R:23:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "tree_model", tree_model)
    ^~~~~

R/simulator_seqgen.R:41:20: warning: no visible global function definition for ‘get_locus_length’

​  locus_lengths <- get_locus_length(model, group = locus, total = FALSE)
                   ^~~~~~~~~~~~~~~~

R/simulator_seqgen.R:47:10: warning: no visible global function definition for ‘sg_generate_opt_cmd’

​  cmd <- sg_generate_opt_cmd(model)
         ^~~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:61:10: warning: no visible global function definition for ‘read_cache’

​  cmd <- read_cache(model, "seqgen_cmd")
         ^~~~~~~~~~

R/simulator_seqgen.R:74:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "seqgen_cmd", cmd)
    ^~~~~

R/simulator_seqgen.R:222:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(seqgen_class$new(binary, priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:222:22: warning: no visible binding for global variable ‘seqgen_class’

​  register_simulator(seqgen_class$new(binary, priority))
                     ^~~~~~~~~~~~

R/simulator_seqgen.R:223:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/sumstat_dna.R:40:3: warning: no visible binding for global variable ‘stat_dna_class’

​  stat_dna_class$new(name, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_file.R:46:3: warning: no visible binding for global variable ‘stat_file_class’

​  stat_file_class$new(folder)
  ^~~~~~~~~~~~~~~

R/sumstat_four_gamete.R:73:3: warning: no visible binding for global variable ‘stat_four_gamete_class’

​  stat_four_gamete_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat_ihh.R:53:45: style: Commas should never have a space before.

​                      iHS = data.frame(ihh[ , 1:2], iHS = rep(NA, n_snps))))
                                           ~^

R/sumstat_ihh.R:61:55: style: Commas should never have a space before.

​            data.frame(ihh2ihs(ihh, freqbin)$res.ihs[ , -4])
                                                     ~^

R/sumstat_ihh.R:148:3: warning: no visible binding for global variable ‘stat_ihh_class’

​  stat_ihh_class$new(name, population, max_snps, calc_ihs, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_jsfs.R:60:3: warning: no visible binding for global variable ‘stat_jsfs_class’

​  stat_jsfs_class$new(name, populations, per_locus, transformation)
  ^~~~~~~~~~~~~~~

R/sumstat_mcmf.R:44:3: warning: no visible binding for global variable ‘stat_mcmf_class’

​  stat_mcmf_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~

R/sumstat_nucleotide_div.R:46:3: warning: no visible binding for global variable ‘stat_pi_class’

​  stat_pi_class$new(name, population, transformation)
  ^~~~~~~~~~~~~

R/sumstat_omega.R:156:3: warning: no visible binding for global variable ‘stat_omega_class’

​  stat_omega_class$new(name, min_win, max_win, grid, binary, transformation)
  ^~~~~~~~~~~~~~~~

R/sumstat_omega.R:160:12: warning: no visible global function definition for ‘search_executable’

​  !is.null(search_executable("OmegaPlus", envir_var = "OMEGAPLUS"))
           ^~~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:30:3: warning: no visible binding for global variable ‘stat_segsites_class’

​  stat_segsites_class$new(name, transformation)
  ^~~~~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:36:21: warning: no visible global function definition for ‘get_locus_length’

​    locus_length <- get_locus_length(model, i, total = FALSE)
                    ^~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:42:12: warning: no visible global function definition for ‘get_positions’

​    pos <- get_positions(seg_sites[[i]])
           ^~~~~~~~~~~~~

R/sumstat_seg_sites.R:51:38: style: Commas should never have a space before.

​    trio_segsites <- seg_sites[[i]][ , left | middle | right]
                                    ~^

R/sumstat_seg_sites.R:60:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(nrow(seg_sites[[i]]) > 0)
    ^~~~~~~~~~~

R/sumstat_sfs.R:38:3: warning: no visible binding for global variable ‘stat_sfs_class’

​  stat_sfs_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_tajimas_d.R:62:3: warning: no visible binding for global variable ‘stat_tajimas_d_class’

​  stat_tajimas_d_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~~~~~~

R/sumstat_trees.R:28:3: warning: no visible binding for global variable ‘stat_trees_class’

​  stat_trees_class$new(name, identity)
  ^~~~~~~~~~~~~~~~

R/sumstat_trees.R:57:3: warning: no visible binding for global variable ‘stat_sg_trees_class’

​  stat_sg_trees_class$new("trees", identity)
  ^~~~~~~~~~~~~~~~~~~

R/sumstat.R:71:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/sumstat.R:87:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:87:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:89:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(!is.null(segsites_list))
    ^~~~~~~~~~~

R/sumstat.R:90:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(all(vapply(segsites_list, is_segsites, logical(1))))
    ^~~~~~~~~~~

R/sumstat.R:90:43: warning: no visible binding for global variable ‘is_segsites’

​    assert_that(all(vapply(segsites_list, is_segsites, logical(1))))
                                          ^~~~~~~~~~~

R/sumstat.R:93:24: warning: no visible global function definition for ‘remove_singletons’

​      segsites_list <- remove_singletons(segsites_list)
                       ^~~~~~~~~~~~~~~~~

R/sumstat.R:96:7: warning: no visible global function definition for ‘requires_trees’

​  if (requires_trees(model)) assert_that(!is.null(trees))
      ^~~~~~~~~~~~~~

R/sumstat.R:96:30: warning: no visible global function definition for ‘assert_that’

​  if (requires_trees(model)) assert_that(!is.null(trees))
                             ^~~~~~~~~~~

R/sumstat.R:97:7: warning: no visible global function definition for ‘requires_files’

​  if (requires_files(model)) assert_that(!is.null(files))
      ^~~~~~~~~~~~~~

R/sumstat.R:97:30: warning: no visible global function definition for ‘assert_that’

​  if (requires_files(model)) assert_that(!is.null(files))
                             ^~~~~~~~~~~

R/sumstat.R:111:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:111:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:120:20: warning: no visible global function definition for ‘conv_for_trios’

​      seg_sites <- conv_for_trios(seg_sites, model)
                   ^~~~~~~~~~~~~~

R/sumstat.R:176:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:176:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:179:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(is.list(trios))
    ^~~~~~~~~~~

R/sumstat.R:180:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(!is.null(segsites_list))
    ^~~~~~~~~~~

R/sumstat.R:186:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(is.numeric(trio))
      ^~~~~~~~~~~

R/sumstat.R:188:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(length(trio) == 3)
      ^~~~~~~~~~~

R/sumstat.R:196:22: warning: no visible global function definition for ‘as.segsites’

​    segsites_list <- as.segsites(segsites_list, ...)
                     ^~~~~~~~~~~

R/sumstat.R:200:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(length(segsites_list) == get_locus_number(model))
    ^~~~~~~~~~~

R/sumstat.R:200:42: warning: no visible global function definition for ‘get_locus_number’

​    assert_that(length(segsites_list) == get_locus_number(model))
                                         ^~~~~~~~~~~~~~~~

R/sumstat.R:209:3: warning: no visible global function definition for ‘calc_sumstats’

​  calc_sumstats(model, segsites_list, tree_list)
  ^~~~~~~~~~~~~

R/sumstat.R:214:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_segsites()))
             ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat.R:219:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_trees()))
             ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat.R:224:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_files()))
             ^~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-feature-ign-singletons.R:13:45: style: Commas should never have a space before.

​               list(create_test_segsites()[ , -c(1, 3)],
                                           ~^

tests/testthat/test-feature-ign-singletons.R:14:45: style: Commas should never have a space before.

​                    create_test_segsites()[ , -c(1, 3)]))
                                           ~^

tests/testthat/test-model-cache.R:47:1: style: Trailing blank lines are superfluous.

​
^

tests/testthat/test-model-class.R:241:44: style: Commas should always have a space after.

​               data.frame(name = c("theta","tau"),
                                           ^

tests/testthat/test-segsites-class.R:30:31: style: Place a space before left parenthesis, except in a function call.

​  segsites <- create_segsites((matrix(c(1, 1, 0, 1, 1,
                              ^

tests/testthat/test-segsites-class.R:36:26: style: Commas should never have a space before.

​  ss_subset <- segsites[ , 1:2]
                        ~^

tests/testthat/test-segsites-class.R:38:64: style: Commas should never have a space before.

​  expect_equivalent(as.matrix(ss_subset), as.matrix(segsites)[ , 1:2])
                                                              ~^

tests/testthat/test-segsites-class.R:41:30: style: Commas should never have a space before.

​  expect_equal(dim(segsites[ , 1]), c(3, 1))
                            ~^

tests/testthat/test-segsites-class.R:42:33: style: Commas should never have a space before.

​  expect_equal(dim(segsites[1:2 , ]), c(2, 3))
                               ~^
lintr-bot commented 8 years ago

R/cache.R:16:3: warning: no visible binding for global variable ‘cache_env’

​  cache_env[[model$id]][[name]]
  ^~~~~~~~~

R/feature_growth.R:44:3: warning: no visible binding for global variable ‘growth_class’

​  growth_class$new(rate, population, time)
  ^~~~~~~~~~~~

R/feature_ignore_singletons.R:28:3: warning: no visible binding for global variable ‘ign_singletons_class’

​  ign_singletons_class$new()
  ^~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:40:29: warning: no visible global function definition for ‘get_snps’

​    is_singleton <- colSums(get_snps(segsites)) == 1
                            ^~~~~~~~

R/feature_ignore_singletons.R:41:15: style: Commas should never have a space before.

​    segsites[ , !is_singleton]
             ~^

R/feature_ignore_singletons.R:52:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_msms_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:56:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_scrm_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_ignore_singletons.R:60:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.ign_singletons <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_migration.R:72:12: warning: no visible binding for global variable ‘migration_class’

​    return(migration_class$new(rate, time = time, symmetric = TRUE))
           ^~~~~~~~~~~~~~~

R/feature_migration.R:74:12: warning: no visible binding for global variable ‘migration_class’

​    return(migration_class$new(rate, pop_from, pop_to, time))
           ^~~~~~~~~~~~~~~

R/feature_mutation.R:178:3: warning: no visible global function definition for ‘conv_to_ms_arg.mutation’

​  conv_to_ms_arg.mutation(feature, model)
  ^~~~~~~~~~~~~~~~~~~~~~~

R/feature_outgroup.R:31:3: warning: no visible binding for global variable ‘outgroup_class’

​  outgroup_class$new(population)
  ^~~~~~~~~~~~~~

R/feature_outgroup.R:40:34: warning: no visible binding for global variable ‘is_feat_outgroup’

​  mask <- vapply(model$features, is_feat_outgroup, logical(1))
                                 ^~~~~~~~~~~~~~~~

R/feature_outgroup.R:49:15: warning: no visible global function definition for ‘get_outgroup’

​  outgroup <- get_outgroup(model)
              ^~~~~~~~~~~~

R/feature_outgroup.R:51:20: warning: no visible global function definition for ‘get_sample_size’

​  outgroup_size <- get_sample_size(model, for_sim)[outgroup]
                   ^~~~~~~~~~~~~~~

R/feature_pop_merge.R:47:3: warning: no visible binding for global variable ‘pop_merge_class’

​  pop_merge_class$new(time, pop_source, pop_target)
  ^~~~~~~~~~~~~~~

R/feature_recombination.R:35:3: warning: no visible binding for global variable ‘recombination_class’

​  recombination_class$new(rate)
  ^~~~~~~~~~~~~~~~~~~

R/feature_recombination.R:54:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.recombination <- ignore_par
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sample.R:44:3: warning: no visible binding for global variable ‘sample_class’

​  sample_class$new(individuals, ploidy, time)
  ^~~~~~~~~~~~

R/feature_sample.R:59:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.logical(for_sim))
  ^~~~~~~~~~~

R/feature_sample.R:60:18: warning: no visible global function definition for ‘read_cache’

​  sample_size <- read_cache(model, paste0("sample_size_", for_sim))
                 ^~~~~~~~~~

R/feature_sample.R:63:40: warning: no visible binding for global variable ‘is_feat_sample’

​    feat_mask <- sapply(model$feature, is_feat_sample)
                                       ^~~~~~~~~~~~~~

R/feature_sample.R:68:36: warning: no visible global function definition for ‘get_ploidy’

​      sample_size <- sample_size * get_ploidy(model)
                                   ^~~~~~~~~~

R/feature_sample.R:70:36: warning: no visible global function definition for ‘get_samples_per_ind’

​      sample_size <- sample_size * get_samples_per_ind(model)
                                   ^~~~~~~~~~~~~~~~~~~

R/feature_sample.R:72:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, paste0("sample_size_", for_sim), sample_size)
    ^~~~~

R/feature_sample.R:80:34: warning: no visible binding for global variable ‘is_feat_sample’

​  mask <- vapply(model$features, is_feat_sample, logical(1))
                                 ^~~~~~~~~~~~~~

R/feature_sample.R:91:18: warning: no visible global function definition for ‘get_sample_size’

​  sample_size <- get_sample_size(model, TRUE)
                 ^~~~~~~~~~~~~~~

R/feature_selection.R:176:21: warning: no visible global function definition for ‘get_populations’

​    n_pop <- length(get_populations(model))
                    ^~~~~~~~~~~~~~~

R/feature_selection.R:191:36: style: Commas should never have a space before.

​                        n_pop, " " , paste(start_freq, collapse = " "), " ",
                                  ~^

R/feature_size_change.R:47:3: warning: no visible binding for global variable ‘size_change_class’

​  size_change_class$new(new_size, population, time)
  ^~~~~~~~~~~~~~~~~

R/feature_sumstats.R:18:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_msms_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sumstats.R:22:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_scrm_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_sumstats.R:26:1: style: Variable and function names should not be longer than 30 characters.

​conv_to_seqgen_arg.seg_sites_feat <- conv_to_ms_arg.seg_sites_feat
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/feature_unphased.R:52:3: warning: no visible binding for global variable ‘unphased_class’

​  unphased_class$new(samples_per_ind)
  ^~~~~~~~~~~~~~

R/feature_unphased.R:60:34: warning: no visible binding for global variable ‘is_feat_unphased’

​  mask <- vapply(model$features, is_feat_unphased, logical(1))
                                 ^~~~~~~~~~~~~~~~

R/feature_unphased.R:68:11: warning: no visible global function definition for ‘get_feature_unphased’

​  feat <- get_feature_unphased(model)
          ^~~~~~~~~~~~~~~~~~~~

R/feature_unphased.R:69:29: warning: no visible global function definition for ‘get_ploidy’

​  if (is.null(feat)) return(get_ploidy(model))
                            ^~~~~~~~~~

R/import_popgenome.R:19:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.GENOME <- function(data, only_synonymous = FALSE, ...) {
^~~~~~~~~~~~~~~~~~

R/import_popgenome.R:20:3: warning: no visible global function definition for ‘require_package’

​  require_package("PopGenome")
  ^~~~~~~~~~~~~~~

R/import_popgenome.R:43:43: style: Commas should never have a space before.

​      seg_sites <- bam[c(pops, outgroup), , drop = FALSE]
                                         ~^

R/import_popgenome.R:49:5: warning: no visible global function definition for ‘create_segsites’

​    create_segsites(seg_sites, pos)
    ^~~~~~~~~~~~~~~

R/import_popgenome.R:56:3: warning: no visible global function definition for ‘require_package’

​  require_package("PopGenome")
  ^~~~~~~~~~~~~~~

R/interface_abc.R:80:15: warning: no visible global function definition for ‘get_summary_statistics’

​  sumstats <- get_summary_statistics(model)
              ^~~~~~~~~~~~~~~~~~~~~~

R/interface_abc.R:84:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(is.numeric(value))
      ^~~~~~~~~~~

R/interface_abc.R:86:1: style: lines should not be more than 80 characters.

​        warning("Value of the ", stat$get_name(), " statistic is not a vector. ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/locus.R:84:3: warning: no visible binding for global variable ‘locus_class’

​  locus_class$new(length, 1)
  ^~~~~~~~~~~

R/locus.R:92:3: warning: no visible binding for global variable ‘locus_class’

​  locus_class$new(round(length), number)
  ^~~~~~~~~~~

R/locus.R:151:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/locus.R:152:12: warning: no visible global function definition for ‘get_locus_group’

​  group <- get_locus_group(model, locus)
           ^~~~~~~~~~~~~~~

R/model_build.R:10:7: warning: no visible global function definition for ‘is.model’

​  if (is.model(e1)) return(add_to_model(e2, e1, e2name))
      ^~~~~~~~

R/model_build.R:10:28: warning: no visible global function definition for ‘add_to_model’

​  if (is.model(e1)) return(add_to_model(e2, e1, e2name))
                           ^~~~~~~~~~~~

R/model_build.R:48:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:54:12: warning: no visible global function definition for ‘add_variation’

​  model <- add_variation(model)
           ^~~~~~~~~~~~~

R/model_build.R:56:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:79:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_build.R:86:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_check.R:18:16: warning: no visible global function definition for ‘get_simulator’

​    simprog <- get_simulator(simprog_name)
               ^~~~~~~~~~~~~

R/model_getters.R:15:13: warning: no visible global function definition for ‘is.model’

​  stopifnot(is.model(model))
            ^~~~~~~~

R/model_getters.R:17:16: warning: no visible global function definition for ‘read_cache’

​  par_table <- read_cache(model, "par_table")
               ^~~~~~~~~~

R/model_getters.R:35:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "par_table", par_table)
    ^~~~~

R/model_getters.R:45:13: warning: no visible global function definition for ‘is.model’

​  stopifnot(is.model(model))
            ^~~~~~~~

R/model_getters.R:59:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:71:14: warning: no visible global function definition for ‘get_locus_group’

​    group <- get_locus_group(model, locus)
             ^~~~~~~~~~~~~~~

R/model_getters.R:75:21: style: Commas should never have a space before.

​  if (sum(llm[group , c(1:2, 4:5)]) == 0) return(llm[group , 3])
                   ~^

R/model_getters.R:75:60: style: Commas should never have a space before.

​  if (sum(llm[group , c(1:2, 4:5)]) == 0) return(llm[group , 3])
                                                          ~^

R/model_getters.R:81:10: warning: no visible global function definition for ‘get_locus_length_matrix’

​  llm <- get_locus_length_matrix(model)
         ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:82:25: style: Commas should never have a space before.

​  min(which(cumsum(llm[ , "number"]) >= locus))
                       ~^

R/model_getters.R:87:8: warning: no visible global function definition for ‘get_locus_length_matrix’

​  nrow(get_locus_length_matrix(model))
       ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:94:49: warning: no visible binding for global variable ‘is_feat_sample’

​  feat <- model$features[vapply(model$features, is_feat_sample, logical(1))]
                                                ^~~~~~~~~~~~~~

R/model_getters.R:96:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(pop_number > 0)
  ^~~~~~~~~~~

R/model_getters.R:105:10: warning: no visible global function definition for ‘read_cache’

​  llm <- read_cache(model, "llm")
         ^~~~~~~~~~

R/model_getters.R:107:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(length(model$loci) >= 0)
    ^~~~~~~~~~~

R/model_getters.R:115:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "llm", llm)
    ^~~~~

R/model_getters.R:125:14: warning: no visible global function definition for ‘get_locus_length_matrix’

​  numbers <- get_locus_length_matrix(model)[ , "number"]
             ^~~~~~~~~~~~~~~~~~~~~~~

R/model_getters.R:125:46: style: Commas should never have a space before.

​  numbers <- get_locus_length_matrix(model)[ , "number"]
                                            ~^

R/model_getters.R:127:7: warning: no visible global function definition for ‘has_variation’

​  if (has_variation(model) && !ignore_variation) return(1)
      ^~~~~~~~~~~~~

R/model_getters.R:144:18: warning: no visible global function definition for ‘get_sample_size’

​  sample_size <- get_sample_size(model)
                 ^~~~~~~~~~~~~~~

R/model_getters.R:145:15: warning: no visible global function definition for ‘get_outgroup’

​  outgroup <- get_outgroup(model)
              ^~~~~~~~~~~~

R/model_getters.R:152:47: warning: no visible global function definition for ‘get_ploidy’

​  if (!haploids) sample_size <- sample_size / get_ploidy(model)
                                              ^~~~~~~~~~

R/model_getters.R:155:17: warning: no visible global function definition for ‘get_populations’

​  if (!pop %in% get_populations(model)) stop("Invalid population")
                ^~~~~~~~~~~~~~~

R/model_getters.R:163:12: warning: no visible global function definition for ‘get_parameter’

​  param <- get_parameter(model)
           ^~~~~~~~~~~~~

R/model_getters.R:166:35: warning: no visible binding for global variable ‘is.prior_par’

​    param <- param[!vapply(param, is.prior_par, numeric(1))]
                                  ^~~~~~~~~~~~

R/model_getters.R:174:28: warning: no visible global function definition for ‘select_simprog’

​  suppressWarnings(prog <- select_simprog(model))
                           ^~~~~~~~~~~~~~

R/model_print.R:17:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "features", "Features")
  ^~~~~~~~~~~~~~~~

R/model_print.R:20:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "parameter", "Parameter")
  ^~~~~~~~~~~~~~~~

R/model_print.R:23:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "loci", "Loci")
  ^~~~~~~~~~~~~~~~

R/model_print.R:26:3: warning: no visible global function definition for ‘print_model_part’

​  print_model_part(x, "sum_stats", "Summary Statistics")
  ^~~~~~~~~~~~~~~~

R/model_print.R:29:31: warning: no visible global function definition for ‘select_simprog’

​  suppressWarnings(simprog <- select_simprog(x))
                              ^~~~~~~~~~~~~~

R/model_print.R:35:23: warning: no visible global function definition for ‘get_cmd’

​    cmd <- try(cmd <- get_cmd(x), silent = TRUE)
                      ^~~~~~~

R/model_scale.R:23:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/model_scale.R:23:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/model_scale.R:24:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.numeric(scaling_factor))
  ^~~~~~~~~~~

R/model_scale.R:25:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(scaling_factor) == 1)
  ^~~~~~~~~~~

R/model_scale.R:27:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/model_simulate.R:40:14: warning: no visible global function definition for ‘select_simprog’

​  simprog <- select_simprog(object)
             ^~~~~~~~~~~~~~

R/model_simulate.R:44:21: warning: no visible global function definition for ‘prepare_pars’

​    current_pars <- prepare_pars(pars, object)
                    ^~~~~~~~~~~~

R/model.R:72:20: warning: no visible global function definition for ‘feat_sample’

​  model <- model + feat_sample(sample_size, ploidy)
                   ^~~~~~~~~~~

R/model.R:76:22: warning: no visible global function definition for ‘locus_averaged’

​    model <- model + locus_averaged(loci_number, loci_length)
                     ^~~~~~~~~~~~~~

R/model.R:92:11: warning: no visible global function definition for ‘read_cache’

​  name <- read_cache(model, "simprog")
          ^~~~~~~~~~

R/model.R:98:18: warning: no visible global function definition for ‘get_simulator’

​      simprog <- get_simulator(simprog_name)
                 ^~~~~~~~~~~~~

R/model.R:109:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "simprog", name)
    ^~~~~

R/model.R:126:7: warning: no visible global function definition for ‘get_locus_length_matrix’

​  sum(get_locus_length_matrix(model)[ , c(1:2, 4:5)]) > 0
      ^~~~~~~~~~~~~~~~~~~~~~~

R/model.R:126:39: style: Commas should never have a space before.

​  sum(get_locus_length_matrix(model)[ , c(1:2, 4:5)]) > 0
                                     ~^

R/model.R:132:12: warning: no visible global function definition for ‘get_positions’

​    pos <- get_positions(seg_sites[[locus]])
           ^~~~~~~~~~~~~

R/model.R:133:21: warning: no visible global function definition for ‘get_locus_length’

​    locus_length <- get_locus_length(model, locus, total = FALSE)
                    ^~~~~~~~~~~~~~~~

R/model.R:142:19: warning: no visible global function definition for ‘get_trio_locus’

​    trio_locus <- get_trio_locus(seg_sites[[locus]])
                  ^~~~~~~~~~~~~~

R/onLoad.R:3:3: warning: no visible global function definition for ‘activate_scrm’

​  activate_scrm()
  ^~~~~~~~~~~~~

R/parameter_prior.R:30:3: warning: no visible binding for global variable ‘prior_par_class’

​  prior_par_class$new(name, as.expression(substitute(prior)))
  ^~~~~~~~~~~~~~~

R/parameter_prior.R:38:10: warning: no visible global function definition for ‘get_parameter’

​  par <- get_parameter(model)
         ^~~~~~~~~~~~~

R/parameter_prior.R:39:32: warning: no visible binding for global variable ‘is.prior_par’

​  prior_par <- par[vapply(par, is.prior_par, logical(1))]
                               ^~~~~~~~~~~~

R/parameter_variation.R:59:3: warning: no visible binding for global variable ‘variation_par_class’

​  variation_par_class$new(par, variance)
  ^~~~~~~~~~~~~~~~~~~

R/parameter.R:123:3: warning: no visible binding for global variable ‘parameter_class’

​  parameter_class$new(as.expression(substitute(expr)))
  ^~~~~~~~~~~~~~~

R/parameter.R:135:3: warning: no visible binding for global variable ‘parameter_class’

​  parameter_class$new(as.expression(constant))
  ^~~~~~~~~~~~~~~

R/parameter.R:144:3: warning: no visible binding for global variable ‘named_par_class’

​  named_par_class$new(name)
  ^~~~~~~~~~~~~~~

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

​      if ((!is.numeric(value)) || length(value) != 1) {
          ^

R/parameter.R:192:3: warning: no visible binding for global variable ‘range_par_class’

​  range_par_class$new(lower, upper, name)
  ^~~~~~~~~~~~~~~

R/parameter.R:203:25: warning: no visible binding for global variable ‘par_eval_func’

​    par_env[["par"]] <- par_eval_func
                        ^~~~~~~~~~~~~

R/parameter.R:209:25: warning: no visible binding for global variable ‘par_print_func’

​    par_env[["par"]] <- par_print_func
                        ^~~~~~~~~~~~~~

R/parameter.R:225:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.numeric(pars))
  ^~~~~~~~~~~

R/parameter.R:229:18: warning: no visible global function definition for ‘get_par_names’

​    par_names <- get_par_names(model, without_priors = TRUE)
                 ^~~~~~~~~~~~~

R/parameter.R:237:11: warning: no visible global function definition for ‘sample_par_priors’

​  c(pars, sample_par_priors(model))
          ^~~~~~~~~~~~~~~~~

R/segsites.R:47:11: warning: no visible global function definition for ‘get_snps’

​  snps <- get_snps(x)
          ^~~~~~~~

R/segsites.R:48:28: warning: no visible global function definition for ‘get_positions’

​  colnames(snps) <- format(get_positions(x), scientific = FALSE)
                           ^~~~~~~~~~~~~

R/segsites.R:62:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.matrix.segsites <- function(x, ...) get_snps(x)
^~~~~~~~~~~~~~~~~~

R/segsites.R:75:19: style: Place a space before left parenthesis, except in a function call.

​  create_segsites((matrix(c(1, 1, 0, 1, 1,
                  ^

R/segsites.R:83:3: warning: no visible global function definition for ‘create_segsites’

​  create_segsites(matrix(0, n_ind, 0), numeric(0))
  ^~~~~~~~~~~~~~~

R/segsites.R:103:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.list(left) && is.list(middle) && is.list(right))
  ^~~~~~~~~~~

R/segsites.R:104:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(left) == length(middle))
  ^~~~~~~~~~~

R/segsites.R:105:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(length(left) == length(right))
  ^~~~~~~~~~~

R/segsites.R:142:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.default <- function(data, ...) {
^~~~~~~~~~~~~~~~~~~

R/segsites.R:147:1: style: Words within variable and function names should be separated by '_' rather than '.'.

​as.segsites.list <- function(data, ...) {
^~~~~~~~~~~~~~~~

R/segsites.R:148:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(all(vapply(data, is_segsites, logical(1))))
  ^~~~~~~~~~~

R/segsites.R:148:32: warning: no visible binding for global variable ‘is_segsites’

​  assert_that(all(vapply(data, is_segsites, logical(1))))
                               ^~~~~~~~~~~

R/simulator_class.R:28:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is_simulator(simulator))
  ^~~~~~~~~~~

R/simulator_class.R:28:15: warning: no visible global function definition for ‘is_simulator’

​  assert_that(is_simulator(simulator))
              ^~~~~~~~~~~~

R/simulator_class.R:33:3: warning: no visible binding for global variable ‘simulators’

​  simulators[[name]]
  ^~~~~~~~~~

R/simulator_class.R:40:19: warning: no visible global function definition for ‘get_locus_length’

​  locus_length <- get_locus_length(model, group = locus_group)
                  ^~~~~~~~~~~~~~~~

R/simulator_class.R:41:25: warning: no visible global function definition for ‘get_locus_number’

​  total_locus_number <- get_locus_number(model, locus_group, TRUE)
                        ^~~~~~~~~~~~~~~~

R/simulator_class.R:64:3: warning: no visible global function definition for ‘reduce_sim_commands’

​  reduce_sim_commands(sim_cmds)
  ^~~~~~~~~~~~~~~~~~~

R/simulator_class.R:70:44: style: Commas should never have a space before.

​  grouped_commands <- unique(sim_commands[ , 2])
                                          ~^

R/simulator_class.R:73:36: style: Commas should never have a space before.

​    sum(sim_commands[sim_commands[ , 2] == cmd, 1])
                                  ~^

R/simulator_class.R:90:13: warning: no visible global function definition for ‘get_simulator’

​    info <- get_simulator(simulator)$get_info()
            ^~~~~~~~~~~~~

R/simulator_ms.R:67:37: style: Do not place spaces around code in parentheses or square brackets.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                    ^

R/simulator_ms.R:87:39: style: Commas should never have a space before.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                     ~^

R/simulator_ms.R:87:50: style: Commas should never have a space before.

​        paste("ms", sample_size, cmd[ , 1], cmd[ , 2])
                                                ~^

R/simulator_ms.R:136:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(ms_class$new(priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_ms.R:136:22: warning: no visible binding for global variable ‘ms_class’

​  register_simulator(ms_class$new(priority))
                     ^~~~~~~~

R/simulator_ms.R:137:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_msms.R:109:41: style: Commas should never have a space before.

​        paste("msms", sample_size, cmd[ , 1], cmd[ , 2])
                                       ~^

R/simulator_msms.R:109:52: style: Commas should never have a space before.

​        paste("msms", sample_size, cmd[ , 1], cmd[ , 2])
                                                  ~^

R/simulator_msms.R:158:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_scrm.R:11:10: warning: no visible global function definition for ‘read_cache’

​  cmd <- read_cache(model, "scrm_cmd")
         ^~~~~~~~~~

R/simulator_scrm.R:17:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "scrm_cmd", cmd)
    ^~~~~

R/simulator_scrm.R:83:41: style: Commas should never have a space before.

​        paste("scrm", sample_size, cmd[ , 1], cmd[ , 2])
                                       ~^

R/simulator_scrm.R:83:52: style: Commas should never have a space before.

​        paste("scrm", sample_size, cmd[ , 1], cmd[ , 2])
                                                  ~^

R/simulator_scrm.R:129:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(scrm_class$new(priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_scrm.R:129:22: warning: no visible binding for global variable ‘scrm_class’

​  register_simulator(scrm_class$new(priority))
                     ^~~~~~~~~~

R/simulator_scrm.R:130:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/simulator_seqgen.R:5:17: warning: no visible global function definition for ‘read_cache’

​  tree_model <- read_cache(model, "tree_model")
                ^~~~~~~~~~

R/simulator_seqgen.R:20:29: warning: no visible global function definition for ‘create_sumstat_container’

​    tree_model$sum_stats <- create_sumstat_container()
                            ^~~~~~~~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:21:32: warning: no visible global function definition for ‘sumstat_sg_trees’

​    tree_model <- tree_model + sumstat_sg_trees()
                               ^~~~~~~~~~~~~~~~

R/simulator_seqgen.R:23:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "tree_model", tree_model)
    ^~~~~

R/simulator_seqgen.R:41:20: warning: no visible global function definition for ‘get_locus_length’

​  locus_lengths <- get_locus_length(model, group = locus, total = FALSE)
                   ^~~~~~~~~~~~~~~~

R/simulator_seqgen.R:47:10: warning: no visible global function definition for ‘sg_generate_opt_cmd’

​  cmd <- sg_generate_opt_cmd(model)
         ^~~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:61:10: warning: no visible global function definition for ‘read_cache’

​  cmd <- read_cache(model, "seqgen_cmd")
         ^~~~~~~~~~

R/simulator_seqgen.R:74:5: warning: no visible global function definition for ‘cache’, Did you mean 'cycle'?

​    cache(model, "seqgen_cmd", cmd)
    ^~~~~

R/simulator_seqgen.R:222:3: warning: no visible global function definition for ‘register_simulator’

​  register_simulator(seqgen_class$new(binary, priority))
  ^~~~~~~~~~~~~~~~~~

R/simulator_seqgen.R:222:22: warning: no visible binding for global variable ‘seqgen_class’

​  register_simulator(seqgen_class$new(binary, priority))
                     ^~~~~~~~~~~~

R/simulator_seqgen.R:223:3: warning: no visible global function definition for ‘reset_cache’

​  reset_cache()
  ^~~~~~~~~~~

R/sumstat_dna.R:40:3: warning: no visible binding for global variable ‘stat_dna_class’

​  stat_dna_class$new(name, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_file.R:46:3: warning: no visible binding for global variable ‘stat_file_class’

​  stat_file_class$new(folder)
  ^~~~~~~~~~~~~~~

R/sumstat_four_gamete.R:73:3: warning: no visible binding for global variable ‘stat_four_gamete_class’

​  stat_four_gamete_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat_ihh.R:53:45: style: Commas should never have a space before.

​                      iHS = data.frame(ihh[ , 1:2], iHS = rep(NA, n_snps))))
                                           ~^

R/sumstat_ihh.R:61:55: style: Commas should never have a space before.

​            data.frame(ihh2ihs(ihh, freqbin)$res.ihs[ , -4])
                                                     ~^

R/sumstat_ihh.R:148:3: warning: no visible binding for global variable ‘stat_ihh_class’

​  stat_ihh_class$new(name, population, max_snps, calc_ihs, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_jsfs.R:60:3: warning: no visible binding for global variable ‘stat_jsfs_class’

​  stat_jsfs_class$new(name, populations, per_locus, transformation)
  ^~~~~~~~~~~~~~~

R/sumstat_mcmf.R:44:3: warning: no visible binding for global variable ‘stat_mcmf_class’

​  stat_mcmf_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~

R/sumstat_nucleotide_div.R:46:3: warning: no visible binding for global variable ‘stat_pi_class’

​  stat_pi_class$new(name, population, transformation)
  ^~~~~~~~~~~~~

R/sumstat_omega.R:156:3: warning: no visible binding for global variable ‘stat_omega_class’

​  stat_omega_class$new(name, min_win, max_win, grid, binary, transformation)
  ^~~~~~~~~~~~~~~~

R/sumstat_omega.R:160:12: warning: no visible global function definition for ‘search_executable’

​  !is.null(search_executable("OmegaPlus", envir_var = "OMEGAPLUS"))
           ^~~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:30:3: warning: no visible binding for global variable ‘stat_segsites_class’

​  stat_segsites_class$new(name, transformation)
  ^~~~~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:36:21: warning: no visible global function definition for ‘get_locus_length’

​    locus_length <- get_locus_length(model, i, total = FALSE)
                    ^~~~~~~~~~~~~~~~

R/sumstat_seg_sites.R:42:12: warning: no visible global function definition for ‘get_positions’

​    pos <- get_positions(seg_sites[[i]])
           ^~~~~~~~~~~~~

R/sumstat_seg_sites.R:51:38: style: Commas should never have a space before.

​    trio_segsites <- seg_sites[[i]][ , left | middle | right]
                                    ~^

R/sumstat_seg_sites.R:60:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(nrow(seg_sites[[i]]) > 0)
    ^~~~~~~~~~~

R/sumstat_sfs.R:38:3: warning: no visible binding for global variable ‘stat_sfs_class’

​  stat_sfs_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~

R/sumstat_tajimas_d.R:62:3: warning: no visible binding for global variable ‘stat_tajimas_d_class’

​  stat_tajimas_d_class$new(name, population, transformation)
  ^~~~~~~~~~~~~~~~~~~~

R/sumstat_trees.R:28:3: warning: no visible binding for global variable ‘stat_trees_class’

​  stat_trees_class$new(name, identity)
  ^~~~~~~~~~~~~~~~

R/sumstat_trees.R:57:3: warning: no visible binding for global variable ‘stat_sg_trees_class’

​  stat_sg_trees_class$new("trees", identity)
  ^~~~~~~~~~~~~~~~~~~

R/sumstat.R:71:15: warning: no visible global function definition for ‘get_id’, Did you mean 'getwd'?

​  model$id <- get_id()
              ^~~~~~

R/sumstat.R:87:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:87:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:89:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(!is.null(segsites_list))
    ^~~~~~~~~~~

R/sumstat.R:90:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(all(vapply(segsites_list, is_segsites, logical(1))))
    ^~~~~~~~~~~

R/sumstat.R:90:43: warning: no visible binding for global variable ‘is_segsites’

​    assert_that(all(vapply(segsites_list, is_segsites, logical(1))))
                                          ^~~~~~~~~~~

R/sumstat.R:93:24: warning: no visible global function definition for ‘remove_singletons’

​      segsites_list <- remove_singletons(segsites_list)
                       ^~~~~~~~~~~~~~~~~

R/sumstat.R:96:7: warning: no visible global function definition for ‘requires_trees’

​  if (requires_trees(model)) assert_that(!is.null(trees))
      ^~~~~~~~~~~~~~

R/sumstat.R:96:30: warning: no visible global function definition for ‘assert_that’

​  if (requires_trees(model)) assert_that(!is.null(trees))
                             ^~~~~~~~~~~

R/sumstat.R:97:7: warning: no visible global function definition for ‘requires_files’

​  if (requires_files(model)) assert_that(!is.null(files))
      ^~~~~~~~~~~~~~

R/sumstat.R:97:30: warning: no visible global function definition for ‘assert_that’

​  if (requires_files(model)) assert_that(!is.null(files))
                             ^~~~~~~~~~~

R/sumstat.R:111:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:111:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:120:20: warning: no visible global function definition for ‘conv_for_trios’

​      seg_sites <- conv_for_trios(seg_sites, model)
                   ^~~~~~~~~~~~~~

R/sumstat.R:176:3: warning: no visible global function definition for ‘assert_that’

​  assert_that(is.model(model))
  ^~~~~~~~~~~

R/sumstat.R:176:15: warning: no visible global function definition for ‘is.model’

​  assert_that(is.model(model))
              ^~~~~~~~

R/sumstat.R:179:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(is.list(trios))
    ^~~~~~~~~~~

R/sumstat.R:180:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(!is.null(segsites_list))
    ^~~~~~~~~~~

R/sumstat.R:186:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(is.numeric(trio))
      ^~~~~~~~~~~

R/sumstat.R:188:7: warning: no visible global function definition for ‘assert_that’

​      assert_that(length(trio) == 3)
      ^~~~~~~~~~~

R/sumstat.R:196:22: warning: no visible global function definition for ‘as.segsites’

​    segsites_list <- as.segsites(segsites_list, ...)
                     ^~~~~~~~~~~

R/sumstat.R:200:5: warning: no visible global function definition for ‘assert_that’

​    assert_that(length(segsites_list) == get_locus_number(model))
    ^~~~~~~~~~~

R/sumstat.R:200:42: warning: no visible global function definition for ‘get_locus_number’

​    assert_that(length(segsites_list) == get_locus_number(model))
                                         ^~~~~~~~~~~~~~~~

R/sumstat.R:209:3: warning: no visible global function definition for ‘calc_sumstats’

​  calc_sumstats(model, segsites_list, tree_list)
  ^~~~~~~~~~~~~

R/sumstat.R:214:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_segsites()))
             ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat.R:219:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_trees()))
             ^~~~~~~~~~~~~~~~~~~~~~

R/sumstat.R:224:14: warning: no visible global function definition for ‘get_summary_statistics’

​  any(sapply(get_summary_statistics(model), function(x) x$requires_files()))
             ^~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-feature-ign-singletons.R:13:45: style: Commas should never have a space before.

​               list(create_test_segsites()[ , -c(1, 3)],
                                           ~^

tests/testthat/test-feature-ign-singletons.R:14:45: style: Commas should never have a space before.

​                    create_test_segsites()[ , -c(1, 3)]))
                                           ~^

tests/testthat/test-model-cache.R:47:1: style: Trailing blank lines are superfluous.

​
^

tests/testthat/test-model-class.R:241:44: style: Commas should always have a space after.

​               data.frame(name = c("theta","tau"),
                                           ^

tests/testthat/test-segsites-class.R:30:31: style: Place a space before left parenthesis, except in a function call.

​  segsites <- create_segsites((matrix(c(1, 1, 0, 1, 1,
                              ^

tests/testthat/test-segsites-class.R:36:26: style: Commas should never have a space before.

​  ss_subset <- segsites[ , 1:2]
                        ~^

tests/testthat/test-segsites-class.R:38:64: style: Commas should never have a space before.

​  expect_equivalent(as.matrix(ss_subset), as.matrix(segsites)[ , 1:2])
                                                              ~^

tests/testthat/test-segsites-class.R:41:30: style: Commas should never have a space before.

​  expect_equal(dim(segsites[ , 1]), c(3, 1))
                            ~^

tests/testthat/test-segsites-class.R:42:33: style: Commas should never have a space before.

​  expect_equal(dim(segsites[1:2 , ]), c(2, 3))
                               ~^