Skip to content

Commit

Permalink
Minor bug fix to extract.metadata.se() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn P. Serbin authored and Shawn P. Serbin committed Mar 3, 2015
1 parent c449228 commit a9bdbf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: FieldSpectra
Type: Package
Title: Functions for processing field spectroscopy data
Version: 0.921
Date: 2014-02-18
Version: 0.922
Date: 2015-03-03
Author: Shawn P. Serbin
Maintainer: Shawn P. Serbin <serbin@wisc.edu>
Description: A field spectroscopy package containing functions to process
Expand Down
3 changes: 3 additions & 0 deletions R/spec.utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,10 @@ extract.metadata.se <- function(file.dir,out.dir,spec.file.ext,output.file.ext,t
channels[i] <- gsub(" ","",(strsplit(file.head[24],":")[[1]])[2])
data.columns[i] <- gsub("[^0-9]","", strsplit(file.head[25],":")[[1]])[1]

# Original version
temp.1 <- read.table(se.files[i],skip=data.line[i],nrows=1,sep="\t")
# Modified version
temp.1 <- read.table(se.files[i],skip=data.line[i],comment.char="",nrows=1,sep="\t")
temp.2 <- apply(temp.1, 1, function(x) pmatch("Reflect",x))
temp.3 <- gsub(" ","",gsub("Reflect.", "", temp.1[temp.2][[1]]))
if (temp.3=="%"){
Expand Down

0 comments on commit a9bdbf5

Please sign in to comment.