This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example based on http://shiny.rstudio.com/articles/dynamic-ui.html | |
library(shiny) | |
ui = basicPage( | |
fluidRow( | |
actionButton(inputId = "add_buttons", label = "Add 5 Buttons") | |
), | |
uiOutput("more_buttons") # this is where the dynamically added buttons will go | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have a huge repository (in size and in history) and want to add a subfolder | |
to your project as a submodule you can follow this example to save time and space | |
using git's shallow clone and shallow checkout feature. It is a bit more complicated | |
in this example because I assume that you want your submodule to track a non-default | |
branch, called `mybranch`, instead of the `master` branch. Things could probably get | |
a lot simpler when using the default branch. After following the commands in these | |
examples you can use `git submodule update` and `git submodule update --remote` as normal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ipoptr_qp <- function(Dmat, dvec, Amat, bvec, ub=100){ | |
# Solve the quadratic program | |
# | |
# min -d^T x + 1/2 x^T D x | |
# s.t. A%*%x>= b | |
# | |
# with ipoptr. | |
n <- length(bvec) | |
# Jacobian structural components |