saveDataText: Save elisa_batch analysis results

Description Usage Arguments Details Examples

View source: R/ELISAtools_IO.R

Description

Save the data analysis results to disk in text format.

Usage

1
saveDataText(batches, file.name)

Arguments

batches

list of elisa batch data to be serialized.

file.name

character specifying name of the output file.

Details

The results are written to disk in the text format (tab-delimited) and is easy to be used for other analysis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#'#R code to run 5-parameter logistic regression on ELISA data
#load the library
library(ELISAtools)

#get file folder
dir_file<-system.file("extdata", package="ELISAtools")

batches<-loadData(file.path(dir_file,"design.txt"))

#make a guess for the parameters, the other two parameters a and d 
#will be estimated based on data.
model<-"5pl"
pars<-c(7.2,0.5, 0.015) #5pl inits
names(pars)<-c("xmid", "scal", "g")


#do fitting. model will be written into data set.
batches<-runFit(pars=pars,  batches=batches, refBatch.ID=1, model=model  )

#now call to do predications based on the model.
batches<-predictAll(batches);

#now saving the data in text.
saveDataText(batches, file.path(tempdir(),"elisa_data.txt"));

ELISAtools documentation built on Jan. 21, 2021, 5:08 p.m.