-
Notifications
You must be signed in to change notification settings - Fork 0
/
FunctionScriptApr2021.R
73 lines (54 loc) · 2 KB
/
FunctionScriptApr2021.R
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -----------------------------------------------------------
# illustrate the use of functions and structured programming
# 12 Apr 2021
# Sandra Nnadi
#------------------------------------------------------------
# All functions must be included at the top of the program before they are called
# -----------------------------------------------------------
# FUNCTION get_data
# description: description
# inputs: input_description
# outputs: output_description
#############################################################
get_data <- function(x=5){
# function body
return("checking...get_data")
} # end of get_data
#----------------------------------------------------------
get_data()
# -----------------------------------------------------------
# FUNCTION calculate_stuff
# description: description
# inputs: input_description
# outputs: output_description
#############################################################
calculate_stuff <- function(x=5){
# function body
return("checking...calculate_stuff")
} # end of calculate_stuff
#----------------------------------------------------------
calculate_stuff()
# -----------------------------------------------------------
# FUNCTION summarize_output
# description: description
# inputs: input_description
# outputs: output_description
#############################################################
summarize_output <- function(x=5){
# function body
return("checking...summarize_output")
} # end of summarize_output
#----------------------------------------------------------
summarize_output()
# -----------------------------------------------------------
# FUNCTION graph_results
# description: description
# inputs: input_description
# outputs: output_description
#############################################################
graph_results <- function(x=5){
# function body
return("checking...graph_results")
} # end of graph_results
#----------------------------------------------------------
graph_results()