comparison dfhlp.R @ 5:fb9c0409d85c draft

planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit 608d9e59a0d2dcf85a037968ddb2c61137fb9bce
author prog
date Wed, 19 Apr 2017 10:00:05 -0400
parents e66bb061af06
children
comparison
equal deleted inserted replaced
4:b34c14151f25 5:fb9c0409d85c
40 ##################### 40 #####################
41 41
42 df.move.col.last <- function(df, cols) { 42 df.move.col.last <- function(df, cols) {
43 not.cols <- setdiff(names(df), cols) 43 not.cols <- setdiff(names(df), cols)
44 df[c(not.cols, cols)] 44 df[c(not.cols, cols)]
45 }
46
47 ##############
48 # READ TABLE #
49 ##############
50
51 df.read.table <- function(file, sep = "", header = TRUE, remove.na.rows = TRUE, check.names = TRUE, stringsAsFactors = TRUE, trim.header = FALSE, trim.values = FALSE, fileEncoding = "") {
52
53 # Call built-in read.table()
54 df <- read.table(file, sep = sep, header = header, check.names = check.names, stringsAsFactors = stringsAsFactors, fileEncoding = fileEncoding)
55
56 # Clean data frame
57 df <- df.clean(df, trim.colnames = trim.header, trim.values = trim.values, remove.na.rows = remove.na.rows)
58
59 return(df)
60 } 45 }
61 46
62 ################# 47 #################
63 # READ CSV FILE # 48 # READ CSV FILE #
64 ################# 49 #################