Name |
Type |
Description |
generate_matrix |
rshell |
Scriptlibrary(popbio)
trans<-subset(merge(table, table, by = "plant", sort = FALSE), year.x == year.y - 1)
rownames(trans) <- 1:nrow(trans)
colnames(trans)[2:9] <- c("year", "stage", "reprstr", "recruitment", "year2", "fate", "reprstr2", "recruitment2")
trans01 <- subset(trans, year==start_year, c(plant, stage, reprstr, fate, recruitment))
# foreach value in recruited run this
# check if recruitment value is non-empty
for (stage1 in recruited) {
new_individuals <- nrow(subset(table, year==start_year+1 & stage==stage1 & recruitment!=""))
trans01[[stage1]] <- trans01$reprstr/sum(trans01$reprstr) * new_individuals
}
matrix <- projection.matrix(trans01, sort=stages)
R Serverspringer.grid.cf.ac.uk:6311 |
parse_table |
rshell |
Scripttable<-read.table(tablein, header=TRUE, fill=TRUE)
R Serverspringer.grid.cf.ac.uk:6311 |
display |
rshell |
Scriptsink(output)
print(input)
R Serverspringer.grid.cf.ac.uk:6311 |
display_csv |
rshell |
Scriptwrite.csv(input, file=output) R Serverspringer.grid.cf.ac.uk:6311 |
display_trans |
rshell |
Scriptsink(output)
print(input)
R Serverspringer.grid.cf.ac.uk:6311 |
getstages |
rshell |
Scriptstagef <- factor(tab[["stage"]])
stages <- levels(stagef)
R Serverspringer.grid.cf.ac.uk:6311 |
select_matrix_stages |
localworker |
Scriptimport javax.swing.*;
if ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {
throw new RuntimeException("selectionValues must be specified and non-empty");
}
Vector included = new Vector();
Vector excluded = new Vector(selectionValues);
// Create a scrollable list view of excluded items
JList excludeList = new JList(excluded);
JScrollPane excludeScroll = new JScrollPane(excludeList);
// Create a scrollable list view of included items
JList includeList = new JList(included);
JScrollPane includeScroll = new JScrollPane(includeList);
moveButton( label, fromList, fromVector, toList, toVector ) {
JButton button = new JButton(label);
button.addActionListener( this );
actionPerformed( e ) {
// when button is clicked, remove selected items from source list
// and add them to the target list
int nremoved = 0;
for (int i : fromList.getSelectedIndices()) {
String s = fromVector.remove(i - nremoved);
toVector.add(s);
++nremoved;
}
if (nremoved > 0) {
fromList.setListData(fromVector);
toList.setListData(toVector);
}
}
return button;
}
JPanel leftRightArrowsPanel = new JPanel();
leftRightArrowsPanel.setLayout(new BoxLayout(leftRightArrowsPanel, BoxLayout.Y_AXIS));
leftRightArrowsPanel.add(moveButton("<", includeList, included, excludeList, excluded));
leftRightArrowsPanel.add(moveButton(">", excludeList, excluded, includeList, included));
upButton( label ) {
JButton button = new JButton(label);
button.addActionListener( this );
actionPerformed( e ) {
int min = 0;
for (int i : includeList.getSelectedIndices()) {
if (i == min) {
// ignore first items that are selected
++min;
}
else {
String s = included.remove(i);
included.add(i - 1, s);
min = -1;
}
}
if (min < 0) {
includeList.setListData(included);
}
}
return button;
}
JPanel upDownArrowsPanel = new JPanel();
upDownArrowsPanel.setLayout(new BoxLayout(upDownArrowsPanel, BoxLayout.Y_AXIS));
upDownArrowsPanel.add(upButton("Move Up"));
//downButton = new JButton("V");
//upDownArrowsPanel.add(downButton);
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
mainPanel.add(new JLabel((message == void ? null : message)));
JPanel selectionPanel = new JPanel();
selectionPanel.setLayout(new BoxLayout(selectionPanel, BoxLayout.X_AXIS));
selectionPanel.add(excludeScroll);
selectionPanel.add(leftRightArrowsPanel);
selectionPanel.add(includeScroll);
selectionPanel.add(upDownArrowsPanel);
mainPanel.add(selectionPanel);
JOptionPane.showMessageDialog(
null, mainPanel, (title == void ? null : title), JOptionPane.PLAIN_MESSAGE);
List answer = included;
|
Message |
stringconstant |
ValueCtrl-click to select multiple values |
SelectMatrixStages |
stringconstant |
ValueSelect matrix stages |
select_recruitment_stages |
localworker |
Scriptimport javax.swing.*;
if ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {
throw new RuntimeException("selectionValues must be specified and non-empty");
}
Vector included = new Vector();
Vector excluded = new Vector(selectionValues);
// Create a scrollable list view of excluded items
JList excludeList = new JList(excluded);
JScrollPane excludeScroll = new JScrollPane(excludeList);
// Create a scrollable list view of included items
JList includeList = new JList(included);
JScrollPane includeScroll = new JScrollPane(includeList);
moveButton( label, fromList, fromVector, toList, toVector ) {
JButton button = new JButton(label);
button.addActionListener( this );
actionPerformed( e ) {
// when button is clicked, remove selected items from source list
// and add them to the target list
int nremoved = 0;
for (int i : fromList.getSelectedIndices()) {
String s = fromVector.remove(i - nremoved);
toVector.add(s);
++nremoved;
}
if (nremoved > 0) {
fromList.setListData(fromVector);
toList.setListData(toVector);
}
}
return button;
}
JPanel leftRightArrowsPanel = new JPanel();
leftRightArrowsPanel.setLayout(new BoxLayout(leftRightArrowsPanel, BoxLayout.Y_AXIS));
leftRightArrowsPanel.add(moveButton("<", includeList, included, excludeList, excluded));
leftRightArrowsPanel.add(moveButton(">", excludeList, excluded, includeList, included));
upButton( label ) {
JButton button = new JButton(label);
button.addActionListener( this );
actionPerformed( e ) {
int min = 0;
for (int i : includeList.getSelectedIndices()) {
if (i == min) {
// ignore first items that are selected
++min;
}
else {
String s = included.remove(i);
included.add(i - 1, s);
min = -1;
}
}
if (min < 0) {
includeList.setListData(included);
}
}
return button;
}
JPanel upDownArrowsPanel = new JPanel();
upDownArrowsPanel.setLayout(new BoxLayout(upDownArrowsPanel, BoxLayout.Y_AXIS));
upDownArrowsPanel.add(upButton("Move Up"));
//downButton = new JButton("V");
//upDownArrowsPanel.add(downButton);
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
mainPanel.add(new JLabel((message == void ? null : message)));
JPanel selectionPanel = new JPanel();
selectionPanel.setLayout(new BoxLayout(selectionPanel, BoxLayout.X_AXIS));
selectionPanel.add(excludeScroll);
selectionPanel.add(leftRightArrowsPanel);
selectionPanel.add(includeScroll);
selectionPanel.add(upDownArrowsPanel);
mainPanel.add(selectionPanel);
JOptionPane.showMessageDialog(
null, mainPanel, (title == void ? null : title), JOptionPane.PLAIN_MESSAGE);
List answer = included;
|
SelectRecruitmentStages |
stringconstant |
ValueSelect recruitment stages |
Comments (0)
No comments yet
Log in to make a comment