# NOT RUN {
# }
# NOT RUN {
## examples will not be run during package compilation
## since they would require accessing and writing to
## external files
## load Italian ultra- data
## and write corresponding spectrum to external text file
data(ItaUltra.spc)
write.spc(ItaUltra.spc,"ultra.spc")
## now ultra.spc is a text file with columns m and Vm
## we ready it back in
New.spc <- read.spc("ultra.spc")
## same spectrum as ItaUltra.spc, compare:
summary(New.spc)
summary(ItaUltra.spc)
## DON'T do the following, incomplete spectrum will not be
## restored properly!!!
zm <- lnre("zm",ItaUltra.spc) # estimate model
zm.spc <- lnre.spc(zm,N(zm)) # incomplete spectrum from model
write.spc(zm.spc,"var.spc") # warnings
bad.spc <- read.spc("/Users/baroni/Desktop/var.spc")
## latter is DIFFERENT from zm.spc!!!
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab