fewsr: FEWS Multiplant plants - lake, pond, river (version 3.104) -...

Description Usage Arguments Value Author(s) Source References Examples

Description

Draft Model of Forced Evaporation from a Water Surface, with user choice of wind function Multiplant Lake/Pond/River Version 3.104 - 2012/12/15

Usage

1
2
3
4
5
6
fewsr(file = tk_choose.files(default = "", caption =
  "Select file to open", multi = FALSE, filters =
  matrix(c("Comma-separated value file", ".csv", "MS Excel spreadsheet",
  ".xlsx", "MS Excel 97-2003 spreadsheet", ".xls"), 6, 2, byrow = TRUE)),
  sheet = 1, type = c("lake", "pond", "river"), output = c("csv",
  "xlsx", "both"))

Arguments

file

Input file will be selected through a file dialog [.xls(x) or .csv]

sheet

Sheet number or sheet name for the input file

type

The type of surface water feature (lake, pond, river)

output

The output format of the resulting spreadsheet (.xlsx, .csv, or both)

Value

spreadsheet with the output parameters and a plot of the average evaporation per month

Author(s)

Irucka Embry, Timothy H. Diehl (Microsoft Excel spreadsheets)

Source

  1. r - How can I check if a file is empty? - Stack Overflow answered by Konrad Rudolph and edited by Geekuna Matata on Apr 23 2014. See http://stackoverflow.com/questions/23254002/how-can-i-check-if-a-file-is-empty.

  2. r - Better error message for stopifnot? - Stack Overflow answered by Andrie on Dec 1 2011. See http://stackoverflow.com/questions/8343509/better-error-message-for-stopifnot.

  3. RDocumentation: TclInterface tcltk. See http://www.rdocumentation.org/packages/tcltk/versions/3.3.1/topics/TclInterface.

  4. r - Convert column classes in data.table - Stack Overflow answered by Matt Dowle on Dec 27 2013. See http://stackoverflow.com/questions/7813578/convert-column-classes-in-data-table.

  5. r - removing columns with NA values only - Stack Overflow answered by David Arenburg on Sep 18 2014. See http://stackoverflow.com/questions/25922385/removing-columns-with-na-values-only.

  6. r - Reduce data.table by group with with different actions depending on column class? - Stack Overflow answered by Ananda Mahto on May 9 2014. See http://stackoverflow.com/questions/23566343/reduce-data-table-by-group-with-with-different-actions-depending-on-column-class/23566488.

  7. r - operations (+, -, /, *) on unequal-sized data.table - Stack Overflow asked and answered by iembry on Jul 24 2014 and Aug 14 2014, respectively. See http://stackoverflow.com/questions/24940246/operations-on-unequal-sized-data-table.

  8. R data.table operations with multiple groups in single data.table and outside function with lapply - Stack Overflow answered by eddi on Aug 12 2014. See https://stackoverflow.com/questions/25273767/r-data-table-operations-with-multiple-groups-in-single-data-table-and-outside-fu.

  9. r - ifelse data.table multiplication while keeping NA values as real - Stack Overflow answered by Mike.Gahan on Jul 25 2014. See http://stackoverflow.com/questions/24965620/ifelse-data-table-multiplication-while-keeping-na-values-as-real.

  10. r - How to replace NA values in a table *for selected columns*? data.frame, data.table - Stack Overflow edited BY eddi on Jan 19 2016 on Nov 17 2011. See https://stackoverflow.com/questions/19379081/how-to-replace-na-values-in-a-table-for-selected-columns-data-frame-data-tab.

  11. r - Summing across rows of a data.table for specifc columns - Stack Overflow answered by eddi on Feb 18 2014. See http://stackoverflow.com/questions/21857679/summing-across-rows-of-a-data-table-for-specifc-columns/21859095.

  12. r - Sum multiple columns - Stack Overflow answered by eddi on Jul 1 2013. See http://stackoverflow.com/questions/17407506/sum-multiple-columns.

  13. R summarizing multiple columns with data.table - Stack Overflow answered by Ricardo Saporta on May 13 2013. See http://stackoverflow.com/questions/16513827/r-summarizing-multiple-columns-with-data-table/16513949.

  14. performance Yearly comparison timeseries ggplot2 R - Stack Overflow answered and edited by Ruthger Righart on Mar 19 2015. See http://stackoverflow.com/questions/29124724/yearly-comparison-timeseries-ggplot2-r/29147348.

  15. r - ggplot2 line chart gives "geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?" - Stack Overflow answered by Mario B. on Mar 12 2015. See http://stackoverflow.com/questions/27082601/ggplot2-line-chart-gives-geom-path-each-group-consist-of-only-one-observation.

  16. James Wettenhall & Philippe Grosjean, File Open/Save dialogs in R tcltk, December 01, 2015. See http://www.sciviews.org/recipes/tcltk/TclTk-file-open-save-dialogs/.

  17. performance - R: need help to speed up creating new columns in a data.frame - Stack Overflow answered by Thell on Apr 26 2014 and edited by Thell on Apr 27 2014. See http://stackoverflow.com/questions/23309300/r-need-help-to-speed-up-creating-new-columns-in-a-data-frame/23312458.

  18. warnings - How do I get rid of the NOTE's generated by R CMD check when using for example ddply in my package? - Stack Overflow answered by shadow on Mar 4 2015 and edited by shadow on Mar 5 2015. See https://stackoverflow.com/questions/28851812/how-do-i-get-rid-of-the-notes-generated-by-r-cmd-check-when-using-for-example-d.

  19. How to check file extensions in R - Stack Overflow answered by lebatsnok on May 17 2014. See http://stackoverflow.com/questions/23713284/how-to-check-file-extensions-in-r.

  20. multiple output filenames in R - Stack Overflow asked and edited by Gabelins on Feb 1 2013. See http://stackoverflow.com/questions/14651594/multiple-output-filenames-in-r.

  21. r - Regex return file name, remove path and file extension - Stack Overflow answered and edited by Ananda Mahto on Feb 25 20134. See http://stackoverflow.com/questions/15073753/regex-return-file-name-remove-path-and-file-extension/15073919.

  22. r - Order data frame rows according to vector with specific order - Stack Overflow answered and edited by Edward on Aug 15 2012. See https://stackoverflow.com/questions/11977102/order-data-frame-rows-according-to-vector-with-specific-order.

  23. Global variables in packages in R - Stack Overflow answered by Greg Snow on Sep 26 2012. See https://stackoverflow.com/questions/12598242/global-variables-in-packages-in-r/12605694.

