forestgeo / AGBfluxes

Compute flux of biomass at ForestGEO sites.
https://forestgeo.github.io/AGBfluxes/
GNU General Public License v3.0
2 stars 1 forks source link

Restructure .R files #18

Closed maurolepore closed 6 years ago

maurolepore commented 6 years ago

What are your main functions? There should be one .R file per main function and its helpers.

ErvanCH commented 6 years ago

What do you mean? Can't be a single R code containing all functions? Isn't the helpers included in the header of the function??

maurolepore commented 6 years ago

Can't be a single R code containing all functions?

Yes, you can put all functions in a single .R file. The package will work regardless of your how you organize the functions in files. But the package is easier to understand and maintain if you have a structure like this:

R/main-function-1.R R/main-function-2.R R/...

tests/testthat/test-main-function1.R tests/testthat/test-main-function2.R tests/testthat/...

maurolepore commented 6 years ago

I kind of did this already, by renaming the file to data_preparation.R.