[chronojump] Deleted the function getOptionsFromFile()
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Deleted the function getOptionsFromFile()
- Date: Wed, 29 Apr 2015 11:35:24 +0000 (UTC)
commit c644a71ca957255777d701695feaec58cc5d3b61
Author: Xavier Padullés <x padulles gmail com>
Date: Mon Apr 27 20:35:43 2015 +0200
Deleted the function getOptionsFromFile()
encoder/capture.R | 2 +-
encoder/inertia-momentum.R | 9 +--------
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/encoder/capture.R b/encoder/capture.R
index a9b913c..985c371 100644
--- a/encoder/capture.R
+++ b/encoder/capture.R
@@ -142,7 +142,7 @@ doProcess <- function(options)
if(input[1] == "C") {
write("received a continue signal", stderr())
- options <- getOptionsFromFile(optionsFile, 32)
+ options <- scan(optionsFile, comment.char="#", what=character(), sep="\n")
op <- assignOptions(options)
curveNum = 0
diff --git a/encoder/inertia-momentum.R b/encoder/inertia-momentum.R
index 42e1524..fd3d849 100644
--- a/encoder/inertia-momentum.R
+++ b/encoder/inertia-momentum.R
@@ -92,13 +92,6 @@ calculate <- function (displacement, mass, length)
return(as.numeric(I))
}
-getOptionsFromFile <- function(optionsFile,n) {
- optionsCon <- file(optionsFile, 'r')
- options=readLines(optionsCon,n=n)
- close(optionsCon)
- return (options)
-}
-
args <- commandArgs(TRUE)
print(args)
@@ -106,7 +99,7 @@ print(args)
optionsFile = args[1]
print(optionsFile)
-options = getOptionsFromFile(optionsFile, 5)
+options = scan(optionsFile, comment.char="#", what=character(), sep="\n")
fileInput = options[1]
fileOutput = options[2]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]