Skip to contents

Function to load various txt files from Atlantis simulations

Usage

load_txt(file, id_col = "Time")

Arguments

file

Character string giving the connection of the output file. The filename usually contains output and ends in .txt".

id_col

Character strings giving the names of the columns which are not variables. Data from all other columns will be gathered with tidyr. Default is "Time".

Value

Dataframe in tidy format!

Examples

d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
file <- file.path(d, "outputSETASSSB.txt")
load_txt(file)
#> # A tibble: 8 × 3
#>    time code  atoutput
#>   <dbl> <chr>    <dbl>
#> 1    0  FPS         0 
#> 2    0  FVS         0 
#> 3  365  FPS      1320.
#> 4  365  FVS      6010.
#> 5  730  FPS       992.
#> 6  730  FVS      2365.
#> 7 1094. FPS       889.
#> 8 1094. FVS      1748.