Branch creator: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→Answer: partly works) |
||
Line 26: | Line 26: | ||
Fill in the form below, click to create the content for the page, and copy-paste that onto the page you created in step 1. Save the page. | Fill in the form below, click to create the content for the page, and copy-paste that onto the page you created in step 1. Save the page. | ||
<rcode label="Create content for the branch" variables=" | <rcode name="fill" label="Create content for the branch" recall_inputs=1 variables=" | ||
name:branchname| | name:branchname|description:What was the branch name again?|type:text| | ||
name | |||
name:output.ovariable|description:Give a short name (no spaces!) to the final outcome variable in the branch model.|type:text| | name:output.ovariable|description:Give a short name (no spaces!) to the final outcome variable in the branch model.|type:text| | ||
name:dependencies|description:What are the input variables for the outcome variable? Format c('var1', 'var2')|type: | name:dependencies|description:What are the input variables for the outcome variable? Format c('var1', 'var2')|type:default| | ||
name:output.rationale|description:Give free-text rationale about what the outcome variable is and how it is calculated.|type:textbox| | name:output.rationale|description:Give free-text rationale about what the outcome variable is and how it is calculated.|type:textbox| | ||
name:intermediate.ovariable|description:Give one input variable | name:intermediate.ovariable|description:Give a short name for one input variable (others are added afterwards if needed)|type:text| | ||
name:t2bdata|description:Give a data table for the input variable|type:table| | name:t2bdata|description:Give a data table for the input variable|type:table| | ||
name:intermediate.rationale|description:Give free-text rationale about what the intermediate variable is and how it is calculated.|type:textbox | name:intermediate.rationale|description:Give free-text rationale about what the intermediate variable is and how it is calculated.|type:textbox | ||
Line 62: | Line 61: | ||
{{method|moderator=", | {{method|moderator=", | ||
wiki_username, | wiki_username, | ||
"}}, | "}}", | ||
''' | "'''{{PAGENAME}}''' is a '''branch''' of Handprinter. This page is a test case how to manage branches. | ||
== Question == | == Question == | ||
How to estimate the life-cycle impacts of | How to estimate the life-cycle impacts of {{PAGENAME}}? | ||
== Answer == | == Answer == | ||
<rcode embed=1> | <rcode embed=1 variables=' | ||
# This is code | name:PAGEID|type:hidden|default:`{{PAGEID}}` | ||
"> | |||
# This is code Op_enXXXX/ on page [[", | |||
branchname, | branchname, | ||
"]] | "]] | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
objects.latest('Op_en | objects.latest('Op_en', | ||
PAGEID, | PAGEID, | ||
', code_name = '", | |||
output.ovariable, | output.ovariable, | ||
"') | "') | ||
Line 112: | Line 107: | ||
"' embed=1 label='Initiate ", | "' embed=1 label='Initiate ", | ||
output.ovariable, | output.ovariable, | ||
" (for developers only)'> | " (for developers only)' variables=' | ||
# This is code | name:PAGEID|type:hidden|default:`{{PAGEID}}` | ||
'> | |||
# This is code Op_enXXXX/", | |||
output.ovariable, | output.ovariable, | ||
" on page [[", | " on page [[", | ||
Line 144: | Line 139: | ||
) | ) | ||
rm(wiki_username) | |||
objects.store(list=ls()) | objects.store(list=ls()) | ||
cat('Objects', ls(), 'stored.\n') | cat('Objects', ls(), 'stored.\n') | ||
Line 162: | Line 158: | ||
intermediate.ovariable, | intermediate.ovariable, | ||
" (for developers only)'> | " (for developers only)'> | ||
# This is code | # This is code Op_enXXXX/", | ||
intermediate.ovariable, | intermediate.ovariable, | ||
" on page [[", | " on page [[", | ||
Line 176: | Line 170: | ||
intermediate.ovariable, | intermediate.ovariable, | ||
"', | "', | ||
ddata = 'Op_en | ddata = 'Op_en{{PAGEID}}', | ||
PAGEID, | subset = ", | ||
intermediate.ovariable, | intermediate.ovariable, | ||
") | ") | ||
Line 201: | Line 194: | ||
sep = "") | sep = "") | ||
text2 <- gsub("@", "<", text1) | |||
text2 <- strsplit(text1, split = "\n")[[1]] | text2 <- strsplit(text1, split = "\n")[[1]] | ||
text2 <- data.frame(Pagetemplate = text2) | text2 <- data.frame(Pagetemplate = text2) | ||
oprint(text2, include.rownames = FALSE) | oprint(text2, include.rownames = FALSE) | ||
</rcode> | </rcode> |
Revision as of 15:59, 5 March 2016
Moderator:Jouni (see all) |
|
Upload data
|
Question
How to create a branch for handprinter?
Answer
Step 1: Create a page for branch
Open two copies of this page to your browser. Give a name to your branch and click to create a new page for it. On the other page, continue from step 2.
<createbox> break=yes width=50 buttonlabel=Create branch align=left </createbox>
Step 2: Fill in data about your branch
Fill in the form below, click to create the content for the page, and copy-paste that onto the page you created in step 1. Save the page.