non_package_files/make_stripped_tree_4performancetest.R

# strip attributes in nested list

strip<-function(nl){
  attributes(nl)<-attributes(nl)[ names(attributes(nl)) %in% "names"]
  if(is.list(nl)){
    nl<-lapply(nl, strip)
  }
  nl
}
attributes(strip(tr))
attributes(strip(tr)[[1]])
attributes(strip(tr)[[c(1,1)]])
str<-strip(tr)
save(str, file="../str")
tdanker/ephys2 documentation built on Aug. 11, 2019, 12:12 p.m.