Test variable B: Difference between revisions
Jump to navigation
Jump to search
m (→Formula) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{variable|moderator=Erkki Kuusisto|stub=Yes}} | {{variable|moderator=Erkki Kuusisto|stub=Yes}} | ||
== Question == | == Question == | ||
A simple test variable that fetches the '''data''' defined in "Test variable A", as well as a '''function''' defined in Test variable C? | |||
== Answer == | == Answer == | ||
| Line 44: | Line 15: | ||
=== Formula === | === Formula === | ||
# The code below will not work since the table in Test variable A is in the wrong format. | |||
<rcode showcode="1" | <rcode showcode="1" | ||
name="answer" | name="answer" | ||
label="Run | label="Run" | ||
include=" | include=" | ||
page:Object-oriented_programming_in_Opasnet|name:answer| | page:Object-oriented_programming_in_Opasnet|name:answer| | ||
| Line 57: | Line 31: | ||
cat("Initiation successful. \n") | cat("Initiation successful. \n") | ||
out <- op_baseGetData("opasnet_base", "Op_en5682") # Fetches data from Test variable A. | |||
out <- op_baseGetData("opasnet_base", "Op_en5682") # | |||
colnames(out)[colnames(out) == "obs.1"] <- "Row" # Changes the column name "obs.1" to "Row" | colnames(out)[colnames(out) == "obs.1"] <- "Row" # Changes the column name "obs.1" to "Row" | ||
out <- tidy(out , direction = "wide") | out <- tidy(out , direction = "wide") | ||
Revision as of 14:09, 16 May 2012
| Moderator:Erkki Kuusisto (see all) |
| This page is a stub. You may improve it into a full page. |
| Upload data
|
Question
A simple test variable that fetches the data defined in "Test variable A", as well as a function defined in Test variable C?
Answer
Rationale
Dependencies
Formula
- The code below will not work since the table in Test variable A is in the wrong format.
cat("Initiation successful. \n")
out <- op_baseGetData("opasnet_base", "Op_en5682") # Fetches data from Test variable A.
colnames(out)[colnames(out) == "obs.1"] <- "Row" # Changes the column name "obs.1" to "Row"
out <- tidy(out , direction = "wide")
print(out)
Lden <- 60
HA <- ERF_Lden_HA(Lden)
Lden
HA
|
See also
Keywords
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>