data.frame2parString: Convert to and from parameter strings in StoX.

Description Usage Arguments Examples

View source: R/rstox_base.r

Description

Convert to and from parameter strings in StoX.

Usage

1
2
3

Arguments

x

A data.frame with the parameters as columns, such as data.frame(SpecCat=c("Torsk", "Sild", ""), Alpha=runif(3), Beta=runif(3), LMin=runif(3), LMax=runif(3)).

x

Parameter string to convert to data frame, given as <parameter1> = <value>; <parameter2> = <value>; and so on, where lines in the data frame are separated by "/". See examples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
df1 <- data.frame(
    SpecCat=c("Torsk", "Hyse", ""), 
    Alpha=c(5,9,2), 
    Beta=c(2,2,3), 
    LMin=c(1,2,3), 
    LMax=c(5,7,9))
string <- data.frame2parString(df1)
df2 <- parString2data.frame(string)
df1
df2
identical(df1, df2)

Sea2Data/Rstox documentation built on April 18, 2018, 11:11 p.m.