Skip to content

Commit

Permalink
neotoma back to cran
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmckay committed Sep 10, 2024
1 parent 181b11f commit 11a4bec
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
2 changes: 0 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ Suggests:
rmarkdown,
testthat,
googlesheets4
Remotes:
neotomadb/neotoma2
VignetteBuilder: knitr
LazyData: true
50 changes: 50 additions & 0 deletions R/inCompilation.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# checkfun <- function(cn,cv,compName,compVers){
# if(is.list(cv)){
# anycvm <- purrr::map_lgl(cv,function(x){any(x == compVers)})
# }else{
# cvm <- t(as.matrix(cv))
# anycvm <- apply(cvm,1,function(x){any(x == compVers)})
# }
#
# # old code here:
# # bothMatch <- (cn==compName & purrr::map_lgl(cv,function(x){any(x == compVers)}))
# bothMatch <- (cn==compName & anycvm)
#
# #put NAs back in for compName
# incn <- which(is.na(cn))
# bothMatch[incn] <- NA
# out <- data.frame(bothMatch)
# out <- setNames(out, createTSid())
# return(out)
# }
#
#
# inThisCompilation <- function(TS,compName,compVers){
# TS <- as.lipdTs(TS)
# allNames <- sort(unique(unlist(sapply(TS,names))))#get all names in TS
# #get all the names of the compilations
# allComps <- allNames[grepl(pattern = "inCompilationBeta[0-9]+_compilationName",allNames)]
# allVers <- allNames[grepl(pattern = "inCompilationBeta[0-9]+_compilationVersion",allNames)]
#
# if(length(allComps) == 0){
# return(matrix(NA,nrow = length(TS)))
#
# }
# allCompNames <- vector(mode = "list",length=length(allComps))
# allCompVersions <- vector(mode = "list",length=length(allComps))
#
# #get all the data
# for(i in 1:length(allComps)){
# allCompNames[[i]] <- pullTsVariable(TS,allComps[i])
# allCompVersions[[i]] <- pullTsVariable(TS,allVers[i])
# }
#
# #check for each compilation
# compCheck <- purrr::map2_dfc(allCompNames,allCompVersions,checkfun,compName,compVers)
#
# #check across rows
# unify <- as.matrix(apply(compCheck,1,any))
#
# return(unify)
#
# }

0 comments on commit 11a4bec

Please sign in to comment.