Closed SimonGreenhill closed 7 years ago
I guess you are right. testit
must have shifted from Suggests
to Requires
. Thanks!
inst/doc/trees_with_root_edge.R:8:7: style: Variable or function name should be snake_case.
tree1$edge.length <- tree1$edge.length / tree1$edge.length[1]
^~~~~~~~~~~
inst/doc/trees_with_root_edge.R:12:7: style: Variable or function name should be snake_case.
tree2$root.edge <- 1
^~~~~~~~~
inst/doc/walkthrough.R:53:12: style: Remove spaces before the left parenthesis in a function call.
return (t)
^
inst/doc/walkthrough.R:58:12: style: Remove spaces before the left parenthesis in a function call.
return ( rexp(n = 1, rate = 10) )
^
inst/doc/walkthrough.R:58:13: style: Do not place spaces around code in parentheses or square brackets.
return ( rexp(n = 1, rate = 10) )
^
inst/doc/walkthrough.R:58:36: style: Do not place spaces around code in parentheses or square brackets.
return ( rexp(n = 1, rate = 10) )
^
inst/doc/walkthrough.R:62:11: style: Do not place spaces around code in parentheses or square brackets.
return( dexp( val[1], rate = 10) )
^
inst/doc/walkthrough.R:62:17: style: Do not place spaces around code in parentheses or square brackets.
return( dexp( val[1], rate = 10) )
^
inst/doc/walkthrough.R:62:36: style: Do not place spaces around code in parentheses or square brackets.
return( dexp( val[1], rate = 10) )
^
inst/doc/walkthrough.R:74:1: style: Variable or function name should be snake_case.
A <- abc_smc_nltt(
^
inst/doc/walkthrough.R:85:1: style: Variable or function name should be snake_case.
LL_B <- function(params, phy) {
^~~~
inst/doc/walkthrough.R:97:3: style: Variable or function name should be snake_case.
ML <- stats::optimize(f = fun, interval = c(0, 1))
^~
inst/doc/walkthrough.R:108:1: style: Variable or function name should be snake_case.
B <- mcmc_nltt(obs, LL_B, parameters = c(0.5),
^
inst/doc/walkthrough.R:114:1: style: Variable or function name should be snake_case.
B.mcmc <- coda::as.mcmc(B)
^~~~~~
R/ABC_SMC.R:11:1: style: Lines should not be more than 80 characters.
# @param current vector Current parameter combination for which we are determining the weight
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:12:1: style: Lines should not be more than 80 characters.
# @param sigma scalar standard deviation of the perturbation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:13:1: style: Lines should not be more than 80 characters.
# @param prior_density_function function Function to calculate the prior probability of a set of parameters
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:21:8: style: Do not place spaces around code in parentheses or square brackets.
for ( i in seq_along( particles)) {
^
R/ABC_SMC.R:21:24: style: Do not place spaces around code in parentheses or square brackets.
for ( i in seq_along( particles)) {
^
R/ABC_SMC.R:23:25: style: Do not place spaces around code in parentheses or square brackets.
for (j in seq_along( current)) {
^
R/ABC_SMC.R:31:10: style: Remove spaces before the left parenthesis in a function call.
return (numerator / sum( vals))
^
R/ABC_SMC.R:31:27: style: Do not place spaces around code in parentheses or square brackets.
return (numerator / sum( vals))
^
R/ABC_SMC.R:36:1: style: Lines should not be more than 80 characters.
# @brief apply the ABC routine used in our Methods in Ecology and Evolution Paper
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:43:1: style: Lines should not be more than 80 characters.
# @param statistics vector A vector containing functions that take a tree as an argument and return a single scalar value (the statistic).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:44:1: style: Lines should not be more than 80 characters.
# @param simulation_function vector A function that implements the diversification model and returns an object of class phylo
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:45:1: style: Lines should not be more than 80 characters.
# @param init_epsilon_values vector A vector containing the initial threshold values for the summary statistics from the vector statistics.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:46:1: style: Lines should not be more than 80 characters.
# @param prior_generating_function function Function to generate parameters from the prior distribution of these parameters (e.g. a function returning lambda and mu in case of the birth-death model)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:47:1: style: Lines should not be more than 80 characters.
# @param prior_density_function function Function to calculate the prior probability of a set of parameters (should match prior_generating_function in shape)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:48:1: style: Lines should not be more than 80 characters.
# @param number_of_particles scalar Number of particles to be used per iteration of the ABC-SMC algorithm.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:49:1: style: Lines should not be more than 80 characters.
# @param sigma scalar Standard deviation of the perturbance distribution (perturbance distribution is a gaussian with mean 0).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:50:1: style: Lines should not be more than 80 characters.
# @param stop_rate scalar If the acceptance rate drops below \code{stopRate}, stop the ABC-SMC algorithm and assume convergence.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:51:1: style: Lines should not be more than 80 characters.
# @return matrix A matrix with n columns, where n is the number of parameters you are trying to estimate.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:54:1: style: Lines should not be more than 80 characters.
#' A function to perform Approximate Bayesian Computation within an Sequential Markov Chain (ABC-SMC), for diversification analysis of phylogenetic trees.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:55:1: style: Lines should not be more than 80 characters.
#' @description This function performs ABC-SMC as described in Toni 2009 for given diversification model, provided a phylogenetic tree. ABC-SMC is not limited to only using the normalized LTT as statistic.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:62:1: style: Lines should not be more than 80 characters.
#' @param tree an object of class \code{"phylo"}; the tree upon which we want to fit our diversification model
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:63:1: style: Lines should not be more than 80 characters.
#' @param statistics A vector containing functions that take a tree as an argument and return a single scalar value (the statistic).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:64:1: style: Lines should not be more than 80 characters.
#' @param simulation_function A function that implements the diversification model and returns an object of class \code{"phylo"}.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:65:1: style: Lines should not be more than 80 characters.
#' @param init_epsilon_values A vector containing the initial threshold values for the summary statistics from the vector \code{statistics}.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:66:1: style: Lines should not be more than 80 characters.
#' @param prior_generating_function Function to generate parameters from the prior distribution of these parameters (e.g. a function returning lambda and mu in case of the birth-death model)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:67:1: style: Lines should not be more than 80 characters.
#' @param prior_density_function Function to calculate the prior probability of a set of parameters.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:68:1: style: Lines should not be more than 80 characters.
#' @param number_of_particles Number of particles to be used per iteration of the ABC-SMC algorithm.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:69:1: style: Lines should not be more than 80 characters.
#' @param sigma Standard deviation of the perturbance distribution (perturbance distribution is a gaussian with mean 0).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:70:1: style: Lines should not be more than 80 characters.
#' @param stop_rate If the acceptance rate drops below \code{stopRate}, stop the ABC-SMC algorithm and assume convergence.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:71:1: style: Lines should not be more than 80 characters.
#' @return A matrix with \code{n} columns, where \code{n} is the number of parameters you are trying to estimate.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:72:1: style: Lines should not be more than 80 characters.
#' @references Toni, T., Welch, D., Strelkowa, N., Ipsen, A., & Stumpf, M.P.H. (2009). Approximate Bayesian computation scheme for parameter inference and model selection in dynamical systems. Journal of the Royal Society Interface, 6(31), 187-202.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:161:22: style: Do not place spaces around code in parentheses or square brackets.
new_params <- list( c( seq_along(parameters)))
^
R/ABC_SMC.R:161:25: style: Do not place spaces around code in parentheses or square brackets.
new_params <- list( c( seq_along(parameters)))
^
R/ABC_SMC.R:163:28: style: Do not place spaces around code in parentheses or square brackets.
previous_params <- list( c( seq_along(parameters)))
^
R/ABC_SMC.R:163:31: style: Do not place spaces around code in parentheses or square brackets.
previous_params <- list( c( seq_along(parameters)))
^
R/ABC_SMC.R:168:17: style: Do not place spaces around code in parentheses or square brackets.
for (i in 1:50 ) {
^
R/ABC_SMC.R:184:26: style: Do not place spaces around code in parentheses or square brackets.
new_params <- list( c( seq_along(parameters))) #clear new params
^
R/ABC_SMC.R:184:29: style: Do not place spaces around code in parentheses or square brackets.
new_params <- list( c( seq_along(parameters))) #clear new params
^
R/ABC_SMC.R:228:15: style: Do not place spaces around code in parentheses or square brackets.
if ( abs(stats[k] - obs_statistics[k]) > epsilon[i, k] ) {
^
R/ABC_SMC.R:228:65: style: Do not place spaces around code in parentheses or square brackets.
if ( abs(stats[k] - obs_statistics[k]) > epsilon[i, k] ) {
^
R/ABC_SMC.R:236:13: style: Do not place spaces around code in parentheses or square brackets.
if ( accept ) {
^
R/ABC_SMC.R:236:20: style: Do not place spaces around code in parentheses or square brackets.
if ( accept ) {
^
R/ABC_SMC.R:248:15: style: Do not place spaces around code in parentheses or square brackets.
if ( (number_accepted) %%
^
R/ABC_SMC.R:259:13: style: Do not place spaces around code in parentheses or square brackets.
if ( (number_accepted / tried) < stop_rate) {
^
R/ABC_SMC.R:274:25: style: Do not place spaces around code in parentheses or square brackets.
for (m in seq_along( parameters)) {
^
R/ABC_SMC.R:275:16: style: Do not place spaces around code in parentheses or square brackets.
add <- c( add, previous_params[[k]][m])
^
R/ABC_SMC.R:279:10: style: Remove spaces before the left parenthesis in a function call.
return (output)
^
R/ABC_SMC.R:284:1: style: Lines should not be more than 80 characters.
# @brief Estimate the likelihood of a given tree, provided a likelihood function, using a Monte Carlo Markov Chain
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:291:1: style: Lines should not be more than 80 characters.
# @param likelihood_function function Function that calculates the likelihood of our diversification model, given the tree.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:292:1: style: Lines should not be more than 80 characters.
# function should be of the format function(parameters, phy).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:293:1: style: Lines should not be more than 80 characters.
# @param parameters vector Initial parameters to start the chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:294:1: style: Lines should not be more than 80 characters.
# @param logtransforms scalar Whether to perform jumps on logtransformed parameters (TRUE) or not (FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:296:1: style: Lines should not be more than 80 characters.
# @param burnin scalar Length of the burnin, default is 30% of iterations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:298:1: style: Lines should not be more than 80 characters.
# @param sigma scalar Standard deviation of the jumping distribution, which is N(0, sigma).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:299:1: style: Lines should not be more than 80 characters.
# @return mcmc An MCMC object, as used by the package "coda".
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/ABC_SMC.R:316:26: style: Do not place spaces around code in parentheses or square brackets.
chain <- array(dim = c( floor( iterations / thinning) + 1,
^
R/ABC_SMC.R:316:33: style: Do not place spaces around code in parentheses or square brackets.
chain <- array(dim = c( floor( iterations / thinning) + 1,
^
R/ABC_SMC.R:338:10: style: Do not place spaces around code in parentheses or square brackets.
for ( j in seq_along(parameters) ) {
^
R/ABC_SMC.R:338:37: style: Do not place spaces around code in parentheses or square brackets.
for ( j in seq_along(parameters) ) {
^
R/ABC_SMC.R:339:11: style: Do not place spaces around code in parentheses or square brackets.
if ( logtransforms[j] == TRUE ) {
^
R/ABC_SMC.R:339:36: style: Do not place spaces around code in parentheses or square brackets.
if ( logtransforms[j] == TRUE ) {
^
R/ABC_SMC.R:340:13: style: Do not place spaces around code in parentheses or square brackets.
if ( parameters[j] == 0) {
^
R/ABC_SMC.R:353:13: style: Do not place spaces around code in parentheses or square brackets.
if ( is.finite(new_pp) &&
^
R/ABC_SMC.R:355:59: style: Do not place spaces around code in parentheses or square brackets.
new_pp - pp + hr > log(stats::runif(1, 0, 1)) ) {
^
R/ABC_SMC.R:372:15: style: Do not place spaces around code in parentheses or square brackets.
if ( is.finite(new_pp) &&
^
R/ABC_SMC.R:374:61: style: Do not place spaces around code in parentheses or square brackets.
new_pp - pp + hr > log(stats::runif(1, 0, 1)) ) {
^
R/ABC_SMC.R:387:11: style: Do not place spaces around code in parentheses or square brackets.
if ( (i) %% ( (iterations - burnin) / print_frequency) == 0) {
^
R/ABC_SMC.R:387:20: style: Do not place spaces around code in parentheses or square brackets.
if ( (i) %% ( (iterations - burnin) / print_frequency) == 0) {
^
R/ABC_SMC.R:391:11: style: Do not place spaces around code in parentheses or square brackets.
if ( (i - burnin) %% thinning == 0 ) {
^
R/ABC_SMC.R:391:41: style: Do not place spaces around code in parentheses or square brackets.
if ( (i - burnin) %% thinning == 0 ) {
^
R/ABC_SMC.R:392:15: style: Do not place spaces around code in parentheses or square brackets.
chain[ (i - burnin) / thinning + 1, ] <- parameters
^
R/ABC_SMC.R:398:10: style: Do not place spaces around code in parentheses or square brackets.
return( coda::as.mcmc(chain) )
^
R/ABC_SMC.R:398:31: style: Do not place spaces around code in parentheses or square brackets.
return( coda::as.mcmc(chain) )
^
R/get_average_nltt_matrix.R:3:1: style: Lines should not be more than 80 characters.
#' @param phylogenies the phylogenies, supplied as either a list or a multiPhylo object, where the phylogenies are of type 'phylo'
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/get_average_nltt_matrix.R:4:1: style: Lines should not be more than 80 characters.
#' @param dt The timestep resolution, where 1/dt is the number of points evaluated
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/get_average_nltt_matrix.R:5:1: style: Lines should not be more than 80 characters.
#' @return A matrix of timepoints with the average number of (normalized) lineages through (normalized) time
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/get_braching_times.R:15:12: style: Remove spaces before the left parenthesis in a function call.
return (c(brts[1] + phylogeny$root.edge, brts))
^
R/get_braching_times.R:17:10: style: Remove spaces before the left parenthesis in a function call.
return (brts)
^
R/get_n_lineages.R:17:12: style: Remove spaces before the left parenthesis in a function call.
return (1:length(phylogeny$tip.label))
^
R/get_n_lineages.R:19:10: style: Remove spaces before the left parenthesis in a function call.
return (2:length(phylogeny$tip.label))
^
R/get_nltt_values.R:3:1: style: Lines should not be more than 80 characters.
#' @param phylogenies the phylogenies, supplied as either a list or a multiPhylo object, where the phylogenies are of type 'phylo'
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/get_nltt_values.R:4:1: style: Lines should not be more than 80 characters.
#' @param dt The timestep resolution, where 1/dt is the number of points evaluated
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/get_nltt_values.R:5:1: style: Lines should not be more than 80 characters.
#' @return A dataframe of timepoints with the nLTT value of each phylogeny in time
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/get_norm_brts.R:20:9: style: Remove spaces before the left parenthesis in a function call.
return (brts)
^
R/get_norm_n.R:20:9: style: Remove spaces before the left parenthesis in a function call.
return (ns)
^
R/nLTTDiff.R:8:1: style: Lines should not be more than 80 characters.
#' @return (scalar) normalized Lineage-Through-Time difference between tree1 & tree2
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:16:10: style: Remove spaces before the left parenthesis in a function call.
return (nLTT::nltt_diff( tree1, tree2, distance_method, ignore_stem))
^
R/nLTTDiff.R:16:27: style: Do not place spaces around code in parentheses or square brackets.
return (nLTT::nltt_diff( tree1, tree2, distance_method, ignore_stem))
^
R/nLTTDiff.R:25:1: style: Lines should not be more than 80 characters.
#' @param lineages2 the number of lineages, usually one to the number of lineages
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:33:1: style: Lines should not be more than 80 characters.
#' \item{"ago: "}{the branching times are postive, as these are in time units ago}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:34:1: style: Lines should not be more than 80 characters.
#' \item{"since: "}{the branching times are negative, as these are in time units since present}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:48:32: style: Do not place spaces around code in parentheses or square brackets.
testit::assert(length(b_times ) == length(lineages ))
^
R/nLTTDiff.R:48:53: style: Do not place spaces around code in parentheses or square brackets.
testit::assert(length(b_times ) == length(lineages ))
^
R/nLTTDiff.R:71:32: style: Do not place spaces around code in parentheses or square brackets.
testit::assert(length(b_times ) == length(lineages ))
^
R/nLTTDiff.R:71:53: style: Do not place spaces around code in parentheses or square brackets.
testit::assert(length(b_times ) == length(lineages ))
^
R/nLTTDiff.R:80:3: style: Variable or function name should be snake_case.
b_times_N <- 1.0 - b_times / min(b_times) #normalize branching times
^~~~~~~~~
R/nLTTDiff.R:81:3: style: Variable or function name should be snake_case.
lineages_N <- lineages / max(lineages) #normalize lineages
^~~~~~~~~~
R/nLTTDiff.R:86:3: style: Variable or function name should be snake_case.
b_times2_N <- 1 - b_times2 / min(b_times2) #normalize branching times
^~~~~~~~~~
R/nLTTDiff.R:87:3: style: Variable or function name should be snake_case.
lineages2_N <- lineages2 / max(lineages2) #normalize lineages
^~~~~~~~~~~
R/nLTTDiff.R:90:10: style: Remove spaces before the left parenthesis in a function call.
return (nltt_diff_exact_norm_brts(
^
R/nLTTDiff.R:105:1: style: Lines should not be more than 80 characters.
#' @param lineages_N the number of lineages, usually one to the number of lineages
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:107:1: style: Lines should not be more than 80 characters.
#' @param lineages2_N the number of lineages, usually one to the number of lineages
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:111:3: style: Variable or function name should be snake_case.
b_times_N,
^~~~~~~~~
R/nLTTDiff.R:112:3: style: Variable or function name should be snake_case.
lineages_N,
^~~~~~~~~~
R/nLTTDiff.R:113:3: style: Variable or function name should be snake_case.
b_times2_N,
^~~~~~~~~~
R/nLTTDiff.R:114:3: style: Variable or function name should be snake_case.
lineages2_N,
^~~~~~~~~~~
R/nLTTDiff.R:167:33: style: Do not place spaces around code in parentheses or square brackets.
diff <- diff + dt * abs( lins1 - lins2) #update the difference
^
R/nLTTDiff.R:170:30: style: Do not place spaces around code in parentheses or square brackets.
diff <- diff + dt * ( lins1 - lins2) * ( lins1 - lins2)
^
R/nLTTDiff.R:170:49: style: Do not place spaces around code in parentheses or square brackets.
diff <- diff + dt * ( lins1 - lins2) * ( lins1 - lins2)
^
R/nLTTDiff.R:173:10: style: Remove spaces before the left parenthesis in a function call.
return ( diff)
^
R/nLTTDiff.R:173:11: style: Do not place spaces around code in parentheses or square brackets.
return ( diff)
^
R/nLTTDiff.R:176:1: style: Lines should not be more than 80 characters.
#' Calculates the exact difference between the lineage through time curves of tree1 & tree2 (normalized in time and for the number of lineages)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:182:1: style: Lines should not be more than 80 characters.
#' @return (scalar) normalized Lineage-Through-Time difference between tree1 & tree2
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:228:10: style: Remove spaces before the left parenthesis in a function call.
return (
^
R/nLTTDiff.R:249:1: style: Lines should not be more than 80 characters.
# @param distance_method string Method to calculate the difference, either absolute, or squared
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:250:1: style: Lines should not be more than 80 characters.
# @return scalar normalized Lineage-Through-Time difference between tree1 & tree2
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:253:1: style: Lines should not be more than 80 characters.
#' This function takes two ultrametric phylogenetic trees, calculates the normalized Lineage-Through-Time statistic for both trees and then calculates the difference between the two statistics.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:254:1: style: Lines should not be more than 80 characters.
#' @title Calculate the difference between two normalized Lineage-Through-Time curves, given two phylogenetic trees.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:258:1: style: Lines should not be more than 80 characters.
#' @param distance_method Chosen measurement of distance between the two nLTT curves, options are (case sensitive):\cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:291:7: style: Do not place spaces around code in parentheses or square brackets.
if ( distance_method != "abs" && distance_method != "squ") {
^
R/nLTTDiff.R:299:27: style: Do not place spaces around code in parentheses or square brackets.
diff <- nLTT::nltt_diff( tree1, tree2, distance_method, ignore_stem)
^
R/nLTTDiff.R:300:10: style: Remove spaces before the left parenthesis in a function call.
return (diff)
^
R/nLTTDiff.R:313:1: style: Lines should not be more than 80 characters.
# @param distance_method string Method to calculate the difference, either absolute, or squared
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:314:1: style: Lines should not be more than 80 characters.
# @param ignore_stem logical Should the phylogeny its stem be ignored?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:315:1: style: Lines should not be more than 80 characters.
# @return scalar normalized Lineage-Through-Time difference between tree1 & tree2
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:318:1: style: Lines should not be more than 80 characters.
#' Calculate the exact difference between two normalized Lineage-Through-Time curves, given two phylogenetic trees.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:319:1: style: Lines should not be more than 80 characters.
#' @description This function takes two ultrametric phylogenetic trees, calculates the normalized Lineage-Through-Time statistic for both trees and then calculates the exact difference between the two statistics. Whereas the function \code{nLTTstat} uses an approximation to calculate the difference (which is faster for large trees), the function \code{nLTTstat_exact} calculates the exact difference, and should generally be preferred. Although the estimates are highly similar, \code{nLTTstat_exact} tends to return slightly higher values.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:325:1: style: Lines should not be more than 80 characters.
#' Chosen measurement of distance between the two nLTT curves, options are (case sensitive):\cr
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nLTTDiff.R:364:33: style: Do not place spaces around code in parentheses or square brackets.
diff <- nLTT::nltt_diff_exact( tree1, tree2, distance_method, ignore_stem)
^
R/nLTTDiff.R:365:10: style: Remove spaces before the left parenthesis in a function call.
return (diff)
^
R/nltts_plot.R:4:1: style: Lines should not be more than 80 characters.
#' @param dt The timestep resolution, where 1/dt is the number of points evaluated
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/nltts_plot.R:8:1: style: Lines should not be more than 80 characters.
#' @param replot If false, start a clean plot. If true, plot the new data over the current
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/plot_nLTT.R:15:1: style: Lines should not be more than 80 characters.
#' This function uses a modified version of the ltt.plot function from \code{"ape"} to plot the normalized number of lineages through normalized time, where the number of lineages is normalized by dividing by the number of tips of the tree, and the time is normalized by the total time between the most common recent ancestor and the present, such that t(MRCA) = 0 & t(present) = 1.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/plot_nLTT.R:17:1: style: Lines should not be more than 80 characters.
#' @usage nltt_plot(phy, xlab = "Normalized Time", ylab = "Normalized Lineages", ...)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/plot_nLTT.R:29:23: style: Do not place spaces around code in parentheses or square brackets.
nltt_plot <- function( phy, xlab = "Normalized Time",
^
R/plot_nLTT.R:40:30: style: Do not place spaces around code in parentheses or square brackets.
xy <- ape::ltt.plot.coords( phy, backward = TRUE, tol = 1e-6)
^
R/plot_nLTT.R:43:28: style: Do not place spaces around code in parentheses or square brackets.
xy[, 1] <- xy[, 1] + abs( min( xy[, 1])) #make sure time runs from 0..T
^
R/plot_nLTT.R:43:33: style: Do not place spaces around code in parentheses or square brackets.
xy[, 1] <- xy[, 1] + abs( min( xy[, 1])) #make sure time runs from 0..T
^
R/plot_nLTT.R:44:28: style: Do not place spaces around code in parentheses or square brackets.
xy[, 1] <- xy[, 1] / max( xy[, 1]) #normalize time
^
R/plot_nLTT.R:61:1: style: Lines should not be more than 80 characters.
#' This is a modified version of the \code{ape} function ltt.lines: add the normalized Lineage-Through-Time statistic of a phylogenetic tree to an already existing plot
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/plot_nLTT.R:80:30: style: Do not place spaces around code in parentheses or square brackets.
xy <- ape::ltt.plot.coords( phy, backward = TRUE, tol = 1e-6)
^
R/plot_nLTT.R:81:28: style: Do not place spaces around code in parentheses or square brackets.
xy[, 2] <- xy[, 2] / max( xy[, 2]) #normalize number lineages
^
R/plot_nLTT.R:83:28: style: Do not place spaces around code in parentheses or square brackets.
xy[, 1] <- xy[, 1] + abs( min( xy[, 1])) #make sure time runs from 0..T
^
R/plot_nLTT.R:83:33: style: Do not place spaces around code in parentheses or square brackets.
xy[, 1] <- xy[, 1] + abs( min( xy[, 1])) #make sure time runs from 0..T
^
R/plot_nLTT.R:84:28: style: Do not place spaces around code in parentheses or square brackets.
xy[, 1] <- xy[, 1] / max( xy[, 1]) #normalize time
^
R/stretch_nltt_matrix.R:4:1: style: Lines should not be more than 80 characters.
#' @param dt The resultion, a value e [0.0001, 1]. If 'dt' is set to a very small value, this function will stop
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
R/stretch_nltt_matrix.R:47:12: style: Do not place spaces around code in parentheses or square brackets.
m <- m[ -rows_to_delete, ]
^
R/stretch_nltt_matrix.R:65:15: style: Do not place spaces around code in parentheses or square brackets.
n <- matrix( c(n_ts, n_ns), ncol = 2, nrow = n_nrow)
^
tests/testthat/test-abc_smc_nltt.R:6:50: style: Remove spaces before the left parenthesis in a function call.
Sys.getenv("HOME") == "/home/p230198") return ()
^
tests/testthat/test-abc_smc_nltt.R:13:12: style: Remove spaces before the left parenthesis in a function call.
return (t)
^
tests/testthat/test-abc_smc_nltt.R:17:12: style: Remove spaces before the left parenthesis in a function call.
return ( rexp(n = 1, rate = 10) )
^
tests/testthat/test-abc_smc_nltt.R:17:13: style: Do not place spaces around code in parentheses or square brackets.
return ( rexp(n = 1, rate = 10) )
^
tests/testthat/test-abc_smc_nltt.R:17:36: style: Do not place spaces around code in parentheses or square brackets.
return ( rexp(n = 1, rate = 10) )
^
tests/testthat/test-abc_smc_nltt.R:21:11: style: Do not place spaces around code in parentheses or square brackets.
return( dexp( val[1], rate = 10) )
^
tests/testthat/test-abc_smc_nltt.R:21:17: style: Do not place spaces around code in parentheses or square brackets.
return( dexp( val[1], rate = 10) )
^
tests/testthat/test-abc_smc_nltt.R:21:36: style: Do not place spaces around code in parentheses or square brackets.
return( dexp( val[1], rate = 10) )
^
tests/testthat/test-abc_smc_nltt.R:27:3: style: Variable or function name should be snake_case.
LL_BD <- function(params, phy) {
^~~~~
tests/testthat/test-abc_smc_nltt.R:41:3: style: Variable or function name should be snake_case.
ML <- stats::optimize(f = tofit, interval = c(0, 1))
^~
tests/testthat/test-abc_smc_nltt.R:47:3: style: Variable or function name should be snake_case.
A <- abc_smc_nltt(
^
tests/testthat/test-abc_smc_nltt.R:66:12: style: Remove spaces before the left parenthesis in a function call.
return (t)
^
tests/testthat/test-abc_smc_nltt.R:70:12: style: Do not place spaces around code in parentheses or square brackets.
return( rexp(n = 2, rate = 1) )
^
tests/testthat/test-abc_smc_nltt.R:70:34: style: Do not place spaces around code in parentheses or square brackets.
return( rexp(n = 2, rate = 1) )
^
tests/testthat/test-abc_smc_nltt.R:77:12: style: Remove spaces before the left parenthesis in a function call.
return ( dexp( val[1], rate = 1) *
^
tests/testthat/test-abc_smc_nltt.R:77:13: style: Do not place spaces around code in parentheses or square brackets.
return ( dexp( val[1], rate = 1) *
^
tests/testthat/test-abc_smc_nltt.R:77:19: style: Do not place spaces around code in parentheses or square brackets.
return ( dexp( val[1], rate = 1) *
^
tests/testthat/test-abc_smc_nltt.R:78:21: style: Do not place spaces around code in parentheses or square brackets.
dexp( val[2], rate = 1) )
^
tests/testthat/test-abc_smc_nltt.R:78:39: style: Do not place spaces around code in parentheses or square brackets.
dexp( val[2], rate = 1) )
^
tests/testthat/test-get_branching_times.R:17:13: style: Variable or function name should be snake_case.
phylogeny$root.edge <- 2
^~~~~~~~~
tests/testthat/test-get_n_lineages.R:7:13: style: Variable or function name should be snake_case.
phylogeny$root.edge <- 2
^~~~~~~~~
tests/testthat/test-mcmc_nltt.R:6:51: style: Remove spaces before the left parenthesis in a function call.
Sys.getenv("HOME") == "/home/p230198") return ()
^
tests/testthat/test-mcmc_nltt.R:13:3: style: Variable or function name should be snake_case.
LL_BD <- function(params, phy) {
^~~~~
tests/testthat/test-mcmc_nltt.R:27:37: style: Do not place spaces around code in parentheses or square brackets.
return(-1 * LL_BD(params, tree1) )
^
tests/testthat/test-mcmc_nltt.R:30:3: style: Variable or function name should be snake_case.
ML <- optim(par = c(1, 0.001), fn = tofit)
^~
Merging #36 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #36 +/- ##
=======================================
Coverage 95.57% 95.57%
=======================================
Files 12 12
Lines 565 565
=======================================
Hits 540 540
Misses 25 25
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7ca0409...2f0bdef. Read the comment docs.
Looks like
testit
is a requirement --nLTTstat_exact
fails to run without it, probably because of L203 and others.