Description Usage Arguments Examples
Write .stf text file.
1 | writeSTFfile(x, stocks.df = NA, filename = NA)
|
x |
A data frame with columns: "StockID" (3 letter acronym), and (likely) four columns named age2...age4. The values of the age columns will be 0 or 1, depending on whether that stock-age should be included in the SPFI estimation. An example of argument is found in the example below. |
stocks.df |
A data frame with column names: "Stock Number","Stock Name", "StockID","Start Age". If NA (the defualt) then the function builds a data frame from the 'new' list of 31 stocks. |
filename |
A character vector of length one. The default is NA. If NA then the stf ouput is sent to stdout(). |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
spfi.flag <- data.frame(matrix(ncol=5, byrow = TRUE, data = c(
"ATN", 0, 0, 0, 0,
"BQR", 0, 1, 1, 0,
"CHI", 0, 1, 1, 0
)), stringsAsFactors = FALSE)
colnames(spfi.flag) <- c("StockID", "age.index2", "age.index3", "age.index4", "age.index5")
spfi.flag <- type.convert(spfi.flag, as.is = TRUE)
writeSTFfile(x = spfi.flag, filename = "test.stf")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.