References

  1. Withdrawal and consumption of water by thermoelectric power plants in the United States, 2010: A product of the USGS National Water Census and the USGS National Streamflow Information Program By: Timothy H. Diehl and Melissa A. Harris, Scientific Investigations Report 2014-5184. See http://pubs.er.usgs.gov/publication/sir20145184.

  2. Methods for estimating water consumption for thermoelectric power plants in the United States: USGS National Water Census and National Streamflow Information Program By: Timothy H. Diehl, Melissa Harris, Jennifer C. Murphy, Susan S. Hutson, and David E. Ladd, Scientific Investigations Report 2013-5188. See http://pubs.er.usgs.gov/publication/sir20135188.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Not run: 
library("FEWSR")
# Examples to check the input file format

# Copy and paste the following code into the R console if you
# wish to see the input file format for the Lake plants.
library("openxlsx")
openXL(file.path(system.file("extdata", "FEWS_BIG_Lake_plants_input.xlsx",
package = "FEWSR")))
  # opens the workbook using the default spreadsheet application


# Copy and paste the following code into the R console if you
# wish to see the input file format for the Pond plants.
library("openxlsx")
openXL(file.path(system.file("extdata", "FEWS_Pond_plants_input.xlsx",
package = "FEWSR")))
  # opens the workbook using the default spreadsheet application


# Copy and paste the following code into the R console if you
# wish to see the input file format for the River plants.
library("openxlsx")
openXL(file.path(system.file("extdata", "FEWS_River_plants_input.xlsx",
package = "FEWSR")))
  # opens the workbook using the default spreadsheet application




# Examples to show different use cases
fewsr(sheet = "Input", type = "pond", output = "csv")
# The sheet name is "Input" and the surface water is pond


fewsr(type = "river", output = "xlsx")
# The sheet number is 1 (default) and the surface water is river


fewsr(sheet = 4, type = "lake", output = "both")
# The sheet number is 4 and the surface water is lake

## End(Not run)

iembry-USGS/FEWSR documentation built on May 18, 2019, 2:33 a.m.