diff --git a/README.md b/README.md index f602f19..7c1a449 100644 --- a/README.md +++ b/README.md @@ -127,21 +127,43 @@ library(EXstat) ### Extraction process with [CARD](https://github.com/super-lou/CARD/) -For a more user-friendly interaction, this package has been developed in symbiosis with predefined parameterisation files called [CARD](https://github.com/super-lou/CARD/). +For a more user-friendly interaction, this package has been developed in symbiosis with predefined parameterisation files called CARD. -So you don't have to define complex parameters yourself to extract hydroclimatological variables. What's more, if the [CARD](https://github.com/super-lou/CARD/) you want doesn't exist, it's easy to create one based on the others. +So you don't have to define complex parameters yourself to extract hydroclimatological variables. What's more, if the CARD you want doesn't exist, it's easy to create one based on the others. To do this, you need to download the [CARD archive](https://github.com/super-lou/CARD/archive/refs/heads/main.zip), extract it and place it wherever you like (as if it were data). Then you can create a new subdirectory within this main CARD directory, which you can call for example "analyse_1", and copy and paste the CARD "__all__/Hautes_Eaux/QJXA.R" into it. -In this way, you can carry out "analyse_1" by doing, +In this way, you can carry out "analyse_1" by running: +``` r +CARD_extraction(data %>% rename(Q = X), + CARD_path = 'path/to/CARD', + CARD_dir = 'analyse_1') +``` + +Thus, you can place several CARDs in your "analyse_1" sub-directory for multiple analyses. + +However, this copy/pasting action can be quite cumbersome and repetitive for large analyses. Therefore, with `CARD_management`, it is possible to automate the CARD copy/pasting from the CARD directory to an external temporary directory, like this: + +``` r +CARD_management(CARD_path = "path/to/CARD", + CARD_tmp = "path/to/copy/CARD", + CARD_dir = "analyse_1", + CARD_name = c("QA", "QJXA"), + overwrite = TRUE, + verbose = TRUE) ``` + +As a result, to run the analysis, use: + +``` r CARD_extraction(data %>% rename(Q = X), - CARD_path = 'path_to_CARD_directory', - CARD_dir = 'subdirectory_for_analyse_in_CARD') + CARD_path = "path/to/CARD", + CARD_tmp = "path/to/copy/CARD", + CARD_dir = "analyse_1") ``` -In this way, you can place several [CARDs](https://github.com/super-lou/CARD/) in your "analyse_1" sub-directory for multiple analyses. +Take a look at the [CARD](https://github.com/super-lou/CARD/?tab=readme-ov-file#documentation) repository to better understand the CARD formatting. ### Trend analyse