Commit 8dc0e21e by Marco De Lucia

### FlattenList commented out

parent ddacccde
 ... ... @@ -20,7 +20,6 @@ export(FindAllSpeciesNames) export(FindAllTotNames) export(FindLogK) export(FindPhase) export(FlattenList) export(FormulaFromBal) export(Matplot) export(MatplotSingle) ... ...
 ## Functions for dealing with surrogate simulations ### Marco De Lucia, delucia@gfz-potsdam.de, 2009-2018 ### Time-stamp: "Last modified 2018-05-03 17:37:31 delucia" ### Time-stamp: "Last modified 2018-05-06 20:16:47 delucia" ##' Computes the average of absolute values of a vector ##' @title Average of absolute values ... ... @@ -26,30 +26,26 @@ mae <- function(x) mean(abs(x)) ## return(res) ## } ## SoftMaxBackTransf <- function(vec, back) return(log(vec)+log(back)) ##' @title Flatten out a Rphree list ##' @param list list of Rphree lists ##' @param strip logical, should we delete "ListInfo"? Defaults to ##' true ##' @return a list whose elements are single Rphree simulations ##' @author MDL ##' @export FlattenList <- function(list, strip=TRUE) { if (strip) stripped <- sapply(list, StripInfo) else stripped <- list tot <- vector(mode="list", length=sum(sapply(stripped, length))) k <- 1 for (i in seq_along(stripped)) { for (j in seq_along(stripped[[i]])) { tot[[k]] <- stripped[[i]][[j]] k=k+1 } } return(tot) } ## ## SoftMaxBackTransf <- function(vec, back) return(log(vec)+log(back)) ## ##' @title Flatten out a Rphree list ## ##' @param list list of Rphree lists ## ##' @param strip logical, should we delete "ListInfo"? Defaults to ## ##' true ## ##' @return a list whose elements are single Rphree simulations ## ##' @author MDL ## ##' @export ## FlattenList <- function(list) { ## tot <- vector(mode="list", length=sum(sapply(stripped, length))) ## k <- 1 ## for (i in seq_along(stripped)) { ## for (j in seq_along(stripped[[i]])) { ## tot[[k]] <- stripped[[i]][[j]] ## k=k+1 ## } ## } ## return(tot) ## } ##' @title Find all species occurring in the ensemble ... ...
 % Generated by roxygen2: do not edit by hand % Please edit documentation in R/Rphree_SurrogateUtils.R \name{FlattenList} \alias{FlattenList} \title{Flatten out a Rphree list} \usage{ FlattenList(list, strip = TRUE) } \arguments{ \item{list}{list of Rphree lists} \item{strip}{logical, should we delete "ListInfo"? Defaults to true} } \value{ a list whose elements are single Rphree simulations } \author{ MDL }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment