Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test for Dunja
  • Loading branch information
puetz committed Aug 11, 2017
1 parent b9ae1d8 commit 0e19b27
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions dfl2df.R
@@ -0,0 +1,38 @@
## probably done in rbind.data.frame


##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##' @title
##' @param df.list
##' @param ...
##' @return
##' @author Benno Puetz \email{puetz@@mpipsykl.mpg.de}
##' @examples
dfl2df <- function(df.list,
...){
n <- length(df.list)
lengths <- sapply(df.list, nrow)
csl <- cumsum(lengths)
starts <- c(1, csl + 1)
df <- df.list[[1]]
for (i in n:2){
df[starts[i]:csl[i],] <- df.list[[i]]
}
return(df)
}

##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##' @title
##' @param df.list
##' @param ...
##' @return
##' @author Benno Puetz \email{puetz@@mpipsykl.mpg.de}
##' @examples
d2d2 <- function(df.list,
...){
return(do.call(rbind, df.list))
}

0 comments on commit 0e19b27

Please sign in to comment.