Learn R Programming

x12 (version 1.0-3)

read.spc: Function to read X12-spc Files in x12Parameter R objects

Description

Still an early beta, so it will not work in specific situations

Usage

read.spc(file,filename=TRUE)

Arguments

file
character vector containing filenames of spc files
filename
if TRUE the filename (without) ".spc" will be used as name for the serie

Value

  • The function returns an object of class "x12Single" if the file argument has length 1, otherwise it returns an "x12Batch" object.

Details

Not all arguments of a X12 spc file are supported, but the parameters described in x12 should be covered.

See Also

X12

Examples

Run this code
x12SingleObject1 <- read.spc("D:/aaa.spc")
  x12SingleObject2 <- read.spc("D:/ak_b.SPC")
  x12BatchObject1 <- read.spc(c("D:/ak_b.SPC","D:/aaa.spc"))
  setwd("M:/kowarik/Test/x12test")
  lf <- list.files()
  lf <- lf[unlist(lapply(lf,function(x)substr(x,nchar(x)-2,nchar(x))))  lf <- lf[-c(grep("ind",lf))]
  allSPC <- read.spc(lf)
  a <- X12(allSPC)  
  plot(a@x12List[[1]])
  summary(a@x12List[[1]])

Run the code above in your browser using DataLab