jmzobitz / neonSoilFlux

R Code to analyze and process soil respiration fluxes at NEON sites
GNU General Public License v3.0
6 stars 6 forks source link

Last line of `compute_neon_flux()` returns NULL instead of a data frame, despite assignment in README example #12

Closed naupaka closed 8 months ago

naupaka commented 8 months ago

The README example stores the output of the function into an object, which is NULL.

> out_fluxes_jan <- compute_neon_flux(input_file_name = "my-file-2020-06.Rda", out_flux_file_name = "my-file-flux-2020-06.Rda")
> out_fluxes_jan
NULL

This could be resolved by either a) removing the assignment in the README example so the output is just stored to a file or b) adding a line to the function definition to return(out_fluxes) to pass the data frame back out.

https://github.com/jmzobitz/NEONSoils/blob/acb025cc4bb47803d7cb68eccd4d872378527923/R/compute_neon_flux.R#L204

Happy to submit a PR for either fix depending on your preference.

jmzobitz commented 8 months ago

Fixed. I see my error too. Thanks!


John M. Zobitz, PhD Pronouns: He, him, his

Professor of Mathematics and Data Science Data Science Program Director Environmental Studies Program Augsburg University 2211 Riverside Avenue, CB 93 Minneapolis, MN 55454

Hagfors Center 187 P: (612) 330-1068

On Thu, Feb 8, 2024 at 1:13 PM Naupaka Zimmerman @.***> wrote:

https://github.com/jmzobitz/NEONSoils/blob/acb025cc4bb47803d7cb68eccd4d872378527923/R/compute_neon_flux.R#L204

The README example stores the output of the function into an object, which is NULL.

out_fluxes_jan <- compute_neon_flux(input_file_name = "my-file-2020-06.Rda", out_flux_file_name = "my-file-flux-2020-06.Rda")> out_fluxes_janNULL

This could be resolved by either a) removing the assignment in the README example so the output is just stored to a file or b) adding a line to the function definition to return(out_fluxes) to pass the data frame back out.

Happy to submit a PR for either fix depending on your preference.

— Reply to this email directly, view it on GitHub https://github.com/jmzobitz/NEONSoils/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPZNTVLCTGEMYM6TW5EZL3YSUPU7AVCNFSM6AAAAABDAJCMYGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDKOBZHE3DIOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>