Skip to content

Commit

Permalink
continued experiments with eliminating Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Thorson-NOAA committed Aug 16, 2023
1 parent 757739d commit fe8819b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
^cran-comments\.md$
^CRAN-SUBMISSION$



11 changes: 6 additions & 5 deletions src/phylosem.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

#define TMB_LIB_INIT R_init_phylosem
#include <TMB.hpp>

// Function for detecting NAs
template<class Type>
bool isNA(Type x){
return R_IsNA(asDouble(x));
}
//template<class Type>
//bool isNA(Type x){
// return R_IsNA(asDouble(x));
//}

// SparseMatrix for Ornstein-Uhlenbeck network correlations
//template<class Type>
Expand Down Expand Up @@ -239,7 +240,7 @@ Type objective_function<Type>::operator() ()
// Distribution for data
for(int i=0; i<n_i; i++){
for(int j=0; j<n_j; j++){
if( !isNA(y_ij(i,j)) ){
if( !R_IsNA(asDouble(y_ij(i,j))) ){
// familycode = 0 : don't include likelihood
// familycode = 1 : normal
if( familycode_j(j)==1 ){
Expand Down
2 changes: 1 addition & 1 deletion vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.html
*.R
*.R
Binary file removed vignettes/comparison.pdf
Binary file not shown.
Binary file removed vignettes/demonstration.pdf
Binary file not shown.
Binary file removed vignettes/phylopath.pdf
Binary file not shown.

0 comments on commit fe8819b

Please sign in to comment